Change section_offsets to a std::vector
[deliverable/binutils-gdb.git] / gdb / dwarf2-frame.c
index 9b49daec7190131c971d3dcdbb1f74e050ac1fc1..baa47c9438980c36c665fc899fc89fd44bf2b06e 100644 (file)
@@ -384,8 +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 += ANOFFSET (fde->cie->unit->objfile->section_offsets,
-                                 SECT_OFF_TEXT (fde->cie->unit->objfile));
+             fs->pc += fde->cie->unit->objfile->section_offsets[SECT_OFF_TEXT (fde->cie->unit->objfile)];
              insn_ptr += bytes_read;
              break;
 
@@ -1686,8 +1685,8 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
       if (fde_table->num_entries == 0)
        continue;
 
-      gdb_assert (objfile->section_offsets);
-      offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+      gdb_assert (!objfile->section_offsets.empty ());
+      offset = objfile->section_offsets[SECT_OFF_TEXT (objfile)];
 
       gdb_assert (fde_table->num_entries > 0);
       if (*pc < offset + fde_table->entries[0]->initial_location)
This page took 0.024522 seconds and 4 git commands to generate.