aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/target.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-06-17 20:28:14 +0000
committerDaniel Jacobowitz <drow@false.org>2003-06-17 20:28:14 +0000
commit6ad8ae5c579e2e6198870b21d10459edba9457ca (patch)
tree9d71b7266e55d4d44bf3a28736465e9f2d7132bc /gdb/gdbserver/target.h
parent687595f963bb32dd89d85bdf91e7ca6aa3187502 (diff)
downloadgdb-6ad8ae5c579e2e6198870b21d10459edba9457ca.zip
gdb-6ad8ae5c579e2e6198870b21d10459edba9457ca.tar.gz
gdb-6ad8ae5c579e2e6198870b21d10459edba9457ca.tar.bz2
gdb/
* NEWS: Mention gdbserver detach change and "disconnect" command. * infcmd.c (disconnect_command): New function. (_initialize_infcmd): Add ``disconnect'' command. * remote.c (remote_async_detach): Delete. (remote_detach): Merge remote_async_detach. (remote_disconnect): New. (init_remote_ops): Set to_disconnect. (init_remote_cisco_ops): Likewise. (init_remote_async_ops): Likewise. Use remote_detach. * target.c (cleanup_target): Default to_disconnect. (update_current_target): Inherit to_disconnect. (target_disconnect, debug_to_disconnect): New functions. (setup_target_debug): Set to_disconnect. * target.h (struct target_ops): Add to_disconnect. (target_disconnect): Add prototype. gdbserver/ * linux-low.c: Move comment to linux_thread_alive where it belonged. (linux_detach_one_process, linux_detach): New functions. (linux_target_ops): Add linux_detach. * server.c (main): Handle 'D' packet. * target.h (struct target_ops): Add "detach" member. (detach_inferior): Define. mi/ * mi-cmds.c (mi_cmds): Add "-target-disconnect".
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r--gdb/gdbserver/target.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index c09ac8d..1c47a3ae 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -48,6 +48,10 @@ struct target_ops
void (*kill) (void);
+ /* Detach from all inferiors. */
+
+ void (*detach) (void);
+
/* Return 1 iff the thread with process ID PID is alive. */
int (*thread_alive) (int pid);
@@ -122,6 +126,9 @@ void set_target_ops (struct target_ops *);
#define kill_inferior() \
(*the_target->kill) ()
+#define detach_inferior() \
+ (*the_target->detach) ()
+
#define mythread_alive(pid) \
(*the_target->thread_alive) (pid)