diff options
author | Kevin Pouget <kpouget@sourceware.org> | 2011-09-15 12:27:20 +0000 |
---|---|---|
committer | Kevin Pouget <kpouget@sourceware.org> | 2011-09-15 12:27:20 +0000 |
commit | 6839b47f2b1cd56c90dc38da7bb612df7e052d90 (patch) | |
tree | acffae36122d018201e9bf74f07ccc2671fa6951 /gdb/testsuite | |
parent | 672f9b600994c1a377477b6d88b7f63aaf9c7ffe (diff) | |
download | gdb-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/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-events.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-events.py | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 62eb291..c33f55b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-04-30 Kevin Pouget <kevin.pouget@st.com> + + Handle multiple breakpoint hits in Python interface: + * 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. + 2011-09-13 Sami Wagiaalla <swagiaal@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp index 8493809..2d2139d 100644 --- a/gdb/testsuite/gdb.python/py-events.exp +++ b/gdb/testsuite/gdb.python/py-events.exp @@ -40,12 +40,15 @@ if ![runto_main ] then { gdb_test "Test_Events" "Event testers registered." gdb_breakpoint "first" +gdb_breakpoint "first" # Test continue event and breakpoint stop event gdb_test "continue" ".*event type: continue.* .*event type: stop.* .*stop reason: breakpoint.* +.*first breakpoint number: 2.* .*breakpoint number: 2.* +.*breakpoint number: 3.* all threads stopped" #test exited event. diff --git a/gdb/testsuite/gdb.python/py-events.py b/gdb/testsuite/gdb.python/py-events.py index 9f05b9f..10aea4f 100644 --- a/gdb/testsuite/gdb.python/py-events.py +++ b/gdb/testsuite/gdb.python/py-events.py @@ -31,7 +31,9 @@ def breakpoint_stop_handler (event): print "event type: stop" if (isinstance (event, gdb.BreakpointEvent)): print "stop reason: breakpoint" - print "breakpoint number: %s" % (event.breakpoint.number) + print "first breakpoint number: %s" % (event.breakpoint.number) + for bp in event.breakpoints: + print "breakpoint number: %s" % (bp.number) if ( event.inferior_thread is not None) : print "thread num: %s" % (event.inferior_thread.num); else: |