This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] Make linux_nat_detach/thread_db_detach use the inferior parameter


On 2018-01-18 12:06, Pedro Alves wrote:
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).

Ah, good to know it goes in the same direction.

I'm sending the series through the buildbot again (see if that new assert is hit somewhere), and will send a v2 tomorrow if all goes well.

Thanks for reviewing.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]