This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Remove lwp -> pid conversion in linux_nat_xfer_partial
On 03/22/2017 03:02 AM, Simon Marchi wrote:
> New in v2:
>
> - Use lwp in linux_proc_xfer_partial and linux_proc_xfer_spu.
> - Updated commit message (stole some of Pedro's text)
Thanks!
> - if the leader exits, and goes zombie, then several files under
> "/proc/<pid>" won't work, though using "/proc/<pid>/task/<tid>" would.
> The latter path form is also generally better for being robust in
> the case TID exits and is reused in another process, much like
> tkill vs tgkill.
The part about TID-reuse robustness actually doesn't make sense here
yet, though, since this patch is not switching to "/proc/<pid>/task/<tid>".
So reduce that to:
- if the leader (<pid>) had exited and is thus now zombie, then several
files under "/proc/<pid>" won't work, while they will if you use
"/proc/<lwp>".
Otherwise LGTM.
Thanks,
Pedro Alves