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 10:04:46 -0500 [thread overview]
Message-ID: <9ebc1864-3bd3-cc10-b327-e8f3d37e8c15@polymtl.ca> (raw)
In-Reply-To: <20210126180330.GA7889@delia>
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?
Simon
next prev parent reply other threads:[~2021-01-28 15:04 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 [this message]
2021-01-28 16:21 ` Tom de Vries
2021-01-28 16:23 ` Simon Marchi via Gdb-patches
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=9ebc1864-3bd3-cc10-b327-e8f3d37e8c15@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