aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-bpevent.c
diff options
context:
space:
mode:
authorKevin Pouget <kpouget@sourceware.org>2011-09-15 12:27:20 +0000
committerKevin Pouget <kpouget@sourceware.org>2011-09-15 12:27:20 +0000
commit6839b47f2b1cd56c90dc38da7bb612df7e052d90 (patch)
treeacffae36122d018201e9bf74f07ccc2671fa6951 /gdb/python/py-bpevent.c
parent672f9b600994c1a377477b6d88b7f63aaf9c7ffe (diff)
downloadgdb-6839b47f2b1cd56c90dc38da7bb612df7e052d90.zip
gdb-6839b47f2b1cd56c90dc38da7bb612df7e052d90.tar.gz
gdb-6839b47f2b1cd56c90dc38da7bb612df7e052d90.tar.bz2
2011-09-15 Kevin Pouget <kevin.pouget@st.com>
Handle multiple breakpoint hits in Python interface: * python/py-bpevent.c (create_breakpoint_event_object): Rename C/Python variable to breakpoints. * python/py-stopevent.c (emit_stop_event): Return a Python tuple of bps instead of single breakpoint. Fix some space typos. * python/py-stopevent.c (create_breakpoint_event_object): Rename variable to breakpoints. testsuite: * gdb.python/py-events.exp: Set a duplicate breakpoint and check its presence. * gdb.python/py-events.py (breakpoint_stop_handler): Browse all the breakpoint hits. doc: * gdb.texinfo (Events In Python): New function documentation: gdb.BreakpointEvent.breakpoints. Indicate that gdb.BreakpointEvent.breakpoint is now deprecated.
Diffstat (limited to 'gdb/python/py-bpevent.c')
-rw-r--r--gdb/python/py-bpevent.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/python/py-bpevent.c b/gdb/python/py-bpevent.c
index c7f7965..f37b248 100644
--- a/gdb/python/py-bpevent.c
+++ b/gdb/python/py-bpevent.c
@@ -24,7 +24,7 @@ static PyTypeObject breakpoint_event_object_type;
/* Create and initialize a BreakpointEvent object. */
PyObject *
-create_breakpoint_event_object (PyObject *breakpoint)
+create_breakpoint_event_object (PyObject *breakpoint_list, PyObject *first_bp)
{
PyObject *breakpoint_event_obj =
create_stop_event_object (&breakpoint_event_object_type);
@@ -34,7 +34,11 @@ create_breakpoint_event_object (PyObject *breakpoint)
if (evpy_add_attribute (breakpoint_event_obj,
"breakpoint",
- breakpoint) < 0)
+ first_bp) < 0)
+ goto fail;
+ if (evpy_add_attribute (breakpoint_event_obj,
+ "breakpoints",
+ breakpoint_list) < 0)
goto fail;
return breakpoint_event_obj;