This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[obv] (syms_from_objfile_1): Use correct section count when sf == NULL


Hi.
I happened notice this while doing some cleanups.
Checked in as obvious.

2013-05-06  Doug Evans  <dje@google.com>

	* symfile.c (syms_from_objfile_1): Use correct section count when
	objfile->sf == NULL.

Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.372
diff -u -p -r1.372 symfile.c
--- symfile.c	5 May 2013 16:54:26 -0000	1.372
+++ symfile.c	6 May 2013 18:48:56 -0000
@@ -949,7 +949,7 @@ syms_from_objfile_1 (struct objfile *obj
       /* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]