summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-06 18:50:08 +0000
committerDoug Evans <dje@google.com>2013-05-06 18:50:08 +0000
commit96e1ff24b57219e6dffbb90cc023e4cf5027a688 (patch)
tree7b550edc7c7149b4aedefdec166e4a29741fa6a6 /gdb/symfile.c
parent7862bb5d7eb447f0ae4279d04aedf05bcc254526 (diff)
downloadgdb-96e1ff24b57219e6dffbb90cc023e4cf5027a688.tar.gz
* symfile.c (syms_from_objfile_1): Use correct section count when
objfile->sf == NULL.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 13740df0ea1..48d5f73131b 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -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