* [RFA] Fix problem with extended-remote if multi_process is zero
@ 2009-06-23 22:57 Pierre Muller
2009-06-24 15:14 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Pierre Muller @ 2009-06-23 22:57 UTC (permalink / raw)
To: gdb-patches; +Cc: 'Pedro Alves'
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] Fix problem with extended-remote if multi_process is zero
2009-06-23 22:57 [RFA] Fix problem with extended-remote if multi_process is zero Pierre Muller
@ 2009-06-24 15:14 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2009-06-24 15:14 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Tuesday 23 June 2009 23:56:59, Pierre Muller wrote:
> 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.
Ok, reluntantly. I don't like much that the magic pid
ends up visible in the wire, but I can't see any other
harm...
--
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-24 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-23 22:57 [RFA] Fix problem with extended-remote if multi_process is zero Pierre Muller
2009-06-24 15:14 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox