This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/3] Use command "monitor set debug 0" to check the connection
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: <palves at redhat dot com>
- Date: Wed, 8 Oct 2014 14:27:59 +0800
- Subject: [PATCH 3/3] Use command "monitor set debug 0" to check the connection
- Authentication-results: sourceware.org; auth=none
- References: <543404EF dot 4010306 at redhat dot com> <1412749679-27076-1-git-send-email-yao at codesourcery dot com>
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
We have to choose other commands which exists on different targets, and
send a RSP packet to GDBserver. "monitor set debug 0" is a good one.
gdb/testsuite:
2014-10-08 Yao Qi <yao@codesourcery.com>
* gdb.server/server-kill.exp: Execute command "monitor set debug 0"
instead of "tstatus".
---
gdb/testsuite/gdb.server/server-kill.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index 0f808a9..a2e65a4 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -53,4 +53,4 @@ remote_exec target "kill -9 $server_pid"
# 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\.}
+gdb_test "monitor set debug 0" {Remote connection closed|Remote communication error\. Target disconnected\.: Connection reset by peer\.}
--
1.9.3