This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH]: Add reply to qC packet to gdbserver
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: Daniel Jacobowitz <drow at false dot org>, GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Tue, 15 May 2007 19:41:19 +0200
- Subject: Re: [PATCH]: Add reply to qC packet to gdbserver
- References: <4649306A.6090404@de.ibm.com> <20070515104946.GA26259@caradoc.them.org>
Daniel Jacobowitz wrote:
On Tue, May 15, 2007 at 06:00:42AM +0200, Markus Deuling wrote:
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?
It should use thread_to_gdb_id, just like qfThreadInfo. Otherwise OK.
Thanks again. I guess this is the patch then :-) Testsuite showed no regressions.
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-05-11 14:04:57.000000000 +0200
+++ dev/gdb/gdbserver/server.c 2007-05-15 19:23:15.000000000 +0200
@@ -259,6 +259,15 @@
{
static struct inferior_list_entry *thread_ptr;
+ /* Reply the current thread id. */
+ if (strcmp ("qC", own_buf) == 0)
+ {
+ thread_ptr = all_threads.head;
+ sprintf (own_buf, "QC%x",
+ thread_to_gdb_id ((struct thread_info *)thread_ptr));
+ return;
+ }
+
if (strcmp ("qSymbol::", own_buf) == 0)
{
if (the_target->look_up_symbols != NULL)