]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 Oct 2011 08:32:35 +0000 (08:32 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 Oct 2011 08:32:35 +0000 (08:32 +0000)
* 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
gdb/testsuite/lib/mi-support.exp

index 5bb77c2edf4274316820c0da127bb837c68a6fbd..8e2145ee3d019af0c9e83b7914984d88d469c0ec 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * 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  <dje@google.com>
 
        * gdb.python/python.exp: Test source -s.
index c8ec00d0e85c16f48464a07229c698ca642425a8..fd57de1ab35d7fb040052dd4ff21f6412f970793 100644 (file)
@@ -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.