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]

[RFA] Fix problem with extended-remote if multi_process is zero


   The patch below fixes a problem
leading to a crash of gdbserver
if target extended-remote is used on
targets not supporting multi process.

  OK to commit?

Pierre

2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>

	* server.c (handle_v_kill): Pass signal_pid to
	kill_inferior if multi_process is zero.

Index: src/gdb/gdbserver/server.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.c,v
retrieving revision 1.99
diff -u -p -r1.99 server.c
--- src/gdb/gdbserver/server.c	23 Jun 2009 15:12:44 -0000	1.99
+++ src/gdb/gdbserver/server.c	23 Jun 2009 22:49:34 -0000
@@ -1523,8 +1523,10 @@ handle_v_kill (char *own_buf)
 {
   int pid;
   char *p = &own_buf[6];
-
-  pid = strtol (p, NULL, 16);
+  if (multi_process)
+    pid = strtol (p, NULL, 16);
+  else
+    pid = signal_pid;
   if (pid != 0 && kill_inferior (pid) == 0)
     {
       last_status.kind = TARGET_WAITKIND_SIGNALLED;


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