From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IIQ4CqSD82OR+DgAWB0awg (envelope-from ) for ; Mon, 20 Feb 2023 09:28:52 -0500 Received: by simark.ca (Postfix, from userid 112) id 277FC1E222; Mon, 20 Feb 2023 09:28:52 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=EdzUTkPq; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C7B161E110 for ; Mon, 20 Feb 2023 09:28:51 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD91C385B51F for ; Mon, 20 Feb 2023 14:28:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD91C385B51F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676903330; bh=qRs44WQvpww40yxs3IUJPvbu5pdBO856lq3mwPSVchM=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=EdzUTkPq+ZN3dV0Jt3HsuGhRFRqjaPZVoWf+m9GSKr5cpS5Krz1erAVHDRCmn5AjA MXp/q8gs/Oop6LBc34fw9q0gUcC+Ur0WCGkmZY5PVlKbbD+vaXVFHrQWMtMrb2qwgE pxeByT60RHsi+dR28UIG16SYPNghl/M3Lm3JBkMY= Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id C46BC384477D for ; Mon, 20 Feb 2023 14:28:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C46BC384477D Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0F1262040F; Mon, 20 Feb 2023 14:28:30 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E8C49139DB; Mon, 20 Feb 2023 14:28:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 51iBN42D82PAMwAAMHmgww (envelope-from ); Mon, 20 Feb 2023 14:28:29 +0000 Message-ID: Date: Mon, 20 Feb 2023 15:28:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [RFC] [gdb/testsuite] Use dwarf assembly in gdb.dlang/dlang-start.exp Content-Language: en-US To: Iain Buclaw , gdb-patches@sourceware.org Cc: Tom Tromey References: <20230220134839.1944-1-tdevries@suse.de> <1676902127.35r1n62kps.astroid@pulse.none> In-Reply-To: <1676902127.35r1n62kps.astroid@pulse.none> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2/20/23 15:14, Iain Buclaw wrote: > Excerpts from Tom de Vries via Gdb-patches's message of Februar 20, 2023 2:48 pm: >> For test-case gdb.dlang/dlang-start.exp, I run into: >> ... >> gdb compile failed, default_target_compile: Can't find gdc. >> ... >> >> AFAICT, my distro has no support for gdc, but I'd like to have the test-case >> running and passing, so let's rewrite the test-case using dwarf assembly >> (though arguably, it's not a bad idea to have test-cases excercising >> actual compilers). >> >> My distro does have a package providing dmd, so let's try out simple.d >> compiled with dmd, and investigate what the start command does. >> > > I'm pretty sure I'd get testsuite failures for not having Ada or Rust > installed either. Yes, most likely. > Shouldn't the testsuite just return UNSUPPORTED when > there's a missing dependency? > That's certainly an option. OTOH, the approach taken in this patch is to instead eliminate the dependency, which ensures that everybody running the entire testsuite will exercise this test-case. That sort of approach is not feasible for ada which has a lot of test-cases, and is not needed either (for me) for ada or rust because compilers are readily available in packages. >> AFAICT, gdb uses "D main" because the minimal symbol _Dmain: >> ... >> $ nm simple | grep 438448 >> 0000000000438448 t >> 0000000000438448 W _Dmain >> ... >> is demangled into "D main": >> ... > > Yes. If I try to second guess my thinking from 2016 or so. I believe it > was because "_Dmain" could come from any language, but having a space in > the identifier pretty much guarantees only a D compiler generated it. I see, interesting, thanks for sharing that. Thanks - Tom