aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2-frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r--gdb/dwarf2-frame.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 6a40df5..c40726a 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -780,6 +780,8 @@ struct comp_unit
bfd_vma dbase;
};
+const struct objfile_data *dwarf2_frame_data;
+
static unsigned int
read_1_byte (bfd *bfd, char *buf)
{
@@ -1024,7 +1026,7 @@ dwarf2_frame_find_fde (CORE_ADDR *pc)
offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- fde = objfile->sym_private;
+ fde = objfile_data (objfile, dwarf2_frame_data);
while (fde)
{
if (*pc >= fde->initial_location + offset
@@ -1044,8 +1046,8 @@ dwarf2_frame_find_fde (CORE_ADDR *pc)
static void
add_fde (struct comp_unit *unit, struct dwarf2_fde *fde)
{
- fde->next = unit->objfile->sym_private;
- unit->objfile->sym_private = fde;
+ fde->next = objfile_data (unit->objfile, dwarf2_frame_data);
+ set_objfile_data (unit->objfile, dwarf2_frame_data, fde);
}
#ifdef CC_HAS_LONG_LONG
@@ -1441,3 +1443,12 @@ dwarf2_build_frame_info (struct objfile *objfile)
frame_ptr = decode_frame_entry (&unit, frame_ptr, 0);
}
}
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_dwarf2_frame (void);
+
+void
+_initialize_dwarf2_frame (void)
+{
+ dwarf2_frame_data = register_objfile_data ();
+}