[PATCHv6 4/7] gdb: handle dprintf breakpoints when unloading a shared library
Tom Tromey
tom@tromey.com
Tue Dec 17 15:42:53 GMT 2024
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> As the dprintf has type bp_dprintf then this check triggers and we
Andrew> ignore the dprintf, meaning the dprintf is not disabled. When the
Andrew> inferior stops after the 'next' GDB tries to remove all breakpoints
Andrew> but the dprintf can no longer be removed, the memory in which it was
Andrew> placed has been unmapped from the inferior.
Andrew> The fix is to start using is_breakpoint() in
Andrew> disable_breakpoints_in_unloaded_shlib instead of the bp_breakpoint and
Andrew> bp_hardware_breakpoint checks. The is_breakpoint() function also
Andrew> checks for bp_dprintf.
It'd be nice to (slowly) migrate away from these kinds of checks and
just have methods on the various breakpoint classes that can be called.
Tom
More information about the Gdb-patches
mailing list