From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1676903310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qRs44WQvpww40yxs3IUJPvbu5pdBO856lq3mwPSVchM=; b=qEIogA5tNIfFAyLJV8v5WQdZEzQq7kDnUCUeWGtsm9jBnyONw2DgQHtRiXNdguEJYNotFS T1Sm76oB8txZNHJp3BULdbSKYMb15tqvQnbNH3Nd2iMSMY5Iy2TgWl+Vxy0Ujt6arawhnM XhzyenVVIVCfeDCvD3yJUsmcwrCHeX8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1676903310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qRs44WQvpww40yxs3IUJPvbu5pdBO856lq3mwPSVchM=; b=0Y38iGu+QMjeElRN+ntrEQl9KOA+Yql3d84Zw6prehGVFa6IZFBs8jr26Z7k/SWDGhVqr0 pqOXZKf7AFc6DAAQ== 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> From: Tom de Vries In-Reply-To: <1676902127.35r1n62kps.astroid@pulse.none> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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