Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH][gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp
@ 2021-01-26 18:03 Tom de Vries
  2021-01-28 15:04 ` Simon Marchi via Gdb-patches
  0 siblings, 1 reply; 4+ messages in thread
From: Tom de Vries @ 2021-01-26 18:03 UTC (permalink / raw)
  To: gdb-patches

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
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-28 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 18:03 [PATCH][gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox