From: Tom Tromey Date: Sat, 15 Nov 2025 18:25:42 +0000 (-0700) Subject: Minor fixes to make gdb.objc tests pass X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b225f3d8bc4acd8ae9d2806436a718bfb79e25df;p=thirdparty%2Fbinutils-gdb.git Minor fixes to make gdb.objc tests pass Once the gdb.objc tests compile, you can see that they do not pass. The issue is primarily that they are over-strict about line numbers. This fixes the problem by replacing these line numbers with $decimal. --- diff --git a/gdb/testsuite/gdb.objc/basicclass.exp b/gdb/testsuite/gdb.objc/basicclass.exp index d1fb64a42de..2be5b2e83ef 100644 --- a/gdb/testsuite/gdb.objc/basicclass.exp +++ b/gdb/testsuite/gdb.objc/basicclass.exp @@ -89,36 +89,36 @@ do_objc_tests gdb_test "set breakpoint pending off" "" "set breakpoint pending" gdb_test "break doIt" \ - "Breakpoint.*at.* file .*$srcfile, line.29.*" \ + "Breakpoint.*at.* file .*$srcfile, line $decimal.*" \ "breakpoint method" gdb_test "break takeArg:" \ - "Breakpoint.*at.* file .*$srcfile, line.34.*" \ + "Breakpoint.*at.* file .*$srcfile, line $decimal.*" \ "breakpoint method with colon" gdb_test "break newWithArg:" \ - "Breakpoint.*at.* file .*$srcfile, line.22.*" \ + "Breakpoint.*at.* file .*$srcfile, line $decimal.*" \ "breakpoint class method with colon" # # Continue until breakpoint (test re-setting breakpoint) # gdb_test continue \ - "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass takeArg:. \\(self=.*, _cmd=.*, arg=.*\\) at .*$srcfile:34.*" \ + "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass takeArg:. \\(self=.*, _cmd=.*, arg=.*\\) at .*$srcfile:$decimal.*" \ "continue until method breakpoint" # # Test resetting breakpoints when re-running program # gdb_run_cmd -gdb_test "" "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*" "resetting breakpoints when rerunning" +gdb_test "" "Breakpoint .+,.*main .*argc.*argv.* at .*$srcfile:.*" "resetting breakpoints when rerunning" # # Continue until breakpoint (test re-setting breakpoint) # gdb_test continue \ - "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass takeArg:. \\(self=.*, _cmd=.*, arg=.*\\) at .*$srcfile:34.*" \ - "continue until method breakpoint" + "Continuing\\..*Breakpoint .+, -.BasicClass takeArg:. \\(self=.*, _cmd=.*, arg=.*\\) at .*$srcfile:$decimal.*" \ + "continue until method breakpoint again" # # Test printing objects @@ -139,7 +139,7 @@ gdb_test "print \*self" \ # Break in a category # gdb_test "break hiddenMethod" \ - "Breakpoint.*at.* file .*$srcfile, line.61." \ + "Breakpoint.*at.* file .*$srcfile, line $decimal." \ "breakpoint in category method" @@ -147,7 +147,7 @@ gdb_test "break hiddenMethod" \ # Continue until breakpoint (test re-setting category breakpoint) # gdb_test continue \ - "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass\\(Private\\) hiddenMethod. \\(self=.*, _cmd=.*\\) at .*$srcfile:61.*" \ + "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass\\(Private\\) hiddenMethod. \\(self=.*, _cmd=.*\\) at .*$srcfile:$decimal.*" \ "continue until category method" #