mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-10 03:02:30 +00:00
* dwarf2-frame.c (struct comp_unit): Add tbase member to store
base for DW_EH_PE_textrel encodings. (read_encoded_value): Add a DW_EH_PE_textrel case. (dwarf2_build_frame_info): Set unit.tbase to beginning of text section.
This commit is contained in:
parent
b079391aac
commit
0fd8504376
@ -1,3 +1,11 @@
|
||||
2003-10-03 Corinna Vinschen <vinschen@redhat.com>
|
||||
|
||||
* dwarf2-frame.c (struct comp_unit): Add tbase member to store
|
||||
base for DW_EH_PE_textrel encodings.
|
||||
(read_encoded_value): Add a DW_EH_PE_textrel case.
|
||||
(dwarf2_build_frame_info): Set unit.tbase to beginning of text
|
||||
section.
|
||||
|
||||
2003-10-03 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* dwarf2-frame.c (dwarf2_build_frame_info): Fix comment.
|
||||
|
@ -885,6 +885,9 @@ struct comp_unit
|
||||
|
||||
/* Base for DW_EH_PE_datarel encodings. */
|
||||
bfd_vma dbase;
|
||||
|
||||
/* Base for DW_EH_PE_textrel encodings. */
|
||||
bfd_vma tbase;
|
||||
};
|
||||
|
||||
const struct objfile_data *dwarf2_frame_data;
|
||||
@ -1063,6 +1066,9 @@ read_encoded_value (struct comp_unit *unit, unsigned char encoding,
|
||||
case DW_EH_PE_datarel:
|
||||
base = unit->dbase;
|
||||
break;
|
||||
case DW_EH_PE_textrel:
|
||||
base = unit->tbase;
|
||||
break;
|
||||
case DW_EH_PE_aligned:
|
||||
base = 0;
|
||||
offset = buf - unit->dwarf_frame_buffer;
|
||||
@ -1523,12 +1529,13 @@ dwarf2_build_frame_info (struct objfile *objfile)
|
||||
unit.objfile = objfile;
|
||||
unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8;
|
||||
unit.dbase = 0;
|
||||
unit.tbase = 0;
|
||||
|
||||
/* First add the information from the .eh_frame section. That way,
|
||||
the FDEs from that section are searched last. */
|
||||
if (dwarf_eh_frame_offset)
|
||||
{
|
||||
asection *got;
|
||||
asection *got, *txt;
|
||||
|
||||
unit.cie = NULL;
|
||||
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
|
||||
@ -1547,6 +1554,11 @@ dwarf2_build_frame_info (struct objfile *objfile)
|
||||
if (got)
|
||||
unit.dbase = got->vma;
|
||||
|
||||
/* GCC emits the DW_EH_PE_textrel encoding type on sh and ia64 so far. */
|
||||
txt = bfd_get_section_by_name (unit.abfd, ".text");
|
||||
if (txt)
|
||||
unit.tbase = txt->vma;
|
||||
|
||||
frame_ptr = unit.dwarf_frame_buffer;
|
||||
while (frame_ptr < unit.dwarf_frame_buffer + unit.dwarf_frame_size)
|
||||
frame_ptr = decode_frame_entry (&unit, frame_ptr, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user