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).