aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi2-simplerun.exp
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-04-05 17:12:46 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-04-05 17:12:46 +0000
commitbb3784283e3ddfb19761aabcc5ade9956e34b311 (patch)
treedaa7163a406290ffcc15b95ec03b0aaf6b2a5a81 /gdb/testsuite/gdb.mi/mi2-simplerun.exp
parent051568b4d03e758bfc57f55cfda27b65879edd7e (diff)
downloadgdb-bb3784283e3ddfb19761aabcc5ade9956e34b311.zip
gdb-bb3784283e3ddfb19761aabcc5ade9956e34b311.tar.gz
gdb-bb3784283e3ddfb19761aabcc5ade9956e34b311.tar.bz2
* lib/mi-support.exp (mi_expect_stop): New.
(mi_run_cmd): Change the token. Use mi_send_resuming_command, use mi_expect_stop. (mi_execute_to_helper): Rename to mi_execute_to. (mi_send_resuming_command): Add more error patterns. (mi_wait_for_stop): Renamed to... (mi_get_stop_line): ...this. (mi_run_inline_test): Adjust. * gdb.mi/mi-cli.exp: Use mi_execute_to/mi_expect_stop. * gdb.mi/mi-console.exp: Likewise. * gdb.mi/mi-pending.exp: Likewise. * gdb.mi/mi-simplerun.exp: Likewise. * gdb.mi/mi-stack.exp: Likewise. * gdb.mi/mi-stepi.exp: Likewise. * gdb.mi/mi-syn-frame.exp: Add comment. * gdb.mi/mi-until.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi-watch.exp: Likewise. * gdb.mi/mi2-cli.exp: Likewise. * gdb.mi/mi2-console.exp: Likewise. * gdb.mi/mi2-simplerun.exp: Likewise. * gdb.mi/mi2-stack.exp: Likewise. * gdb.mi/mi2-stepi.exp: Likewise. * gdb.mi/mi2-until.exp: Likewise. * gdb.mi/mi2-var-display.exp: Likewise. * gdb.mi/mi2-watch.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi2-simplerun.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi2-simplerun.exp30
1 files changed, 2 insertions, 28 deletions
diff --git a/gdb/testsuite/gdb.mi/mi2-simplerun.exp b/gdb/testsuite/gdb.mi/mi2-simplerun.exp
index a036926..66ad03a 100644
--- a/gdb/testsuite/gdb.mi/mi2-simplerun.exp
+++ b/gdb/testsuite/gdb.mi/mi2-simplerun.exp
@@ -113,17 +113,7 @@ proc test_running_the_program {} {
# two prompts involved and this can lead to a race condition.
# The following is equivalent to a send_gdb "000-exec-run\n"
mi_run_cmd
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
- }
+ mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" "$line_main_body" "" "run to main"
}
proc test_controlled_execution {} {
@@ -191,23 +181,7 @@ proc test_program_termination {} {
# -exec-abort
# (normal termination of inferior)
- # FIXME: "stopped" doesn't seem appropriate.
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- send_gdb "999-exec-continue\n"
- gdb_expect {
- -re "999\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "999\\*stopped,reason=\"exited-normally\"\r\n$mi_gdb_prompt$" {
- pass "continue to end"
- }
- -re ".*$mi_gdb_prompt$" {fail "continue to end (2)"}
- timeout {fail "continue to end (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "continue to end (1)"}
- timeout {fail "continue to end (timeout 1)"}
- }
+ mi_execute_to "exec-continue" "exited-normally" "" "" "" "" "" "continue to end"
}
test_breakpoints_creation_and_listing