This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] Make linux_nat_detach/thread_db_detach use the inferior parameter
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Thu, 18 Jan 2018 17:06:44 +0000
- Subject: Re: [PATCH 3/3] Make linux_nat_detach/thread_db_detach use the inferior parameter
- Authentication-results: sourceware.org; auth=none
- References: <1514699454-18587-1-git-send-email-simon.marchi@ericsson.com> <1514699454-18587-3-git-send-email-simon.marchi@ericsson.com>
On 12/31/2017 05:50 AM, Simon Marchi wrote:
> This patch makes these two functions actually use the inferior parameter
> added by the previous patch, instead of reading inferior_ptid. I chose
> these two, because they are the one actually used when I detach on my
> GNU/Linux system, so they were easy to test.
>
> I took the opportunity to pass the inferior being detached to
> inf_ptrace_detach_success, so it could use it too. From there, it made
> sense to add an overload of detach_inferior that takes the inferior
> directly rather than the pid, to avoid having to pass inf->pid only for
> the callee to look up the inferior structure by pid.
Looks fine to me.
(FWIW, the 'detach_inferior(int)' overload disappears in
my multi-target branch).
Thanks,
Pedro Alves