diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2014-05-13 17:07:33 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2014-05-15 15:41:36 -0400 |
commit | 3deb39c62d3cdb80ac3bdd4d418e05737433e7a6 (patch) | |
tree | 67c8030d33d5881f525fe1639bf8b8c5934e6837 /gdb/testsuite | |
parent | 5fe7ffdc98b769de3ea67e6f38bc5de57be7b265 (diff) | |
download | gdb-3deb39c62d3cdb80ac3bdd4d418e05737433e7a6.zip gdb-3deb39c62d3cdb80ac3bdd4d418e05737433e7a6.tar.gz gdb-3deb39c62d3cdb80ac3bdd4d418e05737433e7a6.tar.bz2 |
Fix mi_expect_stop for non-zero exit codes
The message displayed by gdb is different when the inferior exits with
zero and non-zero values, this fix takes that into account.
gdb/testsuite/ChangeLog:
2014-05-13 Simon Marchi <simon.marchi@ericsson.com>
* lib/mi-support.exp (mi_expect_stop): Expect message for
inferiors that exit with non-zero exit code.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 836deb7..aaab227 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-05-15 Simon Marchi <simon.marchi@ericsson.com> + + * lib/mi-support.exp (mi_expect_stop): Expect message for + inferiors that exit with non-zero exit code. + 2014-05-14 Yao Qi <yao@codesourcery.com> * gdb.mi/mi-file.exp (test_file_list_exec_source_file): Don't diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index ad58775..4478ba0 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1068,6 +1068,20 @@ proc mi_expect_stop { reason func args file line extra test } { } return } + if { $reason == "exited" } { + gdb_expect { + -re "\\*stopped,reason=\"exited\",exit-code=\"\[0-7\]+\"\r\n$prompt_re" { + pass "$test" + } + -re ".*$mi_gdb_prompt$" { + fail "$test (inferior not stopped)" + } + timeout { + fail "$test (unknown output after running)" + } + } + return + } if { $reason == "solib-event" } { set pattern "\\*stopped,reason=\"solib-event\",thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re|$breakpoint_re)*$prompt_re" |