aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 7ae9346..841da4d 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -467,6 +467,14 @@ struct block
#define BLOCK_SUPERBLOCK(bl) (bl)->superblock
#define BLOCK_GCC_COMPILED(bl) (bl)->gcc_compile_flag
+/* Macro to loop through all symbols in a block BL.
+ i counts which symbol we are looking at, and sym points to the current
+ symbol. */
+#define ALL_BLOCK_SYMBOLS(bl, i, sym) \
+ for ((i) = 0, (sym) = BLOCK_SYM ((bl), (i)); \
+ (i) < BLOCK_NSYMS ((bl)); \
+ ++(i), (sym) = BLOCK_SYM ((bl), (i)))
+
/* Nonzero if symbols of block BL should be sorted alphabetically.
Don't sort a block which corresponds to a function. If we did the
sorting would have to preserve the order of the symbols for the