gdb/
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.
This commit is contained in:
parent
4632c0d0ff
commit
e0d00bc749
@ -1,3 +1,14 @@
|
||||
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.
|
||||
|
@ -2219,6 +2219,11 @@ static int
|
||||
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. */
|
||||
|
@ -4751,6 +4751,9 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
|
||||
*/
|
||||
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)
|
||||
|
@ -1885,6 +1885,11 @@ static int
|
||||
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. */
|
||||
|
@ -779,6 +779,11 @@ struct symtab
|
||||
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user