gdb: introduce objfile text_section_offset and data_section_offset methods
[deliverable/binutils-gdb.git] / gdb / dwarf2-frame.c
index a043d48217bf3ad37a46ce526ca38eaf3da0569f..40eb7f564321d05ec63956cab4331c2fcb3337ab 100644 (file)
@@ -384,7 +384,7 @@ execute_cfa_program (struct dwarf2_fde *fde, const gdb_byte *insn_ptr,
                                           fde->cie->ptr_size, insn_ptr,
                                           &bytes_read, fde->initial_location);
              /* Apply the objfile offset for relocatable objects.  */
-             fs->pc += fde->cie->unit->objfile->section_offsets[SECT_OFF_TEXT (fde->cie->unit->objfile)];
+             fs->pc += fde->cie->unit->objfile->text_section_offset ();
              insn_ptr += bytes_read;
              break;
 
@@ -1686,7 +1686,7 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
        continue;
 
       gdb_assert (!objfile->section_offsets.empty ());
-      offset = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
+      offset = objfile->text_section_offset ();
 
       gdb_assert (fde_table->num_entries > 0);
       if (*pc < offset + fde_table->entries[0]->initial_location)
This page took 0.025503 seconds and 4 git commands to generate.