diff options
author | Daniel Jacobowitz <drow@false.org> | 2010-01-28 22:14:12 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2010-01-28 22:14:12 +0000 |
commit | 4ea95be9cd61e0638c39e7ce15c96be7d5dbc950 (patch) | |
tree | 68e8132506409517681c242c43a6934e69535a9a /gdb/testsuite | |
parent | d37346f037e49c0ce3c4875a828fe1df85331638 (diff) | |
download | gdb-4ea95be9cd61e0638c39e7ce15c96be7d5dbc950.zip gdb-4ea95be9cd61e0638c39e7ce15c96be7d5dbc950.tar.gz gdb-4ea95be9cd61e0638c39e7ce15c96be7d5dbc950.tar.bz2 |
* gdb.mi/mi-nonstop.exp (mi_nonstop_resume): New function.
(Top level): Use it to resume.
* lib/mi-support.exp (mi_send_resuming_command_raw): Recognize
the Thumb mode displaced stepping error as unsupported.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-nonstop.exp | 19 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 10 |
3 files changed, 28 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d1cfb4b..68ef916 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2010-01-28 Daniel Jacobowitz <dan@codesourcery.com> + + * gdb.mi/mi-nonstop.exp (mi_nonstop_resume): New function. + (Top level): Use it to resume. + * lib/mi-support.exp (mi_send_resuming_command_raw): Recognize + the Thumb mode displaced stepping error as unsupported. + 2010-01-28 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/nsusing.exp: Added more tests. diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp index 605f48b..f83eed7 100644 --- a/gdb/testsuite/gdb.mi/mi-nonstop.exp +++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp @@ -22,6 +22,15 @@ if {[mi_gdb_start]} { continue } +proc mi_nonstop_resume { command test } { + if { [mi_send_resuming_command $command $test] != 0 } { + # If a resume fails, assume non-stop is broken or unsupported + # for this target. We have logged a FAIL or UNSUPPORTED; skip + # the remaining tests to limit timeouts. + return -code continue + } +} + # # Start here # @@ -60,7 +69,7 @@ if { [mi_run_to_main] < 0 } { mi_create_breakpoint break_at_me 2 keep break_at_me .* .* .* "breakpoint at marker" -mi_send_resuming_command "exec-continue" "resume 1" +mi_nonstop_resume "exec-continue" "resume 1" mi_expect_stop "breakpoint-hit" "break_at_me" ".*" "non-stop.c" ".*" {"" "disp=\"keep\""} "w0,i0 stop" mi_expect_stop "breakpoint-hit" "break_at_me" ".*" "non-stop.c" ".*" {"" "disp=\"keep\""} "w1,i0 stop" @@ -71,12 +80,12 @@ mi_create_varobj I_W0 "i" "create varobj in first thread" mi_gdb_test "-thread-select 3" "\\^done.*" "select thread 3" mi_create_varobj I_W1 "i" "create varobj in second thread" -mi_send_resuming_command "exec-continue --thread 2" "resume 1" +mi_nonstop_resume "exec-continue --thread 2" "resume 1" mi_check_thread_states {"running" "running" "stopped"} "thread state, resume 1" mi_expect_stop "breakpoint-hit" "break_at_me" ".*" "non-stop.c" ".*" {"" "disp=\"keep\""} "w0,i1 stop" mi_check_thread_states {"running" "stopped" "stopped"} "thread state, stop 2" -mi_send_resuming_command "exec-continue --thread 3" "resume 2" +mi_nonstop_resume "exec-continue --thread 3" "resume 2" mi_check_thread_states {"running" "stopped" "running"} "thread state, resume 2" mi_expect_stop "breakpoint-hit" "break_at_me" ".*" "non-stop.c" ".*" {"" "disp=\"keep\""} "w1,i1 stop" mi_check_thread_states {"running" "stopped" "stopped"} "thread state, stop 3" @@ -118,8 +127,8 @@ mi_expect_stop "breakpoint-hit" "break_at_me" ".*" "non-stop.c" ".*" {"" "disp=\ # running thread. mi_gdb_test "-break-condition --thread 1 2 id==1" "\\^done" "set condition, 1" -mi_send_resuming_command "exec-continue --thread 2" "resume 2" -mi_send_resuming_command "exec-continue --thread 3" "resume 3" +mi_nonstop_resume "exec-continue --thread 2" "resume 2" +mi_nonstop_resume "exec-continue --thread 3" "resume 3" sleep 2 mi_expect_stop "breakpoint-hit" "break_at_me" ".*" "non-stop.c" ".*" {"" "disp=\"keep\""} "w0,i3 stop" diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 373b366..360eceb 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1565,14 +1565,18 @@ proc mi_send_resuming_command_raw {command test} { # as real failure. return 0 } - -re ".*${mi_gdb_prompt}" { - fail "$test (failed to resume)" - return -1 + -re "\\^error,msg=\"Displaced stepping is only supported in ARM mode\".*" { + unsupported "$test (Thumb mode)" + return -1 } -re "\\^error,msg=.*" { fail "$test (MI error)" return -1 } + -re ".*${mi_gdb_prompt}" { + fail "$test (failed to resume)" + return -1 + } timeout { fail "$test" return -1 |