This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Add reply to qC packet to gdbserver


Hi,

this is the reworked patch (see: http://sourceware.org/ml/gdb-patches/2007-05/msg00247.html) for adding replies to qC packets to gdbserver.

Test suite showed no regressions on x86. Is this ok to commit?


ChangeLog: * gdbserver/server.c (handle_query): Add reply for qC packet.

--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com

diff -urN src/gdb/gdbserver/server.c dev/gdb/gdbserver/server.c
--- src/gdb/gdbserver/server.c	2007-03-29 05:37:17.000000000 +0200
+++ dev/gdb/gdbserver/server.c	2007-04-27 12:31:45.000000000 +0200
@@ -259,6 +259,14 @@
 {
   static struct inferior_list_entry *thread_ptr;
 
+  /* Reply the current thread id.  */
+  if (strcmp ("qC", own_buf) == 0)
+    {
+      sprintf (own_buf, "QC%lx",
+        ((struct inferior_list_entry *) current_inferior)->id);
+      return;
+    }
+
   if (strcmp ("qSymbol::", own_buf) == 0)
     {
       if (the_target->look_up_symbols != NULL)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]