Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp
Date: Thu, 28 Jan 2021 11:23:40 -0500	[thread overview]
Message-ID: <7b80371a-da7e-6db7-e100-1c82ce915739@polymtl.ca> (raw)
In-Reply-To: <e5fd2512-7b05-abd3-f6c2-6f404e8886e7@suse.de>



On 2021-01-28 11:21 a.m., Tom de Vries wrote:
> On 1/28/21 4:04 PM, Simon Marchi wrote:
>>
>>
>> On 2021-01-26 1:03 p.m., Tom de Vries wrote:
>>> Hi,
>>>
>>> When running test-case gdb.arch/i386-sse-stack-align.exp on target board
>>> unix/-m32, I run into:
>>> ...
>>> (gdb) print (int) g0 ()^M
>>> Invalid data type for function to be called.^M
>>> (gdb) FAIL: gdb.arch/i386-sse-stack-align.exp: print (int) g0 ()
>>> ...
>>>
>>> Gdb is supposed to use minimal symbol g0:
>>> ...
>>> $ nm i386-sse-stack-align | grep g0
>>> 08049194 t g0
>>> ...
>>> but instead it finds a g0 symbol in the debug info of libm, specifically in
>>> ./sysdeps/ieee754/ldbl-96/e_lgammal_r.c.
>>>
>>> Fix this by disabling reading symbols for shared libs.
>>>
>>> Tested on x86_64-linux.
>>>
>>> Any comments?
>>>
>>> Thanks,
>>> - Tom
>>>
>>> [gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp
>>>
>>> gdb/testsuite/ChangeLog:
>>>
>>> 2021-01-26  Tom de Vries  <tdevries@suse.de>
>>>
>>> 	* gdb.arch/i386-sse-stack-align.exp: Set auto-solib-add to off.
>>>
>>> ---
>>>  gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
>>> index 2c1cdd89c70..57dd12f9830 100644
>>> --- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
>>> +++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
>>> @@ -37,6 +37,11 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts
>>>  
>>>  clean_restart $executable
>>>  
>>> +# With libm debug info installed, I get a g0 from
>>> +# ./sysdeps/ieee754/ldbl-96/e_lgammal_r.c instead of the local g0.
>>> +# Fix this by disabling reading symbols for shared libs.
>>> +gdb_test_no_output "set auto-solib-add off"
>>> +
>>>  if ![runto_main] then {
>>>      return -1
>>>  }
>>>
>>
>> Couldn't we simply use some less common, more scoped name?
>>
> 
> Yep, that also works.  How about this?
> 
> Thanks,
> - Tom
> 
> 

Yep, that LGTM.

Simon

      reply	other threads:[~2021-01-28 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 18:03 Tom de Vries
2021-01-28 15:04 ` Simon Marchi via Gdb-patches
2021-01-28 16:21   ` Tom de Vries
2021-01-28 16:23     ` Simon Marchi via Gdb-patches [this message]

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=7b80371a-da7e-6db7-e100-1c82ce915739@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    /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