aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/dwarf2/frame-tailcall.c18
-rw-r--r--gdb/value.c13
3 files changed, 36 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 59db340..3cf2cf1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2020-07-10 Pedro Alves <pedro@palves.net>
+
+ * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
+ NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
+ NOT_AVAILABLE_ERROR.
+ * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
+ OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
+
2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
Pedro Alves <pedro@palves.net>
diff --git a/gdb/dwarf2/frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c
index 2d219f1..7ea6dac 100644
--- a/gdb/dwarf2/frame-tailcall.c
+++ b/gdb/dwarf2/frame-tailcall.c
@@ -377,7 +377,6 @@ 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. */
try
{
int sp_regnum;
@@ -404,7 +403,22 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame,
{
if (entry_values_debug)
exception_print (gdb_stdout, except);
- return;
+
+ switch (except.error)
+ {
+ case NO_ENTRY_VALUE_ERROR:
+ /* Thrown by call_site_find_chain. */
+ case MEMORY_ERROR:
+ case OPTIMIZED_OUT_ERROR:
+ case NOT_AVAILABLE_ERROR:
+ /* These can normally happen when we try to access an
+ optimized out or unavailable register, either in a
+ physical register or spilled to memory. */
+ return;
+ }
+
+ /* Let unexpected errors propagate. */
+ throw;
}
/* Ambiguous unwind or unambiguous unwind verified as matching. */
diff --git a/gdb/value.c b/gdb/value.c
index 97a099d..00d8ded 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1412,7 +1412,18 @@ value_optimized_out (struct value *value)
}
catch (const gdb_exception_error &ex)
{
- /* Fall back to checking value->optimized_out. */
+ switch (ex.error)
+ {
+ case MEMORY_ERROR:
+ case OPTIMIZED_OUT_ERROR:
+ case NOT_AVAILABLE_ERROR:
+ /* These can normally happen when we try to access an
+ optimized out or unavailable register, either in a
+ physical register or spilled to memory. */
+ break;
+ default:
+ throw;
+ }
}
}