inferior_ptid vs current_inferior(): keep them in sync?
Doug Evans
dje@google.com
Fri Sep 13 00:34:00 GMT 2013
Hi.
Is there any case where we want inferior_ptid to not necessarily
correspond to current_inferior?
I'm adding an inferior attribute to the Python newobjfile event, and
while the inferior value is correct, it's only accidentally so (the
two get out of sync in linux_child_follow_fork and only get back into
sync due to a cleanup performed during breakpoint resetting ... there
may be more going on, I stopped digging once I saw that).
Before I try to reason out what The Right solution is, an answer to
the above question would be most welcome. :-)
inferior_ptid,current_inferior become not-in-sync, for example, in the
!detach case of linux_child_follow_fork. The function sets
inferior_ptid but doesn't update current_inferior before calling
clone_program_space.
More information about the Gdb
mailing list