This is the mail archive of the
mailing list for the GDB project.
inferior_ptid vs current_inferior(): keep them in sync?
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>, gdb <gdb at sourceware dot org>
- Date: Thu, 12 Sep 2013 17:34:28 -0700
- Subject: inferior_ptid vs current_inferior(): keep them in sync?
- Authentication-results: sourceware.org; auth=none
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