* symfile.c (syms_from_objfile_1): Use correct section count when
authorDoug Evans <dje@google.com>
Mon, 6 May 2013 18:50:08 +0000 (18:50 +0000)
committerDoug Evans <dje@google.com>
Mon, 6 May 2013 18:50:08 +0000 (18:50 +0000)
objfile->sf == NULL.

gdb/ChangeLog
gdb/symfile.c

index 25962917a1030e3d198fbfe395c50386cd5b1b58..43a502a0153536ab6a4eef9a5a538dbde6b73117 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-06  Doug Evans  <dje@google.com>
+
+       * symfile.c (syms_from_objfile_1): Use correct section count when
+       objfile->sf == NULL.
+
 2013-05-06  Mike Frysinger  <vapier@gentoo.org>
 
        * common/linux-btrace.c (intel_supports_btrace): Fix indentation.
index 13740df0ea1a3f9ff95a5134e9c74974bbe3aef5..48d5f73131bf730ddbdd33baec801043b027c080 100644 (file)
@@ -949,7 +949,7 @@ syms_from_objfile_1 (struct objfile *objfile,
       /* No symbols to load, but we still need to make sure
         that the section_offsets table is allocated.  */
       int num_sections = gdb_bfd_count_sections (objfile->obfd);
-      size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets);
+      size_t size = SIZEOF_N_SECTION_OFFSETS (num_sections);
 
       objfile->num_sections = num_sections;
       objfile->section_offsets