diff options
author | Pedro Alves <palves@redhat.com> | 2010-04-12 17:39:42 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-04-12 17:39:42 +0000 |
commit | 505106cdc7c816a44bbfee11daf500f4e5e14072 (patch) | |
tree | 3d597594a2631f14b55ffe8e38f0b0125b785dd6 /gdb/gdbserver | |
parent | 58f03a4028987eef6b222b41d49e1f5781510b7c (diff) | |
download | gdb-505106cdc7c816a44bbfee11daf500f4e5e14072.zip gdb-505106cdc7c816a44bbfee11daf500f4e5e14072.tar.gz gdb-505106cdc7c816a44bbfee11daf500f4e5e14072.tar.bz2 |
gdb/gdbserver/
* linux-low.c (linux_mourn): Also remove the process.
* server.c (handle_target_event): Don't remove the process here.
* nto-low.c (nto_mourn): New.
(nto_target_ops): Install it.
* spu-low.c (spu_mourn): New.
(spu_target_ops): Install it.
* win32-low.c (win32_mourn): New.
(win32_target_ops): Install it.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/nto-low.c | 8 | ||||
-rw-r--r-- | gdb/gdbserver/server.c | 5 | ||||
-rw-r--r-- | gdb/gdbserver/spu-low.c | 8 | ||||
-rw-r--r-- | gdb/gdbserver/win32-low.c | 8 |
6 files changed, 36 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index c190ed7..2965f36 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,17 @@ 2010-04-12 Pedro Alves <pedro@codesourcery.com> + gdb/gdbserver/ + * linux-low.c (linux_mourn): Also remove the process. + * server.c (handle_target_event): Don't remove the process here. + * nto-low.c (nto_mourn): New. + (nto_target_ops): Install it. + * spu-low.c (spu_mourn): New. + (spu_target_ops): Install it. + * win32-low.c (win32_mourn): New. + (win32_target_ops): Install it. + +2010-04-12 Pedro Alves <pedro@codesourcery.com> + * server.h (buffer_xml_printf): Remove redundant `;'. 2010-04-12 Pedro Alves <pedro@codesourcery.com> diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index fcdcc45..9692f21 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -901,6 +901,8 @@ linux_mourn (struct process_info *process) free (priv->arch_private); free (priv); process->private = NULL; + + remove_process (process); } static void diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c index 8542082..17548a4 100644 --- a/gdb/gdbserver/nto-low.c +++ b/gdb/gdbserver/nto-low.c @@ -406,6 +406,12 @@ nto_detach (int pid) return 0; } +static void +nto_mourn (struct process_info *process) +{ + remove_process (process); +} + /* Check if the given thread is alive. Return 1 if alive, 0 otherwise. */ @@ -900,7 +906,7 @@ static struct target_ops nto_target_ops = { nto_attach, nto_kill, nto_detach, - NULL, /* nto_mourn */ + nto_mourn, NULL, /* nto_join */ nto_thread_alive, nto_resume, diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 8666bcd..423a993 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2999,10 +2999,7 @@ handle_target_event (int err, gdb_client_data client_data) if (last_status.kind == TARGET_WAITKIND_EXITED || last_status.kind == TARGET_WAITKIND_SIGNALLED) - { - mourn_inferior (process); - remove_process (process); - } + mourn_inferior (process); if (forward_event) { diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index d171abc..d9ac815 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -355,6 +355,12 @@ spu_detach (int pid) } static void +spu_mourn (struct process_info *process) +{ + remove_process (process); +} + +static void spu_join (int pid) { int status, ret; @@ -606,7 +612,7 @@ static struct target_ops spu_target_ops = { spu_attach, spu_kill, spu_detach, - NULL, /* mourn */ + spu_mourn, spu_join, spu_thread_alive, spu_resume, diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index ea5de4c..dfdb883 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -763,6 +763,12 @@ win32_detach (int pid) return 0; } +static void +win32_mourn (struct process_info *process) +{ + remove_process (process); +} + /* Wait for inferiors to end. */ static void win32_join (int pid) @@ -1752,7 +1758,7 @@ static struct target_ops win32_target_ops = { win32_attach, win32_kill, win32_detach, - NULL, + win32_mourn, win32_join, win32_thread_alive, win32_resume, |