diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-04-05 17:12:46 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-04-05 17:12:46 +0000 |
commit | bb3784283e3ddfb19761aabcc5ade9956e34b311 (patch) | |
tree | daa7163a406290ffcc15b95ec03b0aaf6b2a5a81 /gdb/testsuite/gdb.mi/mi-watch.exp | |
parent | 051568b4d03e758bfc57f55cfda27b65879edd7e (diff) | |
download | gdb-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/mi-watch.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-watch.exp | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index 2c2899b..dd999bc 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -132,38 +132,18 @@ proc test_watchpoint_triggering {type} { # -exec-continue (Here wp triggers) # -exec-continue (Here wp goes out of scope) - send_gdb "222-exec-continue\n" - gdb_expect { - -re "222\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_return_0\"\}\r\n$mi_gdb_prompt$" { - pass "watchpoint trigger" - } - -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"} - timeout {fail "watchpoint trigger (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (1)"} - timeout {fail "watchpoint trigger (timeout 1)"} - } + mi_execute_to "exec-continue" "watchpoint-trigger" "callee4" "" \ + ".*basics.c" $line_callee4_return_0 \ + {"" "wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\}"} \ + "watchpoint trigger" if { $type == "sw" } { setup_xfail *-*-* } - send_gdb "223-exec-continue\n" - gdb_expect { - -re "223\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee3_close_brace\"\}\r\n$mi_gdb_prompt$" { - pass "wp out of scope" - } - -re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"} - timeout {fail "wp out of scope (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "wp out of scope (1)"} - timeout {fail "wp out of scope (timeout 1)"} - } + mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \ + ".*basics.c" $line_callee3_close_brace \ + {"" "wpnum=\"2\""} \ + "watchpoint trigger" clear_xfail *-*-* } |