This is the mail archive of the 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]

[commit] Add comment to make_blockvector


This patch adds a comment to make_blockvector to alert the reader that
the code is aware that GLOBAL_BLOCK and STATIC_BLOCK are special.

2012-06-04  Doug Evans  <>

	* buildsym.c (make_blockvector): Add comment.

Index: buildsym.c
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.97
diff -u -p -r1.97 buildsym.c
--- buildsym.c	29 May 2012 20:23:17 -0000	1.97
+++ buildsym.c	5 Jun 2012 00:23:44 -0000
@@ -496,10 +496,13 @@ make_blockvector (struct objfile *objfil
       = addrmap_create_fixed (pending_addrmap, &objfile->objfile_obstack);
     BLOCKVECTOR_MAP (blockvector) = 0;
   /* Some compilers output blocks in the wrong order, but we depend on
      their being in the right order so we can binary search.  Check the
-     order and moan about it.  */
+     order and moan about it.
+     Note: Remember that the first two blocks are the global and static
+     blocks.  We could special case that fact and begin checking at block 2.
+     To avoid making that assumption we do not.  */
   if (BLOCKVECTOR_NBLOCKS (blockvector) > 1)
       for (i = 1; i < BLOCKVECTOR_NBLOCKS (blockvector); i++)

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