From fa0b349ab8fec78e3296fdd8042001cc54511032 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 7 Jul 2020 01:19:55 +0100 Subject: [PATCH] Fix crash, part 1 --- gdb/dwarf2/frame-tailcall.c | 6 ++++-- gdb/value.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/dwarf2/frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c index 16dba2b201..cb9fd4a506 100644 --- a/gdb/dwarf2/frame-tailcall.c +++ b/gdb/dwarf2/frame-tailcall.c @@ -377,7 +377,7 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, get_frame_address_in_block will decrease it by 1 in such case. */ this_pc = get_frame_address_in_block (this_frame); - /* Catch any unwinding errors. */ + /* Catch NO_ENTRY_VALUE_ERROR thrown by call_site_find_chain. */ try { int sp_regnum; @@ -439,7 +439,9 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, { if (entry_values_debug) exception_print (gdb_stdout, except); - return; + if (except.error == NO_ENTRY_VALUE_ERROR) + return; + throw; } /* Ambiguous unwind or unambiguous unwind verified as matching. */ diff --git a/gdb/value.c b/gdb/value.c index 97a099ddbd..e22ef96c4c 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1413,6 +1413,8 @@ value_optimized_out (struct value *value) catch (const gdb_exception_error &ex) { /* Fall back to checking value->optimized_out. */ + if (ex.error != OPTIMIZED_OUT_ERROR) + throw; } } base-commit: ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 prerequisite-patch-id: 32ffdda7d7d774bc4df88bf848bcb796559b53ce prerequisite-patch-id: 02021b74355b70debd344a6e445285c67dfef7d6 prerequisite-patch-id: c87fcf5a54f6805967cbf8ab107606c57d9ecf52 prerequisite-patch-id: ac7dee583d0ffa519c9d1cd89d27664bca68d8c1 prerequisite-patch-id: eac59ae2ea85d2d51e5be1b03e88a5641cc12c22 prerequisite-patch-id: 13da42ad04dc8e2e3bd6a556a0be0e17cf23669b prerequisite-patch-id: fd3f09fdb58ddc1c595ea014716851f4c8fca48c -- 2.14.5