diff options
author | Pedro Alves <palves@redhat.com> | 2009-04-01 22:31:45 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-04-01 22:31:45 +0000 |
commit | 5b1c542ea1c4ff247db390bd24a9e0665d0c2e48 (patch) | |
tree | 0596b3d42d4fdcbe13c72e148774b85d1795ff13 /gdb/gdbserver/server.h | |
parent | 2bd7c093f663139ad9e57ddc748ade12f6bfbe01 (diff) | |
download | gdb-5b1c542ea1c4ff247db390bd24a9e0665d0c2e48.zip gdb-5b1c542ea1c4ff247db390bd24a9e0665d0c2e48.tar.gz gdb-5b1c542ea1c4ff247db390bd24a9e0665d0c2e48.tar.bz2 |
Decouple target code from remote protocol.
* target.h (enum target_waitkind): New.
(struct target_waitstatus): New.
(struct target_ops) <wait>: Return an unsigned long. Take a
target_waitstatus pointer instead of a char pointer.
(mywait): Likewise.
* target.c (mywait): Change prototype to return an unsigned long.
Take a target_waitstatus pointer instead of a char pointer. Adjust.
* server.h (thread_from_wait, old_thread_from_wait): Delete
declarations.
(prepare_resume_reply): Change prototype to take a
target_waitstatus.
* server.c (thread_from_wait, old_thread_from_wait): Delete.
(last_status, last_ptid): New.
(start_inferior): Remove "statusptr" argument. Adjust. Return a
pid instead of a signal.
(attach_inferior): Remove "status" and "signal" parameters.
Adjust.
(handle_query): For qGetTLSAddr, parse the thread id with strtol,
not as an address.
(handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
(handle_v_requests, myresume): Remove "status" and "signal"
parameters. Adjust.
(handle_status): New.
(main): Delete local `status'. Adjust.
* remote-utils.c: Include target.h.
(prepare_resume_reply): Change prototype to take a
target_waitstatus. Adjust.
* linux-low.c (linux_wait): Adjust to new target_ops->wait
interface.
* spu-low.c (spu_wait): Adjust.
* win32-low.c (enum target_waitkind, struct target_waitstatus):
Delete.
(win32_wait): Adjust.
Diffstat (limited to 'gdb/gdbserver/server.h')
-rw-r--r-- | gdb/gdbserver/server.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index db750bd..7727e55 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -160,8 +160,7 @@ void unloaded_dll (const char *name, CORE_ADDR base_addr); extern unsigned long cont_thread; extern unsigned long general_thread; extern unsigned long step_thread; -extern unsigned long thread_from_wait; -extern unsigned long old_thread_from_wait; + extern int server_waiting; extern int debug_threads; extern int pass_signals[]; @@ -201,7 +200,8 @@ void convert_ascii_to_int (char *from, unsigned char *to, int n); void convert_int_to_ascii (unsigned char *from, char *to, int n); void new_thread_notify (int id); void dead_thread_notify (int id); -void prepare_resume_reply (char *buf, char status, unsigned char sig); +void prepare_resume_reply (char *buf, unsigned long thread_id, + struct target_waitstatus *status); const char *decode_address_to_semicolon (CORE_ADDR *addrp, const char *start); void decode_address (CORE_ADDR *addrp, const char *start, int len); |