diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-07-24 14:40:34 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-07-24 14:40:34 +0100 |
commit | 11e6c98f1b6318d27ad55f9ac7d362fe7a668872 (patch) | |
tree | 3de1f0e01606a639a9f229e8fc8ec69b727218eb /gdb | |
parent | 51aee833ed9c6bd67b0c0e4a8c7098a549e3d16d (diff) | |
download | gdb-11e6c98f1b6318d27ad55f9ac7d362fe7a668872.zip gdb-11e6c98f1b6318d27ad55f9ac7d362fe7a668872.tar.gz gdb-11e6c98f1b6318d27ad55f9ac7d362fe7a668872.tar.bz2 |
Test --wrapper when restarting process.
My patch series will affect the code starting inferior in GDBserver
(callees of start_inferior), so we need tests to cover how
start_inferior is used in different cases.
In server.c:process_serial_event, start_inferior is used when
GBDserver receives 'R' packet, and this patch is to add a test
for this path, and see how --wrapper option works when the process
is restarted.
gdb/testsuite:
2015-07-24 Yao Qi <yao.qi@linaro.org>
* gdb.server/ext-wrapper.exp: Test --wrapper option when
restarting process.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/ext-wrapper.exp | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a7938f1..53598d6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-07-24 Yao Qi <yao.qi@linaro.org> + * gdb.server/ext-wrapper.exp: Test --wrapper option when + restarting process. + +2015-07-24 Yao Qi <yao.qi@linaro.org> + * gdb.server/ext-restart.exp: New file. 2015-07-24 Yao Qi <yao.qi@linaro.org> diff --git a/gdb/testsuite/gdb.server/ext-wrapper.exp b/gdb/testsuite/gdb.server/ext-wrapper.exp index 9047400..7a28581 100644 --- a/gdb/testsuite/gdb.server/ext-wrapper.exp +++ b/gdb/testsuite/gdb.server/ext-wrapper.exp @@ -45,6 +45,26 @@ gdb_test "run" "Breakpoint.* marker .*" "run to marker" gdb_test "print d" "\\$${decimal} = ${hex} \"1\".*" +# Restart the process. +with_test_prefix "restart" { + # Disable vRun packet and clear remote exec-file, so that GDB will + # use R packet to restart the process. + gdb_test_no_output "set remote run-packet off" + gdb_test_no_output "set remote exec-file" + set test "run to marker" + gdb_test_multiple "run" $test { + -re {Start it from the beginning\? \(y or n\) $} { + send_gdb "y\n" + exp_continue + } + -re "Breakpoint.* marker .*\r\n$gdb_prompt $" { + pass $test + } + } + + gdb_test "print d" "\\$${decimal} = ${hex} \"1\".*" +} + gdb_test "kill" "" "kill" "Kill the program being debugged.*" "y" gdb_test_no_output "monitor exit" |