public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix gdb.dwarf2/nullptr_t.exp with cc-with-dwz-m
@ 2023-08-30 21:33 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-08-30 21:33 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.dwarf2/nullptr_t.exp with target board
cc-with-dwz-m, I run into:
...
FAIL: gdb.dwarf2/nullptr_t.exp: decltype(nullptr) symbol
...

The problem is that were looking for "typedef void decltype\\(nullptr\\)"
using "maint print symbols -source $srcfile", but dwz has moved the typedef to
a PU, so it's shown by "maint print symbols -source <unknown>" instead.

Fix this by dropping the "-source $srcfile" bit.

Tested on x86_64-linux, with make-check-all.sh.
---
 gdb/testsuite/gdb.dwarf2/nullptr_t.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
index df2f163af38..b28f8b90daa 100644
--- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
+++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
@@ -39,6 +39,6 @@ with_complaints 5 {
     gdb_test $cmd $re "$cmd without complaints"
 }
 
-gdb_test "maint print symbols -source $srcfile" \
+gdb_test "maint print symbols" \
     "typedef void decltype\\(nullptr\\); \r\n.*" \
     "decltype(nullptr) symbol"

base-commit: 7c651c5fe6de738b0ce9b5b89568fde84eade807
-- 
2.35.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-30 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30 21:33 [pushed] [gdb/testsuite] Fix gdb.dwarf2/nullptr_t.exp with cc-with-dwz-m Tom de Vries

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).