This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[gdbserver] (9/11) Relax the pid format
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: gdb-patches at sourceware dot org, Lerele <lerele at champenstudios dot com>
- Date: Mon, 12 Nov 2007 02:08:38 +0000
- Subject: [gdbserver] (9/11) Relax the pid format
Hi,
On Windows CE the PIDs are really handles, so they are
most frequently represented in hex. Only accepting decimal
on the --attach command line argument is a bit annoying.
Would it be ok to relax the bases supported ?
Cheers,
Pedro Alves
2007-11-12 Pedro Alves <pedro_alves@portugalmail.pt>
* server.c (main): Relax numerical bases supported for the pid of
the --attach command line argument.
---
gdb/gdbserver/server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: src/gdb/gdbserver/server.c
===================================================================
--- src.orig/gdb/gdbserver/server.c 2007-11-11 23:12:50.000000000 +0000
+++ src/gdb/gdbserver/server.c 2007-11-11 23:16:20.000000000 +0000
@@ -875,7 +875,7 @@ main (int argc, char *argv[])
{
if (argc == 4
&& argv[3][0] != '\0'
- && (pid = strtoul (argv[3], &arg_end, 10)) != 0
+ && (pid = strtoul (argv[3], &arg_end, 0)) != 0
&& *arg_end == '\0')
{
;