aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/dwarf2/read.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 11a2d3e..a5bc1d8 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -6460,7 +6460,13 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language)
if (cu->has_loclist && gcc_4_minor >= 5)
cust->set_locations_valid (true);
- if (gcc_4_minor >= 5)
+ int major, minor;
+ if (cu->producer != nullptr
+ && producer_is_gcc (cu->producer, &major, &minor)
+ && (major < 4 || (major == 4 && minor < 5)))
+ /* Don't trust gcc < 4.5.x. */
+ cust->set_epilogue_unwind_valid (false);
+ else
cust->set_epilogue_unwind_valid (true);
cust->set_call_site_htab (cu->call_site_htab);