public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Carl Love <cel@us.ibm.com>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "will_schmidt@vnet.ibm.com" <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH] PowerPC, fix gdb.base/retval-large-struct.exp
Date: Sat, 19 Nov 2022 07:42:35 +0100	[thread overview]
Message-ID: <eb2333fd-4dab-cb2c-7a77-d32821a00551@suse.de> (raw)
In-Reply-To: <82e43627f7a2a2e06a5fc79db1fae17eb01c12e4.camel@us.ibm.com>

On 11/18/22 20:11, Carl Love wrote:
> Tom:
> 
> On Fri, 2022-11-18 at 17:25 +0100, Tom de Vries wrote:
>> On 11/18/22 17:04, Ulrich Weigand wrote:
>>> Tom de Vries <tdevries@suse.de> wrote:
>>>
>>>> AFAIU, needing -fvar-tracking is specific to powerpc, so we
>>>> should limit
>>>> it's impact to that target.
>>>>
>>>> And it's a gcc compiler flag, so perhaps we should limit it's
>>>> impact to
>>>> that as well.
>>>
>>> No, it's not really powerpc specific - the same mechanism can be
>>> used on many other platforms with an ABI that uses a return buffer
>>> address that is not preserved.  (E.g. we're currently looking into
>>> enabling it on s390x.)
>>>
>>
>> Right, so we can add those archs to the list of archs requiring
>> -fvar-tracking support when gcc is used.
>>
>>> And given that the flag is harmless if it's available (which the
>>> test verifies), I think it makes sense to just always enable it.
>>>
>>
>> That's fine by me.
>>
>> Then I get:
>> ...
>> set flags {}
>>
>> lappend flags debug
>>
>> if { [have_fvar_tracking] } {
>>       lappend flags -fvar-tracking
>> } else {
>>       if { ( [istarget powerpc*-*-*] || [istarget s390x*-*-* ])
>>            && [is_c_compiler_gcc] } {
>>           unsupported "gcc used, -fvar-tracking needed"
>>           return -1
>>       }
>> }
>>
>> if {[prepare_for_testing "failed to prepare" $testfile $srcfile
>> $flags]} {
>>          return -1
>> }
> 
> The [have_fvar_tracking] does a runtime test to see if the compiler
> supports the -fvar-tracking option.  So if it passes, then the option
> is supported.

Agreed.

> The test makes the additional check  [istarget powerpc*-
> *-*] || [istarget s390x*-*-* ]) && [is_c_compiler_gcc]  redundant.
> 

My concern is older gcc compilers that do not support -fvar-tracking. 
Those have no chance of succeeding, so we should bail out for those.

OTOH, non-gcc compilers may or may not provide sufficient debug 
information, so there's no need to bail out for those.

Thanks,
- Tom

> I don't think there is any need for the additional checks.
> 
>                    Carl
> 

  reply	other threads:[~2022-11-19  6:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 22:11 Carl Love
2022-11-17 12:57 ` Ulrich Weigand
2022-11-17 16:18   ` Carl Love
2022-11-18 14:46 ` Tom de Vries
2022-11-18 16:04   ` Ulrich Weigand
2022-11-18 16:14     ` Carl Love
2022-11-18 16:25     ` Tom de Vries
2022-11-18 19:11       ` Carl Love
2022-11-19  6:42         ` Tom de Vries [this message]
2022-11-23 12:44           ` Ulrich Weigand
2023-03-07 18:59     ` Tom Tromey
2023-03-08 13:48       ` Ulrich Weigand
2023-03-08 15:15         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb2333fd-4dab-cb2c-7a77-d32821a00551@suse.de \
    --to=tdevries@suse.de \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=cel@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=will_schmidt@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).