Fix break on Python 2
[deliverable/binutils-gdb.git] / gdb / symtab.c
index b9f4f7747ad53227d14b7ce335d81122c4aa7aad..cc2f4001e0db43309edbde25dbb138f3fe2a7ee5 100644 (file)
@@ -1989,8 +1989,7 @@ lookup_symbol_aux (const char *name, const struct block *block,
          /* I'm not really sure that type of this can ever
             be typedefed; just be safe.  */
          t = check_typedef (t);
-         if (TYPE_CODE (t) == TYPE_CODE_PTR
-             || TYPE_CODE (t) == TYPE_CODE_REF)
+         if (TYPE_CODE (t) == TYPE_CODE_PTR || TYPE_IS_REFERENCE (t))
            t = TYPE_TARGET_TYPE (t);
 
          if (TYPE_CODE (t) != TYPE_CODE_STRUCT
@@ -5391,10 +5390,7 @@ static VEC (char_ptr) *
 make_file_symbol_completion_list_1 (const char *text, const char *word,
                                    const char *srcfile)
 {
-  struct symbol *sym;
   struct symtab *s;
-  struct block *b;
-  struct block_iterator iter;
   /* The symbol we are completing on.  Points in same buffer as text.  */
   const char *sym_text;
   /* Length of sym_text.  */
@@ -5464,18 +5460,9 @@ make_file_symbol_completion_list_1 (const char *text, const char *word,
 
   /* Go through this symtab and check the externs and statics for
      symbols which match.  */
-
-  b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), GLOBAL_BLOCK);
-  ALL_BLOCK_SYMBOLS (b, iter, sym)
-    {
-      COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
-    }
-
-  b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (s), STATIC_BLOCK);
-  ALL_BLOCK_SYMBOLS (b, iter, sym)
-    {
-      COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
-    }
+  add_symtab_completions (SYMTAB_COMPUNIT (s),
+                         sym_text, sym_text_len,
+                         text, word, TYPE_CODE_UNDEF);
 
   return (return_val);
 }
This page took 0.024076 seconds and 4 git commands to generate.