From ca539be87d462a966f18524bd8656c7d5a1e1c4f Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 28 Oct 2011 08:32:35 +0000 Subject: [PATCH] gdb/testsuite/ * lib/mi-support.exp (breakpoint_re): Suppress match reporting. (mi_gdb_test): Import globals thread_selected_re and breakpoint_re. Expect them optionally at the regex start. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/lib/mi-support.exp | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5bb77c2edf4..8e2145ee3d0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Jan Kratochvil + + * lib/mi-support.exp (breakpoint_re): Suppress match reporting. + (mi_gdb_test): Import globals thread_selected_re + and breakpoint_re. Expect them optionally at the regex start. + 2011-10-27 Doug Evans * gdb.python/python.exp: Test source -s. diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index c8ec00d0e85..fd57de1ab35 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -32,7 +32,7 @@ set MIFLAGS "-i=mi" set thread_selected_re "=thread-selected,id=\"\[0-9\]+\"\r\n" set library_loaded_re "=library-loaded\[^\n\]+\"\r\n" -set breakpoint_re "=(breakpoint-created|breakpoint-deleted)\[^\n\]+\"\r\n" +set breakpoint_re "=(?:breakpoint-created|breakpoint-deleted)\[^\n\]+\"\r\n" # # mi_gdb_exit -- exit the GDB, killing the target program if necessary @@ -576,7 +576,7 @@ proc mi_gdb_test { args } { global verbose global mi_gdb_prompt global GDB expect_out - global inferior_exited_re + global inferior_exited_re thread_selected_re breakpoint_re upvar timeout timeout set command [lindex $args 0] @@ -668,7 +668,7 @@ proc mi_gdb_test { args } { gdb_start set result -1 } - -re "^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" { + -re "^(?:$thread_selected_re|$breakpoint_re)*($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" { # At this point, $expect_out(1,string) is the MI input command. # and $expect_out(2,string) is the MI output command. # If $expect_out(1,string) is "", then there was no MI input command here. -- 2.30.2