diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-06-25 14:32:34 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-06-25 14:32:34 +0000 |
commit | a2840c355960fdc116b12bd02abba2c5b9a9a653 (patch) | |
tree | 2b8b55099387c6e59328a04b599bb02d6f5f7ab3 /gdb/testsuite/gdb.mi/mi-async.exp | |
parent | 7413f23fb41cf2a09614c4db4703074ae878ee89 (diff) | |
download | gdb-a2840c355960fdc116b12bd02abba2c5b9a9a653.zip gdb-a2840c355960fdc116b12bd02abba2c5b9a9a653.tar.gz gdb-a2840c355960fdc116b12bd02abba2c5b9a9a653.tar.bz2 |
Emit ^running via observer.
* mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
^running here.
(mi_on_resume): Print ^running if not previously output.
* mi/mi-main.c (running_result_record_printed): New.
(captured_mi_execute_command): Reset
running_result_record_printed. Use running_result_record_printed
to decide if we should skip ^done.
(mi_execute_async_cli_command): Don't print ^running here.
* mi/mi-main.h (current_token, running_result_record_printed):
Declare.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-async.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-async.exp | 68 |
1 files changed, 7 insertions, 61 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp index d2e3b47..9ac91fd 100644 --- a/gdb/testsuite/gdb.mi/mi-async.exp +++ b/gdb/testsuite/gdb.mi/mi-async.exp @@ -59,72 +59,18 @@ proc linux_async_tests {} { set line_main_body [expr $line_main_head + 2] set line_main_next [expr $line_main_head + 3] - send_gdb "start\n" - gdb_expect { - -re ".*\\^running\r\n\\^done\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\\*stopped,thread-id=\"0|1\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" { - pass "Asynchronous response after start command" - } - -re ".*$mi_gdb_prompt$" { - fail "Asynchronous response after start command (2)" - } - timeout { - fail "Asynchronous response after start command (timeout 2)" - } - } - } - -re ".*$mi_gdb_prompt$" { - fail "Asynchronous response after start command (1)" - } - timeout {fail "Asynchronous response after start command (timeout 1)"} - } - - send_gdb "next\n" - gdb_expect { - -re "\\^running\r\n\\^done\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\\*stopped,reason=\"end-stepping-range\",thread-id=\"0|1\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_next\"\}\r\n$mi_gdb_prompt$" { - pass "Asynchronous response after next command" - } - -re ".*$mi_gdb_prompt$" { - fail "Asynchronous response after next command (2)" - } - timeout { - fail "Asynchronous response after next command (timeout 2)" - } - } - } - -re ".*$mi_gdb_prompt$" { - fail "Asynchronous response after next command (1)" - } - timeout {fail "Asynchronous response after next command (timeout 1)"} - } + mi_send_resuming_command_raw "start" "start: send" + mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" "$line_main_body" { "" "disp=\"del\"" } "start: stop" + + mi_send_resuming_command_raw "next" "CLI next: send" + mi_expect_stop "end-stepping-range" "main" "" ".*basics.c" "$line_main_next" "" "CLI next: stop" mi_gdb_test "-exec-interrupt" \ "" \ "" - send_gdb "start\n" - gdb_expect { - -re ".*\\^running\r\n\\^done\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\\*stopped,thread-id=\"0|1\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" { - pass "Asynchronous response after (re) start" - } - -re ".*$mi_gdb_prompt$" { - fail "Asynchronous response after (re) start (2)" - } - timeout { - fail "Asynchronous response after (re) start (timeout 2)" - } - } - } - -re ".*$mi_gdb_prompt$" { - fail "Asynchronous response after (re) start (1)" - } - timeout {fail "Asynchronous response after (re) start (timeout 1)"} - } + mi_send_resuming_command_raw "start" "restart: send" + mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" "$line_main_body" { "" "disp=\"del\"" } "restart: stop" } |