This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

inferior_ptid vs current_inferior(): keep them in sync?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]