This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix qC handling in gdbserver
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>, drow at false dot org
- Date: Wed, 02 May 2007 18:16:28 +0200
- Subject: Re: [rfc] Fix qC handling in gdbserver
- References: <4631ADC8.6000603@de.ibm.com> <20070427112726.GA15057@caradoc.them.org>
Hi,
Daniel Jacobowitz wrote:
GDB is opening /proc/pid on the _local_ machine. That's silly.
gdbserver is usually running on a remote machine; it's only on the
local machine during native testing. The testcase fails because info
proc only works for native targets.
thank you again for your input. The patch attached disables gdb.base/info-proc.exp
for remote targets.
Is this ok?
ChangeLog:
* gdb.base/info-proc.exp: Check is_remote.
Btw,
shall I rework the qC-Patch () and remove the space? Like
+ /* Reply the current thread id. */
+ if (strcmp ("qC", own_buf) == 0)
+ {
+ sprintf (own_buf, "QC%lx",
+ ((struct inferior_list_entry *) current_inferior)->id);
+ return;
+ }
? Would that be ok for mainline? I wonder why the manual contains qC packets
while gdb does not? Is this a new feature or one that should be removed from manual rather?
Thanks in advance.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urN src/gdb/testsuite/gdb.base/info-proc.exp dev/gdb/testsuite/gdb.base/info-proc.exp
--- src/gdb/testsuite/gdb.base/info-proc.exp 2007-01-09 18:59:11.000000000 +0100
+++ dev/gdb/testsuite/gdb.base/info-proc.exp 2007-05-02 18:04:33.000000000 +0200
@@ -24,6 +24,10 @@
strace $tracelevel
}
+if { [is_remote target] } then {
+ continue
+}
+
set prms_id 0
set bug_id 0