From 9db9f4a7a1d66ab0180cc53c9daa3409021f1fa3 Mon Sep 17 00:00:00 2001 From: Markus Metzger Date: Thu, 21 Nov 2019 11:19:54 +0100 Subject: [PATCH] gdb, testsuite: add gdb_continue_to_breakpoint pattern 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 testsuite/ * lib/gdb.exp (gdb_continue_to_breakpoint): Add pattern. Change-Id: I07f9389e1c9ff04891869fa223e144ea9d5097f3 --- gdb/testsuite/lib/gdb.exp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 8b1ec62c9c2..b6c5e009926 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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 $" { -- 2.47.2