aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2cfi.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-01-31 19:22:18 +0000
committerDaniel Jacobowitz <drow@false.org>2003-01-31 19:22:18 +0000
commit086df311266af5a41ac06691cc1dcdfeee4fcb47 (patch)
tree8e211843191b1b38c04fc12b4ab41f30ced03639 /gdb/dwarf2cfi.c
parent122bfa9220daee52a8fa135d37b0cdd2e046f801 (diff)
downloadgdb-086df311266af5a41ac06691cc1dcdfeee4fcb47.zip
gdb-086df311266af5a41ac06691cc1dcdfeee4fcb47.tar.gz
gdb-086df311266af5a41ac06691cc1dcdfeee4fcb47.tar.bz2
* dbxread.c (stabs_data): New static variable.
(fill_symbuf): Support an in-memory buffer for stabs data. (stabs_seek): New function. (dbx_psymtab_to_symtab): Relocate the stabs data if necessary. (read_ofile_symtab): Use stabs_seek. (elfstab_build_psymtabs): Take an asection* instead of an offset and size. Relocate the stabs data if necessary. Save the section* for dbx_psymtab_to_symtab. * dwarf2read.c: Add section variables for each debug section. (dwarf2_locate_sections): Fill them in. (dwarf2_read_section): Take an asection* argument. Relocate the section contents if necessary. (dwarf2_build_psymtabs, dwarf2_build_psymtabs_easy): Update callers. * dwarf2cfi.c (parse_frame_info): Take a section argument and pass it to dwarf2_read_section. (dwarf2_build_frame_info): Update callers. * elfread.c (elf_symfile_read): Update call to elfstab_build_psymtabs. * gdb-stabs.h (struct dbx_symfile_info): Add stab_section. (DBX_STAB_SECTION): New macro. * stabsread.h (elfstab_build_psymtabs): Update prototype. * symfile.c (symfile_dummy_outputs): New function. (symfile_relocate_debug_section): New function. * symfile.h (symfile_relocate_debug_section): Add prototype.
Diffstat (limited to 'gdb/dwarf2cfi.c')
-rw-r--r--gdb/dwarf2cfi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 79ba418..c928855 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -170,10 +170,13 @@ extern file_ptr dwarf_frame_offset;
extern unsigned int dwarf_frame_size;
extern file_ptr dwarf_eh_frame_offset;
extern unsigned int dwarf_eh_frame_size;
+extern asection *dwarf_frame_section;
+extern asection *dwarf_eh_frame_section;
+
extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
- unsigned int size);
+ unsigned int size, asection* sectp);
static struct fde_unit *fde_unit_alloc (void);
static struct cie_unit *cie_unit_alloc (void);
@@ -1368,7 +1371,8 @@ compare_fde_unit (const void *a, const void *b)
-- mludvig */
static void
parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
- unsigned int frame_size, int eh_frame)
+ unsigned int frame_size, asection *frame_section,
+ int eh_frame)
{
bfd *abfd = objfile->obfd;
asection *curr_section_ptr;
@@ -1383,7 +1387,8 @@ parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
unwind_tmp_obstack_init ();
- frame_buffer = dwarf2_read_section (objfile, frame_offset, frame_size);
+ frame_buffer = dwarf2_read_section (objfile, frame_offset, frame_size,
+ frame_section);
start = frame_buffer;
end = frame_buffer + frame_size;
@@ -1636,12 +1641,14 @@ dwarf2_build_frame_info (struct objfile *objfile)
if (dwarf_frame_offset)
{
parse_frame_info (objfile, dwarf_frame_offset,
- dwarf_frame_size, 0 /* = debug_frame */ );
+ dwarf_frame_size, dwarf_frame_section,
+ 0 /* = debug_frame */ );
after_debug_frame = 1;
}
if (dwarf_eh_frame_offset)
parse_frame_info (objfile, dwarf_eh_frame_offset, dwarf_eh_frame_size,
+ dwarf_eh_frame_section,
1 /* = eh_frame */ + after_debug_frame);
}