Disable epilogue unwinders on recent GCCs.
* amd64-tdep.c (amd64_in_function_epilogue_p): New variable symtab,
initialize it, return 0 on EPILOGUE_UNWIND_VALID.
* dwarf2read.c (process_full_comp_unit): Initialize
EPILOGUE_UNWIND_VALID.
* i386-tdep.c (i386_in_function_epilogue_p): New variable symtab,
initialize it, return 0 on EPILOGUE_UNWIND_VALID.
* symtab.h (struct symtab): New field epilogue_unwind_valid.
+2011-06-29 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Disable epilogue unwinders on recent GCCs.
+ * amd64-tdep.c (amd64_in_function_epilogue_p): New variable symtab,
+ initialize it, return 0 on EPILOGUE_UNWIND_VALID.
+ * dwarf2read.c (process_full_comp_unit): Initialize
+ EPILOGUE_UNWIND_VALID.
+ * i386-tdep.c (i386_in_function_epilogue_p): New variable symtab,
+ initialize it, return 0 on EPILOGUE_UNWIND_VALID.
+ * symtab.h (struct symtab): New field epilogue_unwind_valid.
+
2011-06-29 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup - reformatting.
amd64_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_byte insn;
+ struct symtab *symtab;
+
+ symtab = find_pc_symtab (pc);
+ if (symtab && symtab->epilogue_unwind_valid)
+ return 0;
if (target_read_memory (pc, &insn, 1))
return 0; /* Can't read memory at pc. */
*/
if (cu->has_loclist && gcc_4_minor >= 0)
symtab->locations_valid = 1;
+
+ if (gcc_4_minor >= 5)
+ symtab->epilogue_unwind_valid = 1;
}
if (dwarf2_per_objfile->using_index)
i386_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_byte insn;
+ struct symtab *symtab;
+
+ symtab = find_pc_symtab (pc);
+ if (symtab && symtab->epilogue_unwind_valid)
+ return 0;
if (target_read_memory (pc, &insn, 1))
return 0; /* Can't read memory at pc. */
unsigned int locations_valid : 1;
+ /* DWARF unwinder for this CU is valid even for epilogues (PC at the return
+ instruction). This is supported by GCC since 4.5.0. */
+
+ unsigned int epilogue_unwind_valid : 1;
+
/* The macro table for this symtab. Like the blockvector, this
may be shared between different symtabs --- and normally is for
all the symtabs in a given compilation unit. */