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.
This commit is contained in:
Jan Kratochvil
2011-10-28 08:32:35 +00:00
parent e0c6ef61c6
commit ca539be87d
2 changed files with 9 additions and 3 deletions

View 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.

View 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.