]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Make nsalias.exp more reliable
authorTom Tromey <tom@tromey.com>
Fri, 10 Mar 2023 16:49:24 +0000 (09:49 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 28 Jan 2024 17:58:16 +0000 (10:58 -0700)
nsalias.exp tries to detect a complaint that is issued when expanding
a CU.  However, the test is a bit funny in that, while gdb does
currently expand the CU and issue the complaint, it also emits this
error:

    No symbol "N100" in current context.

This series will change gdb such that this CU is not expanded -- which
makes sense, the symbol in question doesn't actually match the lookups
that are done.

So, to make the test more robust, a direct request to expand symtabs
is done instead.

gdb/testsuite/gdb.cp/nsalias.exp

index b727437abc26e894f03c65612c37e88fa1639692..0c29e6f2d403789bf64836edd7adc3d36b50fef4 100644 (file)
@@ -324,5 +324,5 @@ if { $readnow_p } {
     global gdb_file_cmd_msg
     gdb_assert {[regexp $re $gdb_file_cmd_msg]} $test
 } else {
-    gdb_test "print N100::x" $re $test
+    gdb_test "maint expand-symtabs" $re $test
 }