mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
2005-09-11 Bob Rossi <bob@brasko.net>
* lib/mi-support.exp (mi_gdb_test): Change -re to not be anchored. * gdb.mi/mi-syn-frame.exp: Call mi_gdb_test twice instead of once for commands that return an MI output command and an asyncronous MI output command. * gdb.mi/mi-console.exp: Ditto.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2005-09-11 Bob Rossi <bob@brasko.net>
|
||||||
|
|
||||||
|
* lib/mi-support.exp (mi_gdb_test): Change -re to not be anchored.
|
||||||
|
* gdb.mi/mi-syn-frame.exp: Call mi_gdb_test twice instead of once for
|
||||||
|
commands that return an MI output command and an asyncronous MI output
|
||||||
|
command.
|
||||||
|
* gdb.mi/mi-console.exp: Ditto.
|
||||||
|
|
||||||
2005-09-11 Bob Rossi <bob@brasko.net>
|
2005-09-11 Bob Rossi <bob@brasko.net>
|
||||||
|
|
||||||
* gdb.mi/mi-var-child.c: Include <string.h>.
|
* gdb.mi/mi-var-child.c: Include <string.h>.
|
||||||
|
@ -59,14 +59,7 @@ mi_gdb_test "47-exec-next" \
|
|||||||
"Testing console output" \
|
"Testing console output" \
|
||||||
"Hello \\\\\"!\[\r\n\]+"
|
"Hello \\\\\"!\[\r\n\]+"
|
||||||
|
|
||||||
gdb_expect {
|
mi_gdb_test "" "47\\*stopped.*" "Finished step over hello"
|
||||||
-re "47\\*stopped.*$mi_gdb_prompt$" {
|
|
||||||
pass "Finished step over hello"
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
fail "Finished step over hello (timeout)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mi_gdb_exit
|
mi_gdb_exit
|
||||||
return 0
|
return 0
|
||||||
|
@ -35,8 +35,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
|||||||
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||||
}
|
}
|
||||||
|
|
||||||
set my_mi_gdb_prompt "\\(gdb\\)\[ \]*\[\r\n\]*"
|
|
||||||
|
|
||||||
mi_gdb_exit
|
mi_gdb_exit
|
||||||
mi_gdb_start separate-inferior-tty
|
mi_gdb_start separate-inferior-tty
|
||||||
mi_delete_breakpoints
|
mi_delete_breakpoints
|
||||||
@ -61,10 +59,12 @@ mi_gdb_test "402-stack-list-frames" "402\\^done,stack=\\\[frame=\{level=\"0\",ad
|
|||||||
# Continue back to main()
|
# Continue back to main()
|
||||||
#
|
#
|
||||||
mi_gdb_test "403-exec-continue" \
|
mi_gdb_test "403-exec-continue" \
|
||||||
"403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped" \
|
"403\\^running" \
|
||||||
"testing exec continue" \
|
"testing exec continue" \
|
||||||
"hi in foo\[\r\n\]\+"
|
"hi in foo\[\r\n\]\+"
|
||||||
|
|
||||||
|
mi_gdb_test "" "403\\*stopped" "finished exec continue"
|
||||||
|
|
||||||
mi_gdb_test "404-stack-list-frames 0 0" \
|
mi_gdb_test "404-stack-list-frames 0 0" \
|
||||||
"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
|
"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
|
||||||
"list stack frames"
|
"list stack frames"
|
||||||
@ -91,8 +91,9 @@ mi_gdb_test "407-stack-list-frames" \
|
|||||||
"list stack frames"
|
"list stack frames"
|
||||||
|
|
||||||
|
|
||||||
mi_gdb_test "408-exec-continue" \
|
mi_gdb_test "408-exec-continue" "408\\^running"
|
||||||
"408\\^running\[\r\n\]+${my_mi_gdb_prompt}408\\\*stopped"
|
|
||||||
|
mi_gdb_test "" "408\\*stopped.*" "finished exec continue"
|
||||||
|
|
||||||
mi_gdb_test "409-stack-list-frames 0 0" \
|
mi_gdb_test "409-stack-list-frames 0 0" \
|
||||||
"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
|
"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
|
||||||
|
@ -659,7 +659,15 @@ proc mi_gdb_test { args } {
|
|||||||
gdb_start
|
gdb_start
|
||||||
set result -1
|
set result -1
|
||||||
}
|
}
|
||||||
-re "\[\r\n\]*($pattern)\[\r\n\]+$mi_gdb_prompt\[ \]*$" {
|
-re "\[\r\n\]*($pattern)\[\r\n\]+$mi_gdb_prompt\[ \]*" {
|
||||||
|
# NOTE, there is no trailing anchor because with GDB/MI,
|
||||||
|
# asynchronous responses can happen at any point, causing more
|
||||||
|
# data to be available. Normally an anchor is used to make
|
||||||
|
# sure the end of the output is matched, however, $mi_gdb_prompt
|
||||||
|
# is just as good of an anchor since mi_gdb_test is meant to
|
||||||
|
# match a single mi output command. If a second GDB/MI output
|
||||||
|
# response is sent, it will be in the buffer for the next
|
||||||
|
# time mi_gdb_test is called.
|
||||||
if ![string match "" $message] then {
|
if ![string match "" $message] then {
|
||||||
pass "$message"
|
pass "$message"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user