From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp
Date: Tue, 26 Jan 2021 19:03:31 +0100 [thread overview]
Message-ID: <20210126180330.GA7889@delia> (raw)
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
}
next reply other threads:[~2021-01-26 18:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 18:03 Tom de Vries [this message]
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
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=20210126180330.GA7889@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/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