diff options
author | Pedro Alves <palves@redhat.com> | 2018-07-13 10:28:47 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2018-07-13 10:58:17 +0100 |
commit | a780ef4f27f8bc44082be81fdbee44bb11f1049c (patch) | |
tree | b71879dc14a53dc2bdb35604e7d52bc8b3fccaa8 /gdb/gdbserver/target.h | |
parent | ef2ddb33bd29a7c4f7027b9e37e55c74c15af825 (diff) | |
download | gdb-a780ef4f27f8bc44082be81fdbee44bb11f1049c.zip gdb-a780ef4f27f8bc44082be81fdbee44bb11f1049c.tar.gz gdb-a780ef4f27f8bc44082be81fdbee44bb11f1049c.tar.bz2 |
GDBserver: Pass process_info pointer to target_kill
We start from a process_info pointer, pass down process->pid, and
then the target_kill implementations need to find the process from the
pid again. Pass the process_info pointer down directly instead.
gdb/gdbserver/ChangeLog:
2018-07-13 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_kill): Change parameter to process_info
pointer instead of pid. Adjust.
* lynx-low.c (lynx_kill): Likewise.
* nto-low.c (nto_kill): Likewise.
* spu-low.c (spu_kill): Likewise.
* win32-low.c (win32_kill): Likewise.
* server.c (handle_v_kill, kill_inferior_callback)
(detach_or_kill_for_exit): Adjust.
* target.c (kill_inferior): Change parameter to process_info
pointer instead of pid. Adjust.
* target.h (struct target_ops) <kill>: Change parameter to
process_info pointer instead of pid. Adjust all implementations
and callers.
(kill_inferior): Likewise.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r-- | gdb/gdbserver/target.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index 7f59485..fce54e0 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -90,9 +90,9 @@ struct target_ops int (*attach) (unsigned long pid); - /* Kill inferior PID. Return -1 on failure, and 0 on success. */ + /* Kill process PROC. Return -1 on failure, and 0 on success. */ - int (*kill) (int pid); + int (*kill) (process_info *proc); /* Detach from process PROC. Return -1 on failure, and 0 on success. */ @@ -497,7 +497,7 @@ void set_target_ops (struct target_ops *); #define myattach(pid) \ (*the_target->attach) (pid) -int kill_inferior (int); +int kill_inferior (process_info *proc); #define target_supports_fork_events() \ (the_target->supports_fork_events ? \ |