diff options
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/python/py-unwind.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-unwind.exp | 3 |
4 files changed, 11 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 03f30af..7908142 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-07-06 Pedro Alves <palves@redhat.com> + + * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition. + 2017-07-04 Pedro Alves <palves@redhat.com> * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC. diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 1d800a7..acfce7d 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -595,7 +595,7 @@ pyuw_dealloc_cache (struct frame_info *this_frame, void *cache) TRACE_PY_UNWIND (3, "%s: enter", __FUNCTION__); cached_frame_info *cached_frame = (cached_frame_info *) cache; - for (int i = 0; cached_frame->reg_count; i++) + for (int i = 0; i < cached_frame->reg_count; i++) xfree (cached_frame->reg[i].data); xfree (cache); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6160c4b..d6a7252 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-07-06 Pedro Alves <palves@redhat.com> + + * gdb.python/py-unwind.exp: Test flushregs. + 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com> PR cli/21688 diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp index 0a4d34f..625b04c 100644 --- a/gdb/testsuite/gdb.python/py-unwind.exp +++ b/gdb/testsuite/gdb.python/py-unwind.exp @@ -51,4 +51,5 @@ gdb_test_sequence "where" "Backtrace restored by unwinder" { "\\r\\n#2 .* main \\(.*\\) at" } - +# Check that the Python unwinder frames can be flushed / released. +gdb_test "flushregs" "Register cache flushed\\." "flush frames" |