Fw: RE: [PATCH] Use current_inferior ()->pid for AIX

Simon Marchi simark@simark.ca
Mon Jul 4 19:28:53 GMT 2022


On 6/27/22 08:55, Aditya Vidyadhar Kamath via Gdb-patches wrote:

> Hi,

>

> We have worked our way out through the pid!=0 assertion failure.

>

> Currently we also plan to come out soon with the patches for fork support as well in AIX.

>

> It will be great if we could get a review to the patch [Forwarded in this email] whenever you find time.

>

> Have a nice day ahead.

>

> Thanks and regards,

> Aditya



Hi Aditya,



I looked at your patch, and unfortunately I don't understand how it

improves things.  In my past messages, I tried to explain that the root

of the problem is that the wait methods code is relying on the entry

value of inferior_ptid, when it shouldn't.  I don't see how adding one

more reference to inferior_ptid in rs6000_nat_target::wait helps.



Given your goal is to support forks (and thus multi-process, I

suppose?), try to write the code in the wait method in such a way that

it doesn't rely on the inferior_ptid value or current inferior value on

entry.  The typical pattern for the wait methods is that they fetch some

event (using waitpid in your case) and then figure out which inferior

from the inferior list this event applies to.



Simon



More information about the Gdb-patches mailing list