Enable qTStatus packet in case it is disabled
authorYao Qi <yao@codesourcery.com>
Wed, 8 Oct 2014 03:25:31 +0000 (11:25 +0800)
committerYao Qi <yao@codesourcery.com>
Sat, 11 Oct 2014 03:13:39 +0000 (11:13 +0800)
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".

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.server/server-kill.exp

index 14e2d5c0858b8552ac118f681159b460d058a844..348adffaacc18b170c3019893bcc4378bbe25bcc 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-11  Yao Qi  <yao@codesourcery.com>
+
+       * gdb.server/server-kill.exp: Execute command
+       "set remote trace-status-packet on" before "tstatus".
+
 2014-10-11  Yao Qi  <yao@codesourcery.com>
 
        * gdb.server/server-kill.c: Include sys/types.h and unistd.h.
index 83c11f2d0d4885c7d2700c904da0da5e0f2cc2a2..53d8e9a07c18be1a7e1bc5357d8ec9d2934f8132 100644 (file)
@@ -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\.}
This page took 0.036052 seconds and 4 git commands to generate.