diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-05-24 15:37:25 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-05-24 15:37:25 +0000 |
commit | 8f56dad4bb60fea7282951a7945c4c98fc0e8379 (patch) | |
tree | 854e7a6e0fa18cbf7293ac51259f120246b8aeae | |
parent | c588eb206cd868c1630b93ac1449aa003f1806ad (diff) | |
download | gdb-8f56dad4bb60fea7282951a7945c4c98fc0e8379.zip gdb-8f56dad4bb60fea7282951a7945c4c98fc0e8379.tar.gz gdb-8f56dad4bb60fea7282951a7945c4c98fc0e8379.tar.bz2 |
gdb/testsuite/
PR testsuite/12649
* gdb.mi/mi-dprintf.exp (mi_continue_dprintf) (mi 2nd dprintf): Replace
$mi_gdb_prompt expectation by mi_expect_stop.
(mi 1st dprintf, agent, mi 2nd dprintf, agent)
(mi info dprintf second time): Replace them by mi_send_resuming_command
and mi_expect_stop.
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-dprintf.exp | 26 |
2 files changed, 31 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 14b5945..3428dde 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2013-05-24 Jan Kratochvil <jan.kratochvil@redhat.com> + + PR testsuite/12649 + * gdb.mi/mi-dprintf.exp (mi_continue_dprintf) (mi 2nd dprintf): Replace + $mi_gdb_prompt expectation by mi_expect_stop. + (mi 1st dprintf, agent, mi 2nd dprintf, agent) + (mi info dprintf second time): Replace them by mi_send_resuming_command + and mi_expect_stop. + 2013-05-24 Gary Benson <gbenson@redhat.com> * gdb.base/solib-disc.exp (exec_opts): Remove unnecesary diff --git a/gdb/testsuite/gdb.mi/mi-dprintf.exp b/gdb/testsuite/gdb.mi/mi-dprintf.exp index ea8b3a8..3509963 100644 --- a/gdb/testsuite/gdb.mi/mi-dprintf.exp +++ b/gdb/testsuite/gdb.mi/mi-dprintf.exp @@ -83,7 +83,7 @@ proc mi_continue_dprintf {args} { set msg "mi 2nd dprintf" mi_send_resuming_command "exec-continue" "$msg continue" gdb_expect { - -re ".*At foo entry.*arg=1235, g=2222.*$mi_gdb_prompt$" { + -re ".*At foo entry.*arg=1235, g=2222" { pass $msg } -re ".*$mi_gdb_prompt$" { @@ -93,6 +93,7 @@ proc mi_continue_dprintf {args} { fail $msg } } + mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "$msg 2nd stop" } } @@ -135,11 +136,28 @@ gdb_expect { if $target_can_dprintf { mi_run_cmd - mi_gdb_test "continue" ".*breakpoint-hit.*func=\"foo\".*" "mi 1st dprintf, agent" + mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "mi expect stop" - mi_gdb_test "continue" ".*breakpoint-hit.*func=\"foo\".*" "mi 2nd dprintf, agent" + mi_send_resuming_command "exec-continue" "mi 1st dprintf continue, agent" + mi_expect_stop ".*" "foo" ".*" ".*" ".*" "" "mi 1st dprintf, agent" - mi_gdb_test "6-break-info" ".*modified.*" "mi info dprintf second time" + mi_send_resuming_command "exec-continue" "mi 2nd dprintf continue, agent" + + # The =breakpoint-modified text is a part of the "-exec-continue" output. + set msg "mi info dprintf second time" + gdb_expect { + -re "=breakpoint-modified," { + pass $msg + } + -re ".*$mi_gdb_prompt$" { + fail "$msg" + } + timeout { + fail "$msg" + } + } + + mi_expect_stop ".*" "foo" ".*" ".*" ".*" "" "mi 2nd dprintf, agent" } mi_gdb_test "set dprintf-style foobar" ".*error.*" "mi set dprintf style to an unrecognized type" |