Skip to content

Bpoint

REGISTERED_BP_EVENTS: Dict[int, BreakpointEvent] = {} module-attribute

Breakpoint

Bases: Breakpoint

Breakpoint class, similar to gdb.Breakpoint, but clears the caches associated with the stop event before determining whether it should stop the inferior or not.

Unlike gdb.Breakpoint, users of this class should override should_stop(), instead of stop(), as the latter is used to do cache invalidation.

should_stop()

This function is called whenever this breakpoint is hit in the code and its return value determines whether the inferior will be stopped.

stop()

BreakpointEvent

Bases: Breakpoint

Breakpoint class, similar to gdb.Breakpoint, but executes a given callback when, or very shortly after, a the breakpoint is hit, but does not stop the execution of the inferior.

This allows us to execute code that changes the state of the inferior safely after a breakpoint is hit.

commands = f'python pwndbg.gdblib.bpoint.REGISTERED_BP_EVENTS[{id(self)}].on_breakpoint_hit()' instance-attribute

__init__(*args, **kwargs)

delete()

on_breakpoint_hit()

This function is called whenever this breakpoint is hit in the code.