aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-05-04 20:20:12 +0000
committerDoug Evans <dje@google.com>2011-05-04 20:20:12 +0000
commit71f55dd81f0dd7ae6a73dd184902229ab0956aff (patch)
tree4b734b7a9f3e62fda4a6c11564a69ed0ddba4557 /gdb/gdbserver
parent4d393d60c43d163ca00d80abdf7544f99c9915e0 (diff)
downloadfsf-binutils-gdb-71f55dd81f0dd7ae6a73dd184902229ab0956aff.zip
fsf-binutils-gdb-71f55dd81f0dd7ae6a73dd184902229ab0956aff.tar.gz
fsf-binutils-gdb-71f55dd81f0dd7ae6a73dd184902229ab0956aff.tar.bz2
* linux-low.c (linux_join): Skip process lookup.
* spu-low.c (spu_join): Ditto. * server.c (join_inferiors_callback): Delete. (process_serial_event): For 'D' packet (detach) call join_inferior directly.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog8
-rw-r--r--gdb/gdbserver/linux-low.c5
-rw-r--r--gdb/gdbserver/server.c14
-rw-r--r--gdb/gdbserver/spu-low.c5
4 files changed, 9 insertions, 23 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 42b30a4..a29ee23 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-04 Doug Evans <dje@google.com>
+
+ * linux-low.c (linux_join): Skip process lookup.
+ * spu-low.c (spu_join): Ditto.
+ * server.c (join_inferiors_callback): Delete.
+ (process_serial_event): For 'D' packet (detach) call join_inferior
+ directly.
+
2011-05-04 Joseph Myers <joseph@codesourcery.com>
* README: Don't mention xscale*-*-linux*.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 23554db..d84fd68 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -878,11 +878,6 @@ static void
linux_join (int pid)
{
int status, ret;
- struct process_info *process;
-
- process = find_process_pid (pid);
- if (process == NULL)
- return;
do {
ret = my_waitpid (pid, &status, 0);
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 8b9133b..6bf6eaa 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -2442,17 +2442,6 @@ detach_or_kill_for_exit (void)
for_each_inferior (&all_processes, detach_or_kill_inferior_callback);
}
-static void
-join_inferiors_callback (struct inferior_list_entry *entry)
-{
- struct process_info *process = (struct process_info *) entry;
-
- /* If we are attached, then we can exit. Otherwise, we need to hang
- around doing nothing, until the child is gone. */
- if (!process->attached)
- join_inferior (ptid_get_pid (process->head.id));
-}
-
int
main (int argc, char *argv[])
{
@@ -2851,8 +2840,7 @@ process_serial_event (void)
/* If we are attached, then we can exit. Otherwise, we
need to hang around doing nothing, until the child is
gone. */
- for_each_inferior (&all_processes,
- join_inferiors_callback);
+ join_inferior (pid);
exit (0);
}
}
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index 93ed75a..898e46d 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -365,11 +365,6 @@ static void
spu_join (int pid)
{
int status, ret;
- struct process_info *process;
-
- process = find_process_pid (pid);
- if (process == NULL)
- return;
do {
ret = waitpid (pid, &status, 0);