mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 22:15:12 +08:00
gdb/python: allow for catchpoint type breakpoints in python
This commit adds initial support for catchpoints to the python breakpoint API. This commit adds a BP_CATCHPOINT constant which corresponds to GDB's internal bp_catchpoint. The new constant is documented in the manual. The user can't create breakpoints with type BP_CATCHPOINT after this commit, but breakpoints that already exist, obtained with the `gdb.breakpoints` function, can now have this type. Additionally, when a stop event is reported for hitting a catchpoint, GDB will now report a BreakpointEvent with the attached breakpoint being of type BP_CATCHPOINT - previously GDB would report a generic StopEvent in this situation. gdb/ChangeLog: * NEWS: Mention Python BP_CATCHPOINT feature. * python/py-breakpoint.c (pybp_codes): Add bp_catchpoint support. (bppy_init): Likewise. (gdbpy_breakpoint_created): Likewise. gdb/doc/ChangeLog: * python.texinfo (Breakpoints In Python): Add BP_CATCHPOINT description. gdb/testsuite/ChangeLog: * gdb.python/py-breakpoint.c (do_throw): New function. (main): Call do_throw. * gdb.python/py-breakpoint.exp (test_catchpoints): New proc.
This commit is contained in:
@ -5517,6 +5517,13 @@ Hardware assisted read watchpoint.
|
||||
@vindex BP_ACCESS_WATCHPOINT
|
||||
@item gdb.BP_ACCESS_WATCHPOINT
|
||||
Hardware assisted access watchpoint.
|
||||
|
||||
@vindex BP_CATCHPOINT
|
||||
@item gdb.BP_CATCHPOINT
|
||||
Catchpoint. Currently, this type can't be used when creating
|
||||
@code{gdb.Breakpoint} objects, but will be present in
|
||||
@code{gdb.Breakpoint} objects reported from
|
||||
@code{gdb.BreakpointEvent}s (@pxref{Events In Python}).
|
||||
@end vtable
|
||||
|
||||
The available watchpoint types are represented by constants defined in the
|
||||
|
Reference in New Issue
Block a user