diff options
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index a37ed69..eaa5281 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -40,6 +40,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "ui-out.h" #include "block.h" #include "infcall.h" +#include "dictionary.h" struct cleanup *unresolved_names; @@ -3433,7 +3434,8 @@ symtab_for_sym (struct symbol *sym) struct objfile *objfile; struct block *b; struct symbol *tmp_sym; - int i, j; + struct dict_iterator iter; + int j; ALL_SYMTABS (objfile, s) { @@ -3447,10 +3449,10 @@ symtab_for_sym (struct symbol *sym) case LOC_BLOCK: case LOC_CONST_BYTES: b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); - ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym) + ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym) return s; b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); - ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym) + ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym) return s; break; default: @@ -3474,7 +3476,7 @@ symtab_for_sym (struct symbol *sym) j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1) { b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j); - ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym) + ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym) return s; } break; @@ -3947,7 +3949,7 @@ ada_add_block_symbols (struct block *block, const char *name, domain_enum domain, struct objfile *objfile, int wild) { - int i; + struct dict_iterator iter; int name_len = strlen (name); /* A matching argument symbol, if any. */ struct symbol *arg_sym; @@ -3960,7 +3962,7 @@ ada_add_block_symbols (struct block *block, const char *name, if (wild) { struct symbol *sym; - ALL_BLOCK_SYMBOLS (block, i, sym) + ALL_BLOCK_SYMBOLS (block, iter, sym) { if (SYMBOL_DOMAIN (sym) == domain && wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (sym))) @@ -3989,7 +3991,7 @@ ada_add_block_symbols (struct block *block, const char *name, } else { - ALL_BLOCK_SYMBOLS (block, i, sym) + ALL_BLOCK_SYMBOLS (block, iter, sym) { if (SYMBOL_DOMAIN (sym) == domain) { @@ -4034,7 +4036,7 @@ ada_add_block_symbols (struct block *block, const char *name, arg_sym = NULL; found_sym = 0; - ALL_BLOCK_SYMBOLS (block, i, sym) + ALL_BLOCK_SYMBOLS (block, iter, sym) { struct symbol *sym = BLOCK_SYM (block, i); @@ -4098,7 +4100,7 @@ fill_in_ada_prototype (struct symbol *func) { struct block *b; int nargs, nsyms; - int i; + struct dict_iterator iter; struct type *ftype; struct type *rtype; size_t max_fields; @@ -4124,7 +4126,7 @@ fill_in_ada_prototype (struct symbol *func) max_fields = 8; TYPE_FIELDS (ftype) = (struct field *) xmalloc (sizeof (struct field) * max_fields); - ALL_BLOCK_SYMBOLS (b, i, sym) + ALL_BLOCK_SYMBOLS (b, iter, sym) { GROW_VECT (TYPE_FIELDS (ftype), max_fields, nargs + 1); @@ -4697,8 +4699,8 @@ debug_print_lines (struct linetable *lt) static void debug_print_block (struct block *b) { - int i; - struct symbol *i; + struct dict_iterator iter; + struct symbol *sym; fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]", b, BLOCK_START (b), BLOCK_END (b)); @@ -4707,10 +4709,8 @@ debug_print_block (struct block *b) fprintf (stderr, "\n"); fprintf (stderr, "\t Superblock: %p\n", BLOCK_SUPERBLOCK (b)); fprintf (stderr, "\t Symbols:"); - ALL_BLOCK_SYMBOLS (b, i, sym) + ALL_BLOCK_SYMBOLS (b, iter, sym) { - if (i > 0 && i % 4 == 0) - fprintf (stderr, "\n\t\t "); fprintf (stderr, " %s", DEPRECATED_SYMBOL_NAME (sym)); } fprintf (stderr, "\n"); |