From: Tom de Vries Date: Wed, 30 Aug 2023 21:33:31 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.dwarf2/nullptr_t.exp with cc-with-dwz-m X-Git-Tag: gdb-14-branchpoint~393 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50e193c1862029e8de71c7bcd0863c17ad37bfa5;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix gdb.dwarf2/nullptr_t.exp with cc-with-dwz-m 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 " instead. Fix this by dropping the "-source $srcfile" bit. Tested on x86_64-linux, with make-check-all.sh. --- 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"