summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-10-08 11:25:31 +0800
committerYao Qi <yao@codesourcery.com>2014-10-11 11:13:39 +0800
commit754dd2b00f2bd3f2d7aaacdb27375bc6faf1458e (patch)
treed387785f824df5ae374ad19f9e089fac4cbe69eb /gdb/testsuite/gdb.server
parentf90183d7e31b335b8a6048e46805509dc56332a4 (diff)
Enable qTStatus packet in case it is disabled
Nowadays, we are using command "tstatus" to send a packet to GDBserver in order to check the connection. However, on the target doesn't support tracepoint, the following error is emitted before sending any packet to GDBserver. tstatus^M Trace can not be run on this target.^M (gdb) FAIL: gdb.server/server-kill.exp: tstatus qTStatus is disabled after receiving the empty reply during connecting to the remote target. When the test executes command "tstatus" again, remote_get_trace_status returns -1 at the very beginning, and no RSP packet is sent out. This patch is to enable qTStatus packet again. gdb/testsuite: 2014-10-11 Yao Qi <yao@codesourcery.com> * gdb.server/server-kill.exp: Execute command "set remote trace-status-packet on" before "tstatus".
Diffstat (limited to 'gdb/testsuite/gdb.server')
-rw-r--r--gdb/testsuite/gdb.server/server-kill.exp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index 83c11f2d0d..53d8e9a07c 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -52,6 +52,11 @@ if {$server_pid == "" } {
remote_exec target "kill -9 $server_pid"
+# Enable trace status packet which is disabled after the connection
+# if the remote target doesn't support tracepoint at all. Otherwise,
+# no RSP packet is sent out.
+gdb_test_no_output "set remote trace-status-packet on"
+
# Force GDB to talk with GDBserver, so that we can get the
# "connection closed" error.
gdb_test "tstatus" {Remote connection closed|Remote communication error\. Target disconnected\.: Connection reset by peer\.}