]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb, testsuite: add gdb_continue_to_breakpoint pattern
authorMarkus Metzger <markus.t.metzger@intel.com>
Thu, 21 Nov 2019 10:19:54 +0000 (11:19 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Tue, 17 Dec 2019 14:37:30 +0000 (15:37 +0100)
When setting a breakpoint on a function foo, GDB prints

    Breakpoint 1, foo (...) at ...

Add a gdb_test_multiple pattern in gdb_continue_to_breakpoint to allow
defining the function name as location_pattern.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
testsuite/
* lib/gdb.exp (gdb_continue_to_breakpoint): Add pattern.

Change-Id: I07f9389e1c9ff04891869fa223e144ea9d5097f3

gdb/testsuite/lib/gdb.exp

index 8b1ec62c9c21570f3d3cb4c9d3fa0bdce016876e..b6c5e009926ebb2a59e71933222ae7ea6c995813 100644 (file)
@@ -630,12 +630,15 @@ proc runto_main { } {
 ### continue_to_breakpoint should use a NAME which is unique within
 ### that test file.
 proc gdb_continue_to_breakpoint {name {location_pattern .*}} {
-    global gdb_prompt
+    global gdb_prompt decimal
     set full_name "continue to breakpoint: $name"
 
     set kfail_pattern "Process record does not support instruction 0xfae64 at.*"
     gdb_test_multiple "continue" $full_name {
-       -re "(?:Breakpoint|Temporary breakpoint) .* (at|in) $location_pattern\r\n$gdb_prompt $" {
+       -re "(?:Breakpoint|Temporary breakpoint) .*(at|in) $location_pattern\r\n$gdb_prompt $" {
+           pass $full_name
+       }
+       -re "(?:Breakpoint|Temporary breakpoint) $decimal, $location_pattern\r\n$gdb_prompt $" {
            pass $full_name
        }
        -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" {