]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Allow multiple locations in homonym.exp
authorTom Tromey <tromey@adacore.com>
Thu, 5 Sep 2024 17:57:03 +0000 (11:57 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 6 Mar 2025 21:17:17 +0000 (14:17 -0700)
With some forthcoming changes to GNAT, the two Get_Value functions in
this test case will end up with the same name (with the current GNAT,
one ends up with a "__2" suffix).  This change will cause one test to
set multiple breakpoints; this patch changes the test to work with
either version of the compiler.

gdb/testsuite/gdb.ada/homonym.exp

index 91a4e62e61f2bd65c63b796196b4c014f66345f4..2fef3c6fbce7a5a0f538ec7d7adb7757d6257531 100644 (file)
@@ -38,7 +38,7 @@ gdb_test "break homonym.adb:Get_Value" \
     "set breakpoint at homonym.adb:Get_Value"
 
 gdb_test "break <homonym__get_value>" \
-    "Breakpoint \[0-9\]+ at $hex: file .*homonym\\.adb, line $decimal\\." \
+    ".*Breakpoint \[0-9\]+ at $hex: (file .*homonym\\.adb, line $decimal\\.|<homonym__get_value>\\. .2 locations.)" \
     "set breakpoint at <homonym__get_value>"
 
 delete_breakpoints