GDBserver: Pass process_info pointer to target_detach and target_join
authorPedro Alves <palves@redhat.com>
Fri, 13 Jul 2018 09:28:46 +0000 (10:28 +0100)
committerPedro Alves <palves@redhat.com>
Fri, 13 Jul 2018 09:28:46 +0000 (10:28 +0100)
commitef2ddb33bd29a7c4f7027b9e37e55c74c15af825
tree2f9d11da4ff51a4197b8537f1457c6ff22732f15
parent9451a3b9a1af46cbe988c3a2cf4c4754d7e84143
GDBserver: Pass process_info pointer to target_detach and target_join

We start from a process_info pointer, pass down process->pid, and then
the target_detach and target_join 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_detach, linux_join): Change parameter to
process_info pointer instead of pid.  Adjust.
* lynx-low.c (lynx_detach, lynx_join): Likewise.
* nto-low.c (nto_detach): Likewise.
* spu-low.c (spu_detach, spu_join): Likewise.
* win32-low.c (win32_detach, win32_join): Likewise.
* server.c (handle_detach, detach_or_kill_for_exit): Adjust.
* target.h (struct target_ops) <detach, join>: Change parameter to
process_info pointer instead of pid.  Adjust all implementations
and callers.
(detach_inferior, join_inferior): Rename 'pid' parameter to
'proc'.
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/gdbserver/lynx-low.c
gdb/gdbserver/nto-low.c
gdb/gdbserver/server.c
gdb/gdbserver/spu-low.c
gdb/gdbserver/target.h
gdb/gdbserver/win32-low.c