summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index e695ebef78f..39f5623749d 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -43,6 +43,7 @@
#include "breakpoint.h"
#include "block.h"
+#include "dictionary.h"
/* Prototypes for local functions */
@@ -613,7 +614,8 @@ void
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct section_offsets *delta =
- (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)));
{
int i;
@@ -656,13 +658,13 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct block *b;
struct symbol *sym;
- int j;
+ struct dict_iterator iter;
b = BLOCKVECTOR_BLOCK (bv, i);
BLOCK_START (b) += ANOFFSET (delta, s->block_line_section);
BLOCK_END (b) += ANOFFSET (delta, s->block_line_section);
- ALL_BLOCK_SYMBOLS (b, j, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
fixup_symbol_section (sym, objfile);