* [PATCH 0/3] Make python/guile api catchpoint aware
@ 2021-05-12 13:04 Andrew Burgess
2021-05-12 13:04 ` [PATCH 1/3] gdb/guile: improve the errors when creating breakpoints Andrew Burgess
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Andrew Burgess @ 2021-05-12 13:04 UTC (permalink / raw)
To: gdb-patches
This is a first, small step, towards adding catchpoint support to the
python/guile apis.
The first patch in this series has been posted before, but is repeated
here as the second patch depends on it.
---
Andrew Burgess (3):
gdb/guile: improve the errors when creating breakpoints
gdb/guile: allow for catchpoint type breakpoints in guile
gdb/python: allow for catchpoint type breakpoints in python
gdb/ChangeLog | 21 ++++++++
gdb/NEWS | 4 ++
gdb/doc/ChangeLog | 10 ++++
gdb/doc/guile.texi | 4 ++
gdb/doc/python.texi | 7 +++
gdb/guile/scm-breakpoint.c | 19 ++++++-
gdb/python/py-breakpoint.c | 6 ++-
gdb/testsuite/ChangeLog | 14 +++++
gdb/testsuite/gdb.guile/scm-breakpoint.exp | 44 ++++++++++++++++
gdb/testsuite/gdb.python/py-breakpoint.c | 14 +++++
gdb/testsuite/gdb.python/py-breakpoint.exp | 60 ++++++++++++++++++++++
11 files changed, 200 insertions(+), 3 deletions(-)
--
2.25.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] gdb/guile: improve the errors when creating breakpoints
2021-05-12 13:04 [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
@ 2021-05-12 13:04 ` Andrew Burgess
2021-05-12 13:04 ` [PATCH 2/3] gdb/guile: allow for catchpoint type breakpoints in guile Andrew Burgess
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Andrew Burgess @ 2021-05-12 13:04 UTC (permalink / raw)
To: gdb-patches
When creating a breakpoint using the guile API, if an invalid
breakpoint type number was used then the error would report the wrong
argument position, like this:
(gdb) guile (define wp2 (make-breakpoint "result" #:wp-class WP_WRITE #:type 999))
ERROR: In procedure make-breakpoint:
ERROR: In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 3: 999
Error while executing Scheme code.
(gdb)
The 'position 3' here is actually pointing at WP_WRITE, when it should
say 'position 5' and point to the 999. This commit fixes this.
However, you also get errors like this:
(gdb) guile (define wp2 (make-breakpoint "result" #:wp-class WP_WRITE #:type BP_NONE))
ERROR: In procedure make-breakpoint:
ERROR: In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 3: 0
Error while executing Scheme code.
The BP_NONE is a valid breakpoint type, it's just not valid for
creating breakpoints through the 'make-breakpoint' API. The use of
'0' in the error message (which is the value of BP_NONE) is not
great. This commit changes the error in this case to:
(gdb) guile (define wp2 (make-breakpoint "result" #:wp-class WP_WRITE #:type BP_NONE))
ERROR: In procedure make-breakpoint:
ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: "BP_NONE"
Error while executing Scheme code.
Which seems better; we now use the name of the type, and report that
this type is unsupported.
gdb/ChangeLog:
* guile/scm-breakpoint.c (gdbscm_make_breakpoint): Split the error
for invalid breakpoint numbers, and unsupported breakpoint
numbers.
gdb/testsuite/ChangeLog:
* gdb.guile/scm-breakpoint.exp (test_watchpoints): Add new tests.
---
gdb/ChangeLog | 6 ++++++
gdb/guile/scm-breakpoint.c | 13 ++++++++++++-
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.guile/scm-breakpoint.exp | 7 +++++++
4 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c
index 826dfa9b0a3..cf613775e44 100644
--- a/gdb/guile/scm-breakpoint.c
+++ b/gdb/guile/scm-breakpoint.c
@@ -387,8 +387,19 @@ gdbscm_make_breakpoint (SCM location_scm, SCM rest)
_("invalid watchpoint class"));
}
break;
+ case bp_none:
+ case bp_hardware_watchpoint:
+ case bp_read_watchpoint:
+ case bp_access_watchpoint:
+ {
+ const char *type_name = bpscm_type_to_string (type);
+ gdbscm_misc_error (FUNC_NAME, type_arg_pos,
+ gdbscm_scm_from_c_string (type_name),
+ _("unsupported breakpoint type"));
+ }
+ break;
default:
- gdbscm_out_of_range_error (FUNC_NAME, access_type_arg_pos,
+ gdbscm_out_of_range_error (FUNC_NAME, type_arg_pos,
scm_from_int (type),
_("invalid breakpoint type"));
}
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
index 56058942e64..0e9e64ed4ae 100644
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -258,6 +258,13 @@ proc_with_prefix test_watchpoints { } {
gdb_test "continue" \
".*\[Ww\]atchpoint.*result.*Old value = 0.*New value = 25.*main.*" \
"test watchpoint write"
+
+ gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type 999))" \
+ "ERROR: In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 5: 999\r\n.*" \
+ "create a breakpoint with an invalid type number"
+ gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type BP_NONE))" \
+ "ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: \"BP_NONE\"\r\n.*" \
+ "create a breakpoint with an unsupported type"
}
proc_with_prefix test_bkpt_internal { } {
--
2.25.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] gdb/guile: allow for catchpoint type breakpoints in guile
2021-05-12 13:04 [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
2021-05-12 13:04 ` [PATCH 1/3] gdb/guile: improve the errors when creating breakpoints Andrew Burgess
@ 2021-05-12 13:04 ` Andrew Burgess
2021-05-12 13:17 ` Eli Zaretskii
2021-05-12 13:05 ` [PATCH 3/3] gdb/python: allow for catchpoint type breakpoints in python Andrew Burgess
2021-06-01 11:04 ` [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
3 siblings, 1 reply; 9+ messages in thread
From: Andrew Burgess @ 2021-05-12 13:04 UTC (permalink / raw)
To: gdb-patches
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.
---
gdb/ChangeLog | 8 +++++
gdb/doc/ChangeLog | 5 +++
gdb/doc/guile.texi | 4 +++
gdb/guile/scm-breakpoint.c | 6 +++-
gdb/testsuite/ChangeLog | 4 +++
gdb/testsuite/gdb.guile/scm-breakpoint.exp | 37 ++++++++++++++++++++++
6 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi
index 6c613797f22..ee1c4273342 100644
--- a/gdb/doc/guile.texi
+++ b/gdb/doc/guile.texi
@@ -3001,6 +3001,10 @@
@item BP_ACCESS_WATCHPOINT
Hardware assisted access watchpoint.
This value cannot be specified when creating the breakpoint.
+
+@item BP_CATCHPOINT
+Catchpoint.
+This value cannot be specified when creating the breakpoint.
@end vtable
The available watchpoint types are represented by constants defined in the
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c
index cf613775e44..6c5145bfa33 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,
@@ -1156,6 +1159,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 },
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
index 0e9e64ed4ae..c603af76a33 100644
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -519,10 +519,47 @@ proc_with_prefix test_bkpt_probe {} {
"register probe breakpoint"
}
+proc_with_prefix test_catchpoints {} {
+ global srcfile testfile
+ global gdb_prompt decimal
+
+ # Start with a fresh gdb.
+ clean_restart ${testfile}
+
+ if ![gdb_guile_runto_main] {
+ return
+ }
+
+ # Try to create a catchpoint, currently this isn't supported via
+ # the guile api.
+ gdb_test "guile (define cp (make-breakpoint \"syscall\" #:type BP_CATCHPOINT))" \
+ "ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 3: \"BP_CATCHPOINT\"\r\n.*" \
+ "create a catchpoint via the api"
+
+ # Setup a catchpoint.
+ set num "XXX"
+ gdb_test_multiple "catch syscall" "" {
+ -re "The feature \'catch syscall\' is not supported.*\r\n$gdb_prompt $" {
+ unsupported "catch syscall isn't supported"
+ return -1
+ }
+ -re "Catchpoint ($decimal) \\(any syscall\\)\r\n$gdb_prompt $" {
+ set num $expect_out(1,string)
+ pass $gdb_test_name
+ }
+ }
+
+ # Look for the catchpoint in the breakpoint list.
+ gdb_test "guile (for-each (lambda (b) (if (= (breakpoint-type b) BP_CATCHPOINT) (begin (display b) (newline)))) (breakpoints))" \
+ "#<gdb:breakpoint #${num} BP_CATCHPOINT enabled noisy hit:0 ignore:0>" \
+ "look for BP_CATCHPOINT in breakpoint list"
+}
+
test_bkpt_basic
test_bkpt_deletion
test_bkpt_cond_and_cmds
test_bkpt_invisible
+test_catchpoints
test_watchpoints
test_bkpt_internal
test_bkpt_eval_funcs
--
2.25.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] gdb/python: allow for catchpoint type breakpoints in python
2021-05-12 13:04 [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
2021-05-12 13:04 ` [PATCH 1/3] gdb/guile: improve the errors when creating breakpoints Andrew Burgess
2021-05-12 13:04 ` [PATCH 2/3] gdb/guile: allow for catchpoint type breakpoints in guile Andrew Burgess
@ 2021-05-12 13:05 ` Andrew Burgess
2021-05-12 13:18 ` Eli Zaretskii
2021-06-01 11:04 ` [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
3 siblings, 1 reply; 9+ messages in thread
From: Andrew Burgess @ 2021-05-12 13:05 UTC (permalink / raw)
To: gdb-patches
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.
---
gdb/ChangeLog | 7 +++
gdb/NEWS | 4 ++
gdb/doc/ChangeLog | 5 ++
gdb/doc/python.texi | 7 +++
gdb/python/py-breakpoint.c | 6 ++-
gdb/testsuite/ChangeLog | 6 +++
gdb/testsuite/gdb.python/py-breakpoint.c | 14 +++++
gdb/testsuite/gdb.python/py-breakpoint.exp | 60 ++++++++++++++++++++++
8 files changed, 108 insertions(+), 1 deletion(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index 784c1038920..3d3b446a651 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -75,6 +75,10 @@
and "-eiex" that allow options (that would normally appear in a
gdbearlyinit file) to be passed on the command line.
+* When hitting a catchpoint the Python API will now emit a
+ gdb.BreakpointEvent rather than a gdb.StopEvent. The gdb.Breakpoint
+ attached to the event will have type BP_CATCHPOINT.
+
* New commands
set debug event-loop
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 4865634537d..f43859341e0 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -5498,6 +5498,13 @@
@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
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 4710f3e9e6a..2a75ca9ea80 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -86,6 +86,7 @@ static struct pybp_code pybp_codes[] =
{ "BP_HARDWARE_WATCHPOINT", bp_hardware_watchpoint},
{ "BP_READ_WATCHPOINT", bp_read_watchpoint},
{ "BP_ACCESS_WATCHPOINT", bp_access_watchpoint},
+ { "BP_CATCHPOINT", bp_catchpoint},
{NULL} /* Sentinel. */
};
@@ -883,6 +884,8 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
error(_("Cannot understand watchpoint access type."));
break;
}
+ case bp_catchpoint:
+ error (_("BP_CATCHPOINT not supported"));
default:
error(_("Do not understand breakpoint type to set."));
}
@@ -1043,7 +1046,8 @@ gdbpy_breakpoint_created (struct breakpoint *bp)
&& 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)
{
pybp_debug_printf ("is not a breakpoint or watchpoint");
return;
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.c b/gdb/testsuite/gdb.python/py-breakpoint.c
index 830e4c29fae..dca668d6c22 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.c
+++ b/gdb/testsuite/gdb.python/py-breakpoint.c
@@ -39,6 +39,11 @@ int add (int i)
return i + i; /* Break at function add. */
}
+void
+do_throw ()
+{
+ throw 123;
+}
int main (int argc, char *argv[])
{
@@ -46,6 +51,15 @@ int main (int argc, char *argv[])
int bar = 42;
int i;
+ try
+ {
+ do_throw ();
+ }
+ catch (...)
+ {
+ /* Nothing. */
+ }
+
for (i = 0; i < 10; i++)
{
result += multiply (foo); /* Break at multiply. */
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index 64a70abb126..d8fb85b784c 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -737,11 +737,71 @@ proc_with_prefix test_bkpt_probe {} {
"-probe in spec string"
}
+proc_with_prefix test_catchpoints {} {
+ global srcfile testfile
+ global gdb_prompt decimal
+
+ # Start with a fresh gdb.
+ clean_restart ${testfile}
+
+ if ![runto_main] then {
+ fail "cannot run to main."
+ return 0
+ }
+
+ # Try to create a catchpoint, currently this isn't supported via
+ # the python api.
+ gdb_test "python gdb.Breakpoint (\"syscall\", type=gdb.BP_CATCHPOINT)" \
+ [multi_line \
+ "gdb.error: BP_CATCHPOINT not supported" \
+ "Error while executing Python code\\."] \
+ "create a catchpoint via the api"
+
+ # Setup a catchpoint.
+ set num "XXX"
+ gdb_test_multiple "catch throw" "" {
+ -re "The feature \'catch throw\' is not supported.*\r\n$gdb_prompt $" {
+ unsupported "catch syscall isn't supported"
+ return -1
+ }
+ -re "Catchpoint ($decimal) \\(throw\\)\r\n$gdb_prompt $" {
+ set num $expect_out(1,string)
+ pass $gdb_test_name
+ }
+ }
+
+ # Look for the catchpoint in the breakpoint list.
+ gdb_test_multiline "scan breakpoint list for BP_CATCHPOINT" \
+ "python" "" \
+ "def scan_bp_list ():" "" \
+ " for b in gdb.breakpoints():" "" \
+ " if b.type == gdb.BP_CATCHPOINT:" "" \
+ " print(\"breakpoint #%d, type BP_CATCHPOINT\" % b.number)" "" \
+ "end" ""
+ gdb_test "python scan_bp_list ()" \
+ "breakpoint #${num}, type BP_CATCHPOINT" \
+ "scan breakpoint for BP_CATCHPOINT"
+
+ # Arrange to print something when GDB stops, then continue to the
+ # catchpoint and check we get the expected event.
+ gdb_test_multiline "setup stop event handler" \
+ "python" "" \
+ "def stop_handler (event):" "" \
+ " if (isinstance (event, gdb.BreakpointEvent)" "" \
+ " and isinstance (event.breakpoint, gdb.Breakpoint)" "" \
+ " and event.breakpoint.type == gdb.BP_CATCHPOINT):" "" \
+ " print (\"Stopped at catchpoint event: %d\" % event.breakpoint.number)" "" \
+ "end" "" \
+ "python gdb.events.stop.connect (stop_handler)" ""
+ gdb_test "continue" "Stopped at catchpoint event: ${num}"
+}
+
test_bkpt_basic
test_bkpt_deletion
test_bkpt_cond_and_cmds
test_bkpt_invisible
test_hardware_breakpoints
+test_catchpoints
test_watchpoints
test_bkpt_internal
test_bkpt_eval_funcs
--
2.25.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] gdb/guile: allow for catchpoint type breakpoints in guile
2021-05-12 13:04 ` [PATCH 2/3] gdb/guile: allow for catchpoint type breakpoints in guile Andrew Burgess
@ 2021-05-12 13:17 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-05-12 13:17 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Wed, 12 May 2021 14:04:59 +0100
>
> 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.
OK for the documentation part, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] gdb/python: allow for catchpoint type breakpoints in python
2021-05-12 13:05 ` [PATCH 3/3] gdb/python: allow for catchpoint type breakpoints in python Andrew Burgess
@ 2021-05-12 13:18 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-05-12 13:18 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Wed, 12 May 2021 14:05:00 +0100
>
> 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.
OK for the documentation parts, thanks.
> +* When hitting a catchpoint the Python API will now emit a
^
Please add a comma there.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] Make python/guile api catchpoint aware
2021-05-12 13:04 [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
` (2 preceding siblings ...)
2021-05-12 13:05 ` [PATCH 3/3] gdb/python: allow for catchpoint type breakpoints in python Andrew Burgess
@ 2021-06-01 11:04 ` Andrew Burgess
2021-06-21 12:05 ` PING! " Andrew Burgess
3 siblings, 1 reply; 9+ messages in thread
From: Andrew Burgess @ 2021-06-01 11:04 UTC (permalink / raw)
To: gdb-patches
Ping!
Any thoughts?
Thanks,
Andrew
* Andrew Burgess <andrew.burgess@embecosm.com> [2021-05-12 14:04:57 +0100]:
> This is a first, small step, towards adding catchpoint support to the
> python/guile apis.
>
> The first patch in this series has been posted before, but is repeated
> here as the second patch depends on it.
>
> ---
>
> Andrew Burgess (3):
> gdb/guile: improve the errors when creating breakpoints
> gdb/guile: allow for catchpoint type breakpoints in guile
> gdb/python: allow for catchpoint type breakpoints in python
>
> gdb/ChangeLog | 21 ++++++++
> gdb/NEWS | 4 ++
> gdb/doc/ChangeLog | 10 ++++
> gdb/doc/guile.texi | 4 ++
> gdb/doc/python.texi | 7 +++
> gdb/guile/scm-breakpoint.c | 19 ++++++-
> gdb/python/py-breakpoint.c | 6 ++-
> gdb/testsuite/ChangeLog | 14 +++++
> gdb/testsuite/gdb.guile/scm-breakpoint.exp | 44 ++++++++++++++++
> gdb/testsuite/gdb.python/py-breakpoint.c | 14 +++++
> gdb/testsuite/gdb.python/py-breakpoint.exp | 60 ++++++++++++++++++++++
> 11 files changed, 200 insertions(+), 3 deletions(-)
>
> --
> 2.25.4
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* PING! Re: [PATCH 0/3] Make python/guile api catchpoint aware
2021-06-01 11:04 ` [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
@ 2021-06-21 12:05 ` Andrew Burgess
2021-06-25 17:26 ` Andrew Burgess
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Burgess @ 2021-06-21 12:05 UTC (permalink / raw)
To: gdb-patches
I'm planning to push this patch later this week.
I think this is a first step to closing a hole in our
breakpoint/catchpoint API, and when we look at how
breakpoints/watchpoints are handled, this is the obvious approach.
If anyone objects, feel free to say.
Thanks,
Andrew
* Andrew Burgess <andrew.burgess@embecosm.com> [2021-06-01 12:04:19 +0100]:
> Ping!
>
> Any thoughts?
>
> Thanks,
> Andrew
>
> * Andrew Burgess <andrew.burgess@embecosm.com> [2021-05-12 14:04:57 +0100]:
>
> > This is a first, small step, towards adding catchpoint support to the
> > python/guile apis.
> >
> > The first patch in this series has been posted before, but is repeated
> > here as the second patch depends on it.
> >
> > ---
> >
> > Andrew Burgess (3):
> > gdb/guile: improve the errors when creating breakpoints
> > gdb/guile: allow for catchpoint type breakpoints in guile
> > gdb/python: allow for catchpoint type breakpoints in python
> >
> > gdb/ChangeLog | 21 ++++++++
> > gdb/NEWS | 4 ++
> > gdb/doc/ChangeLog | 10 ++++
> > gdb/doc/guile.texi | 4 ++
> > gdb/doc/python.texi | 7 +++
> > gdb/guile/scm-breakpoint.c | 19 ++++++-
> > gdb/python/py-breakpoint.c | 6 ++-
> > gdb/testsuite/ChangeLog | 14 +++++
> > gdb/testsuite/gdb.guile/scm-breakpoint.exp | 44 ++++++++++++++++
> > gdb/testsuite/gdb.python/py-breakpoint.c | 14 +++++
> > gdb/testsuite/gdb.python/py-breakpoint.exp | 60 ++++++++++++++++++++++
> > 11 files changed, 200 insertions(+), 3 deletions(-)
> >
> > --
> > 2.25.4
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PING! Re: [PATCH 0/3] Make python/guile api catchpoint aware
2021-06-21 12:05 ` PING! " Andrew Burgess
@ 2021-06-25 17:26 ` Andrew Burgess
0 siblings, 0 replies; 9+ messages in thread
From: Andrew Burgess @ 2021-06-25 17:26 UTC (permalink / raw)
To: gdb-patches
* Andrew Burgess <andrew.burgess@embecosm.com> [2021-06-21 13:05:35 +0100]:
> I'm planning to push this patch later this week.
I've now pushed this series.
Thanks,
Andrew
>
> I think this is a first step to closing a hole in our
> breakpoint/catchpoint API, and when we look at how
> breakpoints/watchpoints are handled, this is the obvious approach.
>
> If anyone objects, feel free to say.
>
> Thanks,
> Andrew
>
>
> * Andrew Burgess <andrew.burgess@embecosm.com> [2021-06-01 12:04:19 +0100]:
>
> > Ping!
> >
> > Any thoughts?
> >
> > Thanks,
> > Andrew
> >
> > * Andrew Burgess <andrew.burgess@embecosm.com> [2021-05-12 14:04:57 +0100]:
> >
> > > This is a first, small step, towards adding catchpoint support to the
> > > python/guile apis.
> > >
> > > The first patch in this series has been posted before, but is repeated
> > > here as the second patch depends on it.
> > >
> > > ---
> > >
> > > Andrew Burgess (3):
> > > gdb/guile: improve the errors when creating breakpoints
> > > gdb/guile: allow for catchpoint type breakpoints in guile
> > > gdb/python: allow for catchpoint type breakpoints in python
> > >
> > > gdb/ChangeLog | 21 ++++++++
> > > gdb/NEWS | 4 ++
> > > gdb/doc/ChangeLog | 10 ++++
> > > gdb/doc/guile.texi | 4 ++
> > > gdb/doc/python.texi | 7 +++
> > > gdb/guile/scm-breakpoint.c | 19 ++++++-
> > > gdb/python/py-breakpoint.c | 6 ++-
> > > gdb/testsuite/ChangeLog | 14 +++++
> > > gdb/testsuite/gdb.guile/scm-breakpoint.exp | 44 ++++++++++++++++
> > > gdb/testsuite/gdb.python/py-breakpoint.c | 14 +++++
> > > gdb/testsuite/gdb.python/py-breakpoint.exp | 60 ++++++++++++++++++++++
> > > 11 files changed, 200 insertions(+), 3 deletions(-)
> > >
> > > --
> > > 2.25.4
> > >
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-06-25 17:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 13:04 [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
2021-05-12 13:04 ` [PATCH 1/3] gdb/guile: improve the errors when creating breakpoints Andrew Burgess
2021-05-12 13:04 ` [PATCH 2/3] gdb/guile: allow for catchpoint type breakpoints in guile Andrew Burgess
2021-05-12 13:17 ` Eli Zaretskii
2021-05-12 13:05 ` [PATCH 3/3] gdb/python: allow for catchpoint type breakpoints in python Andrew Burgess
2021-05-12 13:18 ` Eli Zaretskii
2021-06-01 11:04 ` [PATCH 0/3] Make python/guile api catchpoint aware Andrew Burgess
2021-06-21 12:05 ` PING! " Andrew Burgess
2021-06-25 17:26 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).