* objfiles.c (objfile_relocate): Do not relocate the same
authorUlrich Weigand <uweigand@de.ibm.com>
Tue, 14 Jul 2009 14:55:06 +0000 (14:55 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Tue, 14 Jul 2009 14:55:06 +0000 (14:55 +0000)
BLOCKVECTOR_MAP address map multiple times.

gdb/ChangeLog
gdb/objfiles.c

index 2056b31d98a1cf73a99b8bb25a35b930fe0f8f82..690f76a04616ed6c0560f87d02cd80c68348d5d0 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-14  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * objfiles.c (objfile_relocate): Do not relocate the same
+       BLOCKVECTOR_MAP address map multiple times.
+
 2009-07-14  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * remote.c (process_stop_reply): Access expedited target registers
index 795d53b3f547326f7ea5ab506a875ef173eef6e5..69b366f0e6082413beb00ca7e3f8a66a294465cb 100644 (file)
@@ -570,6 +570,10 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
        continue;
 
       bv = BLOCKVECTOR (s);
+      if (BLOCKVECTOR_MAP (bv))
+       addrmap_relocate (BLOCKVECTOR_MAP (bv),
+                         ANOFFSET (delta, s->block_line_section));
+
       for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); ++i)
        {
          struct block *b;
@@ -579,9 +583,6 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
          b = BLOCKVECTOR_BLOCK (bv, i);
          BLOCK_START (b) += ANOFFSET (delta, s->block_line_section);
          BLOCK_END (b) += ANOFFSET (delta, s->block_line_section);
-          if (BLOCKVECTOR_MAP (bv))
-            addrmap_relocate (BLOCKVECTOR_MAP (bv),
-                              ANOFFSET (delta, s->block_line_section));
 
          ALL_BLOCK_SYMBOLS (b, iter, sym)
            {