From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aybSGV8u81/bHAAAWB0awg (envelope-from ) for ; Mon, 04 Jan 2021 10:03:59 -0500 Received: by simark.ca (Postfix, from userid 112) id 5CBF81F0AA; Mon, 4 Jan 2021 10:03:59 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 0C0DD1E590 for ; Mon, 4 Jan 2021 10:03:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 070223882130; Mon, 4 Jan 2021 15:03:58 +0000 (GMT) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 54E313882130 for ; Mon, 4 Jan 2021 15:03:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 54E313882130 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x430.google.com with SMTP id m5so32438488wrx.9 for ; Mon, 04 Jan 2021 07:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=94Da00z2EWJyx2wHIduFMTDW8+14rcInfwqJMUifkd4=; b=JxDpvEOJefQUl1NUlAJT+I6+lYGgJ7yqSoXXTnwgxx8ErHYB9/4CdOnQZ3JwvnohWP tryu3v1VvH3mLaYnFfydNMVOusSInE/8MhIxtkwg3XVFicSholza/Way132BcQginXoe viVfwXC8RuIlgJsQddjZMdrLOIH193esMHFbMGupC+kkxAZndQsEJnHacdEcZxU+LIDt GI0JGFQ1Trs61INk20b6sKcc+IuOq4yeCjDXeN6aWxeP71m2v/h1zhtOcWLzAI/qnds+ n69Ds+93hVKDZiLlqariQtdl6TfW0UoeFLBTiHilqmrtR/l3OiaR8qyC/slwwAvzs6yo 9cEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=94Da00z2EWJyx2wHIduFMTDW8+14rcInfwqJMUifkd4=; b=WpEGZU6vS2BMPVYycMTep83Q4QBPoXIsIQ94mVp/noSc/T1Ds7JBLFzlIBZhSApg5J I09gaZqH4qFjw3nyn4CmVjwNexMa3+zyiKCo2kpCjSJnCSBYxRDpkBYgJP8+i5B3veY5 3yfGRYV/DOBummy5TnPO6SG9j6SCvnUcGlIkzOozF14LFD4k06IcjSR4hKhPEzuLtdlH c/JXplnvWgQoan5tLJagLQ6E8EMZW1e9HwubcyYm8NePG6XKthlNPnpOt/DjWACjFDM7 ShgXK00LkOoQ+iuycLV3OYb5GzEoAplZtm35ZY40qSw5xsZsnwDspR63ciHV9UxunMtO EUUg== X-Gm-Message-State: AOAM531UNn7yToXdeeMR3S3aPHT+SSsVs+pDjApM/kFO5xm7IJPN8z1Q /0y/GEGHxHvWD9c8LgjPA6/0UQ== X-Google-Smtp-Source: ABdhPJxbNxD0Z+uHqevI/mO77VRakDbWfFddNV7Eidj1mic9DO1I83KSFpxKpbfYvZNbenzkO1fdrg== X-Received: by 2002:adf:cc81:: with SMTP id p1mr79644894wrj.339.1609772634441; Mon, 04 Jan 2021 07:03:54 -0800 (PST) Received: from localhost (host86-188-49-102.range86-188.btcentralplus.com. [86.188.49.102]) by smtp.gmail.com with ESMTPSA id o124sm36677493wmb.5.2021.01.04.07.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 07:03:53 -0800 (PST) Date: Mon, 4 Jan 2021 15:03:53 +0000 From: Andrew Burgess To: Tom de Vries Subject: Re: [PATCH][gdb/testsuite] Don't require gold for gdb.base/morestack.exp Message-ID: <20210104150353.GZ2945@embecosm.com> References: <20210104125453.GA4963@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210104125453.GA4963@delia> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 15:01:35 up 26 days, 19:46, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" * Tom de Vries [2021-01-04 13:54:55 +0100]: > Hi, > > While working on PR26935 I noticed that the test-case requires the gold > linker, but doesn't really need it. > > The -fuse-ld=gold was added to support the printf in the test-case, which > prints some information but is not otherwise needed for the test-case. > > Fix this by commenting out the printf and removing the corresponding > -fuse-ld=gold. > > Tested on x86_64. > > Also checked that the test still fails when the fix from the commit that added > the test-case is reverted. > > Any comments? > > Thanks, > - Tom > > [gdb/testsuite] Don't require gold for gdb.base/morestack.exp > > gdb/testsuite/ChangeLog: > > 2021-01-04 Tom de Vries > > * gdb.base/morestack.c: Comment out printf. > * gdb.base/morestack.exp: Don't use -fuse-ld=gold. > > --- > gdb/testsuite/gdb.base/morestack.c | 4 ++++ > gdb/testsuite/gdb.base/morestack.exp | 8 +------- > 2 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/morestack.c b/gdb/testsuite/gdb.base/morestack.c > index 6f9a27ed2c8..792a38a0cfe 100644 > --- a/gdb/testsuite/gdb.base/morestack.c > +++ b/gdb/testsuite/gdb.base/morestack.c > @@ -63,7 +63,11 @@ down (int i) > > if (last && last < (void *) buf) > { > +#if 0 > + /* Debug statement, requires gold linker. See GCC documentation of > + -fsplit-stack. */ > printf ("%d: %p < %p\n", i, last, buf); > +#endif I'm not a fan of '#if 0' guards. There are a few cases when it can add value - the code within is effectively an extended comment, but with "real" code highlighting/indentation. This doesn't feel like one of these cases, so I'd vote to just remove the code completely. It's in the history if anyone ever cares to look for it. Thanks, Andrew > marker_hit (); > } > last = buf; > diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp > index 627ae8164c3..99807a291ee 100644 > --- a/gdb/testsuite/gdb.base/morestack.exp > +++ b/gdb/testsuite/gdb.base/morestack.exp > @@ -21,17 +21,11 @@ if {$gcc_compiled == 0} { > return -1 > } > > -if { [have_fuse_ld_gold] == 0} { > - return -1 > -} > - > standard_testfile > > -# -fuse-ld=gold is used for calling printf code built without -fsplit-stack > -# which could crash otherwise. See GCC documentation of -fsplit-stack. > set opts "additional_flags=-fsplit-stack" > if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile \ > - [list $opts additional_flags=-fuse-ld=gold]] } { > + [list $opts]] } { > return -1 > } >