From: Tom Tromey Date: Thu, 5 Sep 2024 17:57:03 +0000 (-0600) Subject: Allow multiple locations in homonym.exp X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b9041206f334835dae5a66801a0a7c8936a0714;p=thirdparty%2Fbinutils-gdb.git Allow multiple locations in homonym.exp 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. --- diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp index 91a4e62e61f..2fef3c6fbce 100644 --- a/gdb/testsuite/gdb.ada/homonym.exp +++ b/gdb/testsuite/gdb.ada/homonym.exp @@ -38,7 +38,7 @@ gdb_test "break homonym.adb:Get_Value" \ "set breakpoint at homonym.adb:Get_Value" gdb_test "break " \ - "Breakpoint \[0-9\]+ at $hex: file .*homonym\\.adb, line $decimal\\." \ + ".*Breakpoint \[0-9\]+ at $hex: (file .*homonym\\.adb, line $decimal\\.|\\. .2 locations.)" \ "set breakpoint at " delete_breakpoints