diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-12-02 16:41:39 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-12-02 16:41:39 +0000 |
commit | 188dd5d64fcfd149e6c9b27e8f39002a8e1a9632 (patch) | |
tree | 8f192d7565ab3d4380d1f8ec63b5e4335ddaf007 /gdb/dwarf2-frame.c | |
parent | da8bce141c0fb5262b21bbd923d0116a3c082b88 (diff) | |
download | gdb-188dd5d64fcfd149e6c9b27e8f39002a8e1a9632.zip gdb-188dd5d64fcfd149e6c9b27e8f39002a8e1a9632.tar.gz gdb-188dd5d64fcfd149e6c9b27e8f39002a8e1a9632.tar.bz2 |
* dwarf2read.c (dwarf_info_offset, dwarf_abbrev_offset)
(dwarf_line_offset, dwarf_pubnames_offset, dwarf_aranges_offset)
(dwarf_loc_offset, dwarf_macinfo_offset, dwarf_str_offset)
(dwarf_ranges_offset, dwarf_frame_offset, dwarf_eh_frame_offset):
Delete.
(dwarf2_read_section): Remove offset and size arguments. Use
bfd_get_section_size_before_reloc and sectp->filepos.
(dwarf2_has_info): Clear section variables instead of offsets.
(dwarf2_locate_sections): Don't initialize the deleted variables.
(dwarf2_build_psymtabs): Update calls to dwarf2_read_section.
(dwarf2_build_psymtabs_easy): Likewise.
* dwarf2-frame.c (dwarf_frame_offset, dwarf_frame_size)
(dwarf_eh_frame_offset, dwarf_eh_frame_size): Remove extern
declarations.
(dwarf2_read_section): Update prototype.
(dwarf2_build_frame_info): Update calls to dwarf2_read_section.
Use bfd_get_section_size_before_reloc instead of global size
variables.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index ccad418..34b21f8 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1507,16 +1507,11 @@ decode_frame_entry (struct comp_unit *unit, char *start, int eh_frame_p) dwarf2read.c in a better way. */ /* Imported from dwarf2read.c. */ -extern file_ptr dwarf_frame_offset; -extern unsigned int dwarf_frame_size; extern asection *dwarf_frame_section; -extern file_ptr dwarf_eh_frame_offset; -extern unsigned int dwarf_eh_frame_size; extern asection *dwarf_eh_frame_section; /* Imported from dwarf2read.c. */ -extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset, - unsigned int size, asection *sectp); +extern char *dwarf2_read_section (struct objfile *objfile, asection *sectp); void dwarf2_build_frame_info (struct objfile *objfile) @@ -1533,17 +1528,16 @@ dwarf2_build_frame_info (struct objfile *objfile) /* First add the information from the .eh_frame section. That way, the FDEs from that section are searched last. */ - if (dwarf_eh_frame_offset) + if (dwarf_eh_frame_section) { asection *got, *txt; unit.cie = NULL; unit.dwarf_frame_buffer = dwarf2_read_section (objfile, - dwarf_eh_frame_offset, - dwarf_eh_frame_size, dwarf_eh_frame_section); - unit.dwarf_frame_size = dwarf_eh_frame_size; + unit.dwarf_frame_size + = bfd_get_section_size_before_reloc (dwarf_eh_frame_section); unit.dwarf_frame_section = dwarf_eh_frame_section; /* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base @@ -1565,14 +1559,13 @@ dwarf2_build_frame_info (struct objfile *objfile) frame_ptr = decode_frame_entry (&unit, frame_ptr, 1); } - if (dwarf_frame_offset) + if (dwarf_frame_section) { unit.cie = NULL; unit.dwarf_frame_buffer = dwarf2_read_section (objfile, - dwarf_frame_offset, - dwarf_frame_size, dwarf_frame_section); - unit.dwarf_frame_size = dwarf_frame_size; + unit.dwarf_frame_size + = bfd_get_section_size_before_reloc (dwarf_frame_section); unit.dwarf_frame_section = dwarf_frame_section; frame_ptr = unit.dwarf_frame_buffer; |