From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Cc: "'Pedro Alves'" <pedro@codesourcery.com>
Subject: [RFA] Fix problem with extended-remote if multi_process is zero
Date: Tue, 23 Jun 2009 22:57:00 -0000 [thread overview]
Message-ID: <000e01c9f455$eaee40d0$c0cac270$@u-strasbg.fr> (raw)
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;
next reply other threads:[~2009-06-23 22:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 22:57 Pierre Muller [this message]
2009-06-24 15:14 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000e01c9f455$eaee40d0$c0cac270$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox