aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-05-05 16:53:09 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-06-25 18:22:05 +0100
commit08080f9744094772e935204a9d59a101da83a801 (patch)
tree3b210fd6add91093c659cf3b7d11d0c366739596 /gdb/guile
parent81b327aadd3454a5c855e10180b30b6cafe5fc84 (diff)
downloadgdb-08080f9744094772e935204a9d59a101da83a801.zip
gdb-08080f9744094772e935204a9d59a101da83a801.tar.gz
gdb-08080f9744094772e935204a9d59a101da83a801.tar.bz2
gdb/guile: allow for catchpoint type breakpoints in guile
This commit adds initial support for catchpoints to the guile 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 (breakpoints) function, can now have this type. gdb/ChangeLog: * guile/scm-breakpoint.c (bpscm_type_to_string): Handle bp_catchpoint. (bpscm_want_scm_wrapper_p): Likewise. (gdbscm_make_breakpoint): Likewise. (breakpoint_integer_constants): Likewise. gdb/doc/ChangeLog: * guile.texinfo (Breakpoints In Guile): Add BP_CATCHPOINT description. gdb/testsuite/ChangeLog: * gdb.guile/scm-breakpoint.exp (test_catchpoints): New proc.
Diffstat (limited to 'gdb/guile')
-rw-r--r--gdb/guile/scm-breakpoint.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c
index 346b006..3f25708 100644
--- a/gdb/guile/scm-breakpoint.c
+++ b/gdb/guile/scm-breakpoint.c
@@ -138,6 +138,7 @@ bpscm_type_to_string (enum bptype type)
case bp_hardware_watchpoint: return "BP_HARDWARE_WATCHPOINT";
case bp_read_watchpoint: return "BP_READ_WATCHPOINT";
case bp_access_watchpoint: return "BP_ACCESS_WATCHPOINT";
+ case bp_catchpoint: return "BP_CATCHPOINT";
default: return "internal/other";
}
}
@@ -233,7 +234,8 @@ bpscm_want_scm_wrapper_p (struct breakpoint *bp, int from_scheme)
&& bp->type != bp_watchpoint
&& bp->type != bp_hardware_watchpoint
&& bp->type != bp_read_watchpoint
- && bp->type != bp_access_watchpoint)
+ && bp->type != bp_access_watchpoint
+ && bp->type != bp_catchpoint)
return 0;
return 1;
@@ -391,6 +393,7 @@ gdbscm_make_breakpoint (SCM location_scm, SCM rest)
case bp_hardware_watchpoint:
case bp_read_watchpoint:
case bp_access_watchpoint:
+ case bp_catchpoint:
{
const char *type_name = bpscm_type_to_string (type);
gdbscm_misc_error (FUNC_NAME, type_arg_pos,
@@ -1152,6 +1155,7 @@ static const scheme_integer_constant breakpoint_integer_constants[] =
{ "BP_HARDWARE_WATCHPOINT", bp_hardware_watchpoint },
{ "BP_READ_WATCHPOINT", bp_read_watchpoint },
{ "BP_ACCESS_WATCHPOINT", bp_access_watchpoint },
+ { "BP_CATCHPOINT", bp_catchpoint },
{ "WP_READ", hw_read },
{ "WP_WRITE", hw_write },