RFC: fix PR 13987

Tom Tromey tromey@redhat.com
Fri Jan 4 16:27:00 GMT 2013


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> ... what is taking care of clearing these when the inferior
Pedro> exits/is detached/etc. or alternatively, restarted?  I think the
Pedro> breakpoint itself is deleted by breakpoint.c, and then this
Pedro> pointer ends up stale?  I think the registry cleanup function
Pedro> only runs when the inferior is removed/deleted, not when it just
Pedro> exits, right?

Thanks.  I added a breakpoint_deleted observer that clears the JIT
breakpoint.  I think this should handle all cases.

Pedro> Sort of related, while trying to understand how is
Pedro> inferior_data->objfile cleared in that same situation, I happened
Pedro> to notice that free_objfile_data calls get_jit_inferior_data,
Pedro> which calls current_inferior.  Doesn't look multi-inferior safe.

Maybe I see -- the objfile is attached to a progspace, not an inferior.
So we have to look for inferiors using this progspace instead of
assuming the current inferior.

Is that what you mean?  Or if not, can you walk me through it some more?

Tom



More information about the Gdb-patches mailing list