* tracepoint.c (scope_info): Update.
authorTom Tromey <tromey@redhat.com>
Thu, 10 May 2012 19:50:09 +0000 (19:50 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 10 May 2012 19:50:09 +0000 (19:50 +0000)
* symtab.c (lookup_block_symbol, iterate_over_symbols)
(find_pc_sect_symtab, search_symbols)
(default_make_symbol_completion_list_break_on)
(make_file_symbol_completion_list): Update.
* symmisc.c (dump_symtab_1): Update.
* stack.c (print_frame_args, iterate_over_block_locals)
(print_frame_labels, iterate_over_block_arg_vars): Update.
* python/py-block.c (block_object) <dict>: Remove.
<block>: New field.
<iter>: Change type.
(blpy_iter): Update.
(blpy_block_syms_iternext): Update.
* psymtab.c (map_block): Use block iterators.
* objfiles.c (objfile_relocate1): Use ALL_DICT_SYMBOLS.
* mi/mi-cmd-stack.c (list_args_or_locals): Update.
* mdebugread.c (parse_symbol, mylookup_symbol): Update.
* infrun.c (check_exception_resume): Update.
* cp-support.c (make_symbol_overload_list_block): Update.
* coffread.c (patch_opaque_types): Update.
* buildsym.c (finish_block, end_symtab): Use ALL_DICT_SYMBOLS.
* block.h (struct block_iterator): New.
(block_iterator_first, block_iterator_next, block_iter_name_first)
(block_iter_name_next, block_iter_match_first)
(block_iter_match_next): Declare.
(ALL_BLOCK_SYMBOLS): Redefine.
* block.c (block_iterator_first, block_iterator_next)
(block_iter_name_first, block_iter_name_next)
(block_iter_match_first, block_iter_match_next): New functions.
* ada-lang.c (ada_add_block_symbols)
(ada_make_symbol_completion_list): Use block iterator.

17 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/block.c
gdb/block.h
gdb/buildsym.c
gdb/coffread.c
gdb/cp-support.c
gdb/infrun.c
gdb/mdebugread.c
gdb/mi/mi-cmd-stack.c
gdb/objfiles.c
gdb/psymtab.c
gdb/python/py-block.c
gdb/stack.c
gdb/symmisc.c
gdb/symtab.c
gdb/tracepoint.c

index 060395e86464570b11760841d981d6e1fa4ee1ae..f62a45fb80de4f90dd9df3d571aeb9b4afe8a514 100644 (file)
@@ -1,3 +1,37 @@
+2012-05-10  Tom Tromey  <tromey@redhat.com>
+
+       * tracepoint.c (scope_info): Update.
+       * symtab.c (lookup_block_symbol, iterate_over_symbols)
+       (find_pc_sect_symtab, search_symbols)
+       (default_make_symbol_completion_list_break_on)
+       (make_file_symbol_completion_list): Update.
+       * symmisc.c (dump_symtab_1): Update.
+       * stack.c (print_frame_args, iterate_over_block_locals)
+       (print_frame_labels, iterate_over_block_arg_vars): Update.
+       * python/py-block.c (block_object) <dict>: Remove.
+       <block>: New field.
+       <iter>: Change type.
+       (blpy_iter): Update.
+       (blpy_block_syms_iternext): Update.
+       * psymtab.c (map_block): Use block iterators.
+       * objfiles.c (objfile_relocate1): Use ALL_DICT_SYMBOLS.
+       * mi/mi-cmd-stack.c (list_args_or_locals): Update.
+       * mdebugread.c (parse_symbol, mylookup_symbol): Update.
+       * infrun.c (check_exception_resume): Update.
+       * cp-support.c (make_symbol_overload_list_block): Update.
+       * coffread.c (patch_opaque_types): Update.
+       * buildsym.c (finish_block, end_symtab): Use ALL_DICT_SYMBOLS.
+       * block.h (struct block_iterator): New.
+       (block_iterator_first, block_iterator_next, block_iter_name_first)
+       (block_iter_name_next, block_iter_match_first)
+       (block_iter_match_next): Declare.
+       (ALL_BLOCK_SYMBOLS): Redefine.
+       * block.c (block_iterator_first, block_iterator_next)
+       (block_iter_name_first, block_iter_name_next)
+       (block_iter_match_first, block_iter_match_next): New functions.
+       * ada-lang.c (ada_add_block_symbols)
+       (ada_make_symbol_completion_list): Use block iterator.
+
 2012-05-10  Tom Tromey  <tromey@redhat.com>
 
        * psymtab.c (PSYMTAB_TO_SYMTAB): Remove.
index 180fadb774d4c103ede90d8034ec42b149a80f5a..ad17cb41c0cf8b9744041f37f376713efd63d1d4 100644 (file)
@@ -5515,7 +5515,7 @@ ada_add_block_symbols (struct obstack *obstackp,
                        domain_enum domain, struct objfile *objfile,
                        int wild)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   int name_len = strlen (name);
   /* A matching argument symbol, if any.  */
   struct symbol *arg_sym;
@@ -5527,9 +5527,8 @@ ada_add_block_symbols (struct obstack *obstackp,
   found_sym = 0;
   if (wild)
     {
-      for (sym = dict_iter_match_first (BLOCK_DICT (block), name,
-                                       wild_match, &iter);
-          sym != NULL; sym = dict_iter_match_next (name, wild_match, &iter))
+      for (sym = block_iter_match_first (block, name, wild_match, &iter);
+          sym != NULL; sym = block_iter_match_next (name, wild_match, &iter))
       {
         if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
                                    SYMBOL_DOMAIN (sym), domain)
@@ -5551,9 +5550,8 @@ ada_add_block_symbols (struct obstack *obstackp,
     }
   else
     {
-     for (sym = dict_iter_match_first (BLOCK_DICT (block), name,
-                                      full_match, &iter);
-          sym != NULL; sym = dict_iter_match_next (name, full_match, &iter))
+     for (sym = block_iter_match_first (block, name, full_match, &iter);
+         sym != NULL; sym = block_iter_match_next (name, full_match, &iter))
       {
         if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
                                    SYMBOL_DOMAIN (sym), domain))
@@ -5816,7 +5814,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
   struct objfile *objfile;
   struct block *b, *surrounding_static_block = 0;
   int i;
-  struct dict_iterator iter;
+  struct block_iterator iter;
 
   if (text0[0] == '<')
     {
index 57ab4c2024469bd2ecbef285750629369d4bb076..3318cb4377d55a73e7c380200e226f320b226737 100644 (file)
@@ -369,3 +369,62 @@ allocate_block (struct obstack *obstack)
 
   return bl;
 }
+
+\f
+
+/* See block.h.  */
+
+struct symbol *
+block_iterator_first (const struct block *block,
+                     struct block_iterator *iterator)
+{
+  return dict_iterator_first (block->dict, &iterator->dict_iter);
+}
+
+/* See block.h.  */
+
+struct symbol *
+block_iterator_next (struct block_iterator *iterator)
+{
+  return dict_iterator_next (&iterator->dict_iter);
+}
+
+/* See block.h.  */
+
+struct symbol *
+block_iter_name_first (const struct block *block,
+                      const char *name,
+                      struct block_iterator *iterator)
+{
+  return dict_iter_name_first (block->dict, name, &iterator->dict_iter);
+}
+
+/* See block.h.  */
+
+struct symbol *
+block_iter_name_next (const char *name, struct block_iterator *iterator)
+{
+  return dict_iter_name_next (name, &iterator->dict_iter);
+}
+
+/* See block.h.  */
+
+struct symbol *
+block_iter_match_first (const struct block *block,
+                       const char *name,
+                       symbol_compare_ftype *compare,
+                       struct block_iterator *iterator)
+{
+  return dict_iter_match_first (block->dict, name, compare,
+                               &iterator->dict_iter);
+}
+
+/* See block.h.  */
+
+struct symbol *
+block_iter_match_next (const char *name,
+                      symbol_compare_ftype *compare,
+                      struct block_iterator *iterator)
+{
+  return dict_iter_match_next (name, compare, &iterator->dict_iter);
+}
index 2cbcc1b8470d7431a8e60312961771f9bac6e49e..2eec346b392391ace4825c3993426af83089d89c 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef BLOCK_H
 #define BLOCK_H
 
+#include "dictionary.h"
+
 /* Opaque declarations.  */
 
 struct symbol;
@@ -27,7 +29,6 @@ struct symtab;
 struct block_namespace_info;
 struct using_direct;
 struct obstack;
-struct dictionary;
 struct addrmap;
 
 /* All of the name-scope contours of the program
@@ -105,13 +106,6 @@ struct block
 #define BLOCK_DICT(bl)         (bl)->dict
 #define BLOCK_NAMESPACE(bl)   (bl)->language_specific.cplus_specific.namespace
 
-/* Macro to loop through all symbols in a block BL, in no particular
-   order.  ITER helps keep track of the iteration, and should be a
-   struct dict_iterator.  SYM points to the current symbol.  */
-
-#define ALL_BLOCK_SYMBOLS(block, iter, sym)                    \
-       ALL_DICT_SYMBOLS (BLOCK_DICT (block), iter, sym)
-
 struct blockvector
 {
   /* Number of blocks in the list.  */
@@ -167,4 +161,80 @@ extern const struct block *block_global_block (const struct block *block);
 
 extern struct block *allocate_block (struct obstack *obstack);
 
+
+/* A block iterator.  This structure should be treated as though it
+   were opaque; it is only defined here because we want to support
+   stack allocation of iterators.  */
+
+struct block_iterator
+{
+  /* The underlying dictionary iterator.  */
+
+  struct dict_iterator dict_iter;
+};
+
+/* Initialize ITERATOR to point at the first symbol in BLOCK, and
+   return that first symbol, or NULL if BLOCK is empty.  */
+
+extern struct symbol *block_iterator_first (const struct block *block,
+                                           struct block_iterator *iterator);
+
+/* Advance ITERATOR, and return the next symbol, or NULL if there are
+   no more symbols.  Don't call this if you've previously received
+   NULL from block_iterator_first or block_iterator_next on this
+   iteration.  */
+
+extern struct symbol *block_iterator_next (struct block_iterator *iterator);
+
+/* Initialize ITERATOR to point at the first symbol in BLOCK whose
+   SYMBOL_SEARCH_NAME is NAME (as tested using strcmp_iw), and return
+   that first symbol, or NULL if there are no such symbols.  */
+
+extern struct symbol *block_iter_name_first (const struct block *block,
+                                            const char *name,
+                                            struct block_iterator *iterator);
+
+/* Advance ITERATOR to point at the next symbol in BLOCK whose
+   SYMBOL_SEARCH_NAME is NAME (as tested using strcmp_iw), or NULL if
+   there are no more such symbols.  Don't call this if you've
+   previously received NULL from block_iterator_first or
+   block_iterator_next on this iteration.  And don't call it unless
+   ITERATOR was created by a previous call to block_iter_name_first
+   with the same NAME.  */
+
+extern struct symbol *block_iter_name_next (const char *name,
+                                           struct block_iterator *iterator);
+
+/* Initialize ITERATOR to point at the first symbol in BLOCK whose
+   SYMBOL_SEARCH_NAME is NAME, as tested using COMPARE (which must use
+   the same conventions as strcmp_iw and be compatible with any
+   block hashing function), and return that first symbol, or NULL
+   if there are no such symbols.  */
+
+extern struct symbol *block_iter_match_first (const struct block *block,
+                                             const char *name,
+                                             symbol_compare_ftype *compare,
+                                             struct block_iterator *iterator);
+
+/* Advance ITERATOR to point at the next symbol in BLOCK whose
+   SYMBOL_SEARCH_NAME is NAME, as tested using COMPARE (see
+   block_iter_match_first), or NULL if there are no more such symbols.
+   Don't call this if you've previously received NULL from 
+   block_iterator_match_first or block_iterator_match_next on this
+   iteration.  And don't call it unless ITERATOR was created by a
+   previous call to block_iter_match_first with the same NAME and COMPARE.  */
+
+extern struct symbol *block_iter_match_next (const char *name,
+                                            symbol_compare_ftype *compare,
+                                            struct block_iterator *iterator);
+
+/* Macro to loop through all symbols in a block BL, in no particular
+   order.  ITER helps keep track of the iteration, and should be a
+   struct block_iterator.  SYM points to the current symbol.  */
+
+#define ALL_BLOCK_SYMBOLS(block, iter, sym)            \
+  for ((sym) = block_iterator_first ((block), &(iter));        \
+       (sym);                                          \
+       (sym) = block_iterator_next (&(iter)))
+
 #endif /* BLOCK_H */
index 36b1395f3b02e5ecd47c3afdfb76b5741ae5a541..58c2693e1126b892b49797bfd6a2705e8ec3b550 100644 (file)
@@ -261,7 +261,10 @@ finish_block (struct symbol *symbol, struct pending **listhead,
             parameter symbols.  */
          int nparams = 0, iparams;
          struct symbol *sym;
-         ALL_BLOCK_SYMBOLS (block, iter, sym)
+
+         /* Here we want to directly access the dictionary, because
+            we haven't fully initialized the block yet.  */
+         ALL_DICT_SYMBOLS (BLOCK_DICT (block), iter, sym)
            {
              if (SYMBOL_IS_ARGUMENT (sym))
                nparams++;
@@ -273,7 +276,9 @@ finish_block (struct symbol *symbol, struct pending **listhead,
                TYPE_ALLOC (ftype, nparams * sizeof (struct field));
 
              iparams = 0;
-             ALL_BLOCK_SYMBOLS (block, iter, sym)
+             /* Here we want to directly access the dictionary, because
+                we haven't fully initialized the block yet.  */
+             ALL_DICT_SYMBOLS (BLOCK_DICT (block), iter, sym)
                {
                  if (iparams == nparams)
                    break;
@@ -1173,9 +1178,9 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
            if (SYMBOL_SYMTAB (BLOCK_FUNCTION (block)) == NULL)
              SYMBOL_SYMTAB (BLOCK_FUNCTION (block)) = symtab;
 
-         for (sym = dict_iterator_first (BLOCK_DICT (block), &iter);
-              sym != NULL;
-              sym = dict_iterator_next (&iter))
+         /* Note that we only want to fix up symbols from the local
+            blocks, not blocks coming from included symtabs.  */
+         ALL_DICT_SYMBOLS (BLOCK_DICT (block), iter, sym)
            if (SYMBOL_SYMTAB (sym) == NULL)
              SYMBOL_SYMTAB (sym) = symtab;
        }
index 2a8ee424fed952cf74e18f34939093552a33ec5d..ec6f7d72d630810bba4c4ba3585bf0ac729c0ea0 100644 (file)
@@ -1471,7 +1471,7 @@ static void
 patch_opaque_types (struct symtab *s)
 {
   struct block *b;
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *real_sym;
 
   /* Go through the per-file symbols only.  */
index 025b4de31ffbc854de966b706d7511b78822706d..8419a19854b31057f821dd3911e7400fda14c3d5 100644 (file)
@@ -1140,14 +1140,12 @@ static void
 make_symbol_overload_list_block (const char *name,
                                  const struct block *block)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym;
 
-  const struct dictionary *dict = BLOCK_DICT (block);
-
-  for (sym = dict_iter_name_first (dict, name, &iter);
+  for (sym = block_iter_name_first (block, name, &iter);
        sym != NULL;
-       sym = dict_iter_name_next (name, &iter))
+       sym = block_iter_name_next (name, &iter))
     overload_list_add_symbol (sym, name);
 }
 
index c3074d5cd9830545cb44b3249f33690b48cea17e..81b6f5cb4a2d85c24c3341cb48f506bb206e9843 100644 (file)
@@ -5620,7 +5620,7 @@ check_exception_resume (struct execution_control_state *ecs,
   TRY_CATCH (e, RETURN_MASK_ERROR)
     {
       struct block *b;
-      struct dict_iterator iter;
+      struct block_iterator iter;
       struct symbol *sym;
       int argno = 0;
 
index a20f9533ba43e6a1a49cadfc0753d872042fbdbf..d1b91779088a4950350fa139e2e3aa62822f0c47 100644 (file)
@@ -1184,7 +1184,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
 
              if (nparams > 0)
                {
-                 struct dict_iterator iter;
+                 struct block_iterator iter;
 
                  TYPE_NFIELDS (ftype) = nparams;
                  TYPE_FIELDS (ftype) = (struct field *)
@@ -4607,7 +4607,7 @@ static struct symbol *
 mylookup_symbol (char *name, struct block *block,
                 domain_enum domain, enum address_class class)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   int inc;
   struct symbol *sym;
 
index f537dd6cd23f7a5035df5a8b66149adf1a2887b1..fe3e0bf2bcd17a494a4d59ea92503cc4d4338910 100644 (file)
@@ -328,7 +328,7 @@ list_args_or_locals (enum what_to_list what, enum print_values values,
 {
   struct block *block;
   struct symbol *sym;
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct cleanup *cleanup_list;
   struct type *type;
   char *name_of_result;
index 1f4913a982297a2066ad0483560b6f25a3f39bf9..8d9f8a5484cfcf4a1f28408d0042f43259820258 100644 (file)
@@ -730,7 +730,9 @@ objfile_relocate1 (struct objfile *objfile,
          BLOCK_START (b) += ANOFFSET (delta, s->block_line_section);
          BLOCK_END (b) += ANOFFSET (delta, s->block_line_section);
 
-         ALL_BLOCK_SYMBOLS (b, iter, sym)
+         /* We only want to iterate over the local symbols, not any
+            symbols in included symtabs.  */
+         ALL_DICT_SYMBOLS (BLOCK_DICT (b), iter, sym)
            {
              relocate_one_symbol (sym, objfile, delta);
            }
index 5fb8ad4887ec4e2aa386f3e1172441868f3fa812..9620de8bd351f6e15fc874c0a987e6816f194f75 100644 (file)
@@ -1182,11 +1182,11 @@ map_block (const char *name, domain_enum namespace, struct objfile *objfile,
           int (*callback) (struct block *, struct symbol *, void *),
           void *data, symbol_compare_ftype *match)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym;
 
-  for (sym = dict_iter_match_first (BLOCK_DICT (block), name, match, &iter);
-       sym != NULL; sym = dict_iter_match_next (name, match, &iter))
+  for (sym = block_iter_match_first (block, name, match, &iter);
+       sym != NULL; sym = block_iter_match_next (name, match, &iter))
     {
       if (symbol_matches_domain (SYMBOL_LANGUAGE (sym), 
                                 SYMBOL_DOMAIN (sym), namespace))
index ac48193121f96e25a0c9e267ff65b13fedca3579..68d0a1595cb87a419f14ae88aa2a357b3e1c7819 100644 (file)
@@ -41,10 +41,10 @@ typedef struct blpy_block_object {
 
 typedef struct {
   PyObject_HEAD
-  /* The block dictionary of symbols.  */
-  struct dictionary *dict;
-  /* The iterator for that dictionary.  */
-  struct dict_iterator iter;
+  /* The block.  */
+  const struct block *block;
+  /* The iterator for that block.  */
+  struct block_iterator iter;
   /* Has the iterator been initialized flag.  */
   int initialized_p;
   /* Pointer back to the original source block object.  Needed to
@@ -94,7 +94,7 @@ blpy_iter (PyObject *self)
   if (block_iter_obj == NULL)
       return NULL;
 
-  block_iter_obj->dict = BLOCK_DICT (block);
+  block_iter_obj->block = block;
   block_iter_obj->initialized_p = 0;
   Py_INCREF (self);
   block_iter_obj->source = (block_object *) self;
@@ -311,11 +311,11 @@ blpy_block_syms_iternext (PyObject *self)
 
   if (!iter_obj->initialized_p)
     {
-      sym = dict_iterator_first (iter_obj->dict,  &(iter_obj->iter));
+      sym = block_iterator_first (iter_obj->block,  &(iter_obj->iter));
       iter_obj->initialized_p = 1;
     }
   else
-    sym = dict_iterator_next (&(iter_obj->iter));
+    sym = block_iterator_next (&(iter_obj->iter));
 
   if (sym == NULL)
     {
index bbd6b7fe328e6cbea4a8e69ad0df173474fa0674..2c2797e81b420d6b5a670af89c7cadd6a425bf9f 100644 (file)
@@ -512,7 +512,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
   if (func)
     {
       struct block *b = SYMBOL_BLOCK_VALUE (func);
-      struct dict_iterator iter;
+      struct block_iterator iter;
       struct symbol *sym;
 
       ALL_BLOCK_SYMBOLS (b, iter, sym)
@@ -1821,7 +1821,7 @@ iterate_over_block_locals (struct block *b,
                           iterate_over_block_arg_local_vars_cb cb,
                           void *cb_data)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym;
 
   ALL_BLOCK_SYMBOLS (b, iter, sym)
@@ -1858,7 +1858,7 @@ static int
 print_block_frame_labels (struct gdbarch *gdbarch, struct block *b,
                          int *have_default, struct ui_file *stream)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym;
   int values_printed = 0;
 
@@ -1990,7 +1990,7 @@ iterate_over_block_arg_vars (struct block *b,
                             iterate_over_block_arg_local_vars_cb cb,
                             void *cb_data)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym, *sym2;
 
   ALL_BLOCK_SYMBOLS (b, iter, sym)
index b0ab29b6c7d35dc24108ec14d5019a05d8151d29..d5a737b0498593ec1452fab3f9eb2cda73e7e4de 100644 (file)
@@ -353,8 +353,9 @@ dump_symtab_1 (struct objfile *objfile, struct symtab *symtab,
            }
          fprintf_filtered (outfile, "\n");
          /* Now print each symbol in this block (in no particular order, if
-            we're using a hashtable).  */
-         ALL_BLOCK_SYMBOLS (b, iter, sym)
+            we're using a hashtable).  Note that we only want this
+            block, not any blocks from included symtabs.  */
+         ALL_DICT_SYMBOLS (BLOCK_DICT (b), iter, sym)
            {
              struct print_symbol_args s;
 
index 3fce349a3bec9b6cd9a6d4f9170efcedcf5d4c94..d4555d9d6548bf063d993cd728b0e56de3251337 100644 (file)
@@ -1924,14 +1924,14 @@ struct symbol *
 lookup_block_symbol (const struct block *block, const char *name,
                     const domain_enum domain)
 {
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym;
 
   if (!BLOCK_FUNCTION (block))
     {
-      for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
+      for (sym = block_iter_name_first (block, name, &iter);
           sym != NULL;
-          sym = dict_iter_name_next (name, &iter))
+          sym = block_iter_name_next (name, &iter))
        {
          if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
                                     SYMBOL_DOMAIN (sym), domain))
@@ -1949,9 +1949,9 @@ lookup_block_symbol (const struct block *block, const char *name,
 
       struct symbol *sym_found = NULL;
 
-      for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
+      for (sym = block_iter_name_first (block, name, &iter);
           sym != NULL;
-          sym = dict_iter_name_next (name, &iter))
+          sym = block_iter_name_next (name, &iter))
        {
          if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
                                     SYMBOL_DOMAIN (sym), domain))
@@ -1986,12 +1986,12 @@ iterate_over_symbols (const struct block *block, const char *name,
 {
   while (block)
     {
-      struct dict_iterator iter;
+      struct block_iterator iter;
       struct symbol *sym;
 
-      for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
+      for (sym = block_iter_name_first (block, name, &iter);
           sym != NULL;
-          sym = dict_iter_name_next (name, &iter))
+          sym = block_iter_name_next (name, &iter))
        {
          if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
                                     SYMBOL_DOMAIN (sym), domain))
@@ -2081,7 +2081,7 @@ find_pc_sect_symtab (CORE_ADDR pc, struct obj_section *section)
          }
        if (section != 0)
          {
-           struct dict_iterator iter;
+           struct block_iterator iter;
            struct symbol *sym = NULL;
 
            ALL_BLOCK_SYMBOLS (b, iter, sym)
@@ -3329,7 +3329,7 @@ search_symbols (char *regexp, enum search_domain kind,
   struct blockvector *bv;
   struct block *b;
   int i = 0;
-  struct dict_iterator iter;
+  struct block_iterator iter;
   struct symbol *sym;
   struct objfile *objfile;
   struct minimal_symbol *msymbol;
@@ -4131,7 +4131,7 @@ default_make_symbol_completion_list_break_on (char *text, char *word,
   struct objfile *objfile;
   struct block *b;
   const struct block *surrounding_static_block, *surrounding_global_block;
-  struct dict_iterator iter;
+  struct block_iterator iter;
   /* The symbol we are completing on.  Points in same buffer as text.  */
   char *sym_text;
   /* Length of sym_text.  */
@@ -4363,7 +4363,7 @@ make_file_symbol_completion_list (char *text, char *word, char *srcfile)
   struct symbol *sym;
   struct symtab *s;
   struct block *b;
-  struct dict_iterator iter;
+  struct block_iterator iter;
   /* The symbol we are completing on.  Points in same buffer as text.  */
   char *sym_text;
   /* Length of sym_text.  */
index 6e47a0a7dee642032dc4388015a4118e352e85db..88fd01cbbfcc023e50504aeb77fa2a5f29d258eb 100644 (file)
@@ -2612,7 +2612,7 @@ scope_info (char *args, int from_tty)
   struct block *block;
   const char *symname;
   char *save_args = args;
-  struct dict_iterator iter;
+  struct block_iterator iter;
   int j, count = 0;
   struct gdbarch *gdbarch;
   int regno;