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]

[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')
 	{
 	  ;



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