[PATCH] Don't compare the pid returned from wait() against inferior_ptid.

Gary Benson gbenson@redhat.com
Wed Jul 8 09:48:31 GMT 2020


Hi John,

John Baldwin wrote:
> inf_ptrace::wait() needs to discard termination events reported by
> detached child processes.  Previously it compared the returned pid
> against the pid in inferior_ptid to determine if a termination event
> should be discarded or reported.  inferior_ptid is now null_ptid in
> wait() target methods, so this was always failing and never
> reporting exit events.  Instead, report termination events whose pid
> matches any inferior belonging to the current target.
> 
> gdb/ChangeLog:
> 
> 	* inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
> 	inferior_ptid.

Did the bug you've fixed cause any tests to fail?  And, if not, is
this something it's possible to write a test for?

Cheers,
Gary

-- 
Gary Benson - he / him / his
Principal Software Engineer, Red Hat



More information about the Gdb-patches mailing list