diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/frame-unwind.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp | 13 |
4 files changed, 25 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7b4c5b4..947bed4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-02-14 Pedro Alves <palves@redhat.com> + + * frame-unwind.c (frame_unwind_try_unwinder): Always call + frame_cleanup_after_sniffer on exception. + 2018-02-14 Tom Tromey <tom@tromey.com> * solist.h (struct target_so_ops) <bfd_open>: Make pathname diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index 66a28ae..e6e6353 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -110,13 +110,14 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache, /* Catch all exceptions, caused by either interrupt or error. Reset *THIS_CACHE. */ *this_cache = NULL; + frame_cleanup_after_sniffer (this_frame); + if (ex.error == NOT_AVAILABLE_ERROR) { /* This usually means that not even the PC is available, thus most unwinders aren't able to determine if they're the best fit. Keep trying. Fallback prologue unwinders should always accept the frame. */ - frame_cleanup_after_sniffer (this_frame); return 0; } throw_exception (ex); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1a4337c..8bcb50e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-02-14 Pedro Alves <palves@redhat.com> + + * gdb.base/bp-cmds-continue-ctrl-c.exp (do_test): Test "bt" after + getting a "Quit". + 2018-02-09 Markus Metzger <markus.t.metzger@intel.com> * lib/gdb.exp (skip_btrace_pt_tests): Update expected error message. diff --git a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp index 8c2fa77..43600fc 100644 --- a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp +++ b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp @@ -89,6 +89,19 @@ proc do_test {} { } -re "Quit\r\n$gdb_prompt $" { send_log "$internal_pass (Quit)\n" + + # Check that if we managed to quit somewhere deep in + # the unwinders, we can still unwind again. + set ok 0 + gdb_test_multiple "bt" "$internal_pass (bt)" { + -re "#0.*$gdb_prompt $" { + send_log "$internal_pass (bt)\n" + set ok 1 + } + } + if {!$ok} { + return + } } -re "Quit\r\n\r\nCommand aborted.\r\n$gdb_prompt $" { send_log "$internal_pass (Command aborted)\n" |