diff options
author | Pedro Alves <palves@redhat.com> | 2007-05-10 21:05:15 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2007-05-10 21:05:15 +0000 |
commit | 444d61395b63ff0474e8d150497ac709cf6702f6 (patch) | |
tree | 5cd2142151c86c22047df4e3095d3ba89bd96503 /gdb/gdbserver/target.h | |
parent | 1d5315fee9335ecba7d345e41e451caa1d604114 (diff) | |
download | gdb-444d61395b63ff0474e8d150497ac709cf6702f6.zip gdb-444d61395b63ff0474e8d150497ac709cf6702f6.tar.gz gdb-444d61395b63ff0474e8d150497ac709cf6702f6.tar.bz2 |
* target.h (target_ops): Change return type of detach to int.
Add join.
(join_inferior): New.
* server.c (main): Don't skip detach support on mingw32.
If the inferior doesn't support detaching return error.
Call join_inferior instead of using waitpid.
* linux-low.c (linux_join): New.
(linux_target_op): Add linux_join.
* spu-low.c (spu_join): New.
(spu_target_ops): Add spu_join.
* win32-low.c (win32_detach): Adapt to new interface.
Reopen current_process_handle before detaching. Issue a child
resume before detaching.
(win32_join): New.
(win32_target_op): Add win32_join.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r-- | gdb/gdbserver/target.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index 36cc69a..66511c9 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -69,9 +69,14 @@ struct target_ops void (*kill) (void); - /* Detach from all inferiors. */ + /* Detach from all inferiors. + Return -1 on failure, and 0 on success. */ - void (*detach) (void); + int (*detach) (void); + + /* Wait for inferiors to end. */ + + void (*join) (void); /* Return 1 iff the thread with process ID PID is alive. */ @@ -207,6 +212,9 @@ void set_target_ops (struct target_ops *); #define store_inferior_registers(regno) \ (*the_target->store_registers) (regno) +#define join_inferior() \ + (*the_target->join) () + unsigned char mywait (char *statusp, int connected_wait); int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len); |