Look up primitive types as symbols.
[deliverable/binutils-gdb.git] / gdb / ada-lang.c
index 5d4ea2f5c08d491fecbae25b241744ce92836f44..5d5d61319035cc6873217b0b51749b9dad64f26d 100644 (file)
@@ -3716,7 +3716,10 @@ See set/show multiple-symbol."));
             (SYMBOL_CLASS (syms[i].sym) == LOC_CONST
              && SYMBOL_TYPE (syms[i].sym) != NULL
              && TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) == TYPE_CODE_ENUM);
-          struct symtab *symtab = symbol_symtab (syms[i].sym);
+         struct symtab *symtab = NULL;
+
+         if (SYMBOL_OBJFILE_OWNED (syms[i].sym))
+           symtab = symbol_symtab (syms[i].sym);
 
           if (SYMBOL_LINE (syms[i].sym) != 0 && symtab != NULL)
             printf_unfiltered (_("[%d] %s at %s:%d\n"),
@@ -4466,6 +4469,11 @@ cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
   char *copy;
   struct cache_entry *e;
 
+  /* Symbols for builtin types don't have a block.
+     For now don't cache such symbols.  */
+  if (sym != NULL && !SYMBOL_OBJFILE_OWNED (sym))
+    return;
+
   /* If the symbol is a local symbol, then do not cache it, as a search
      for that symbol depends on the context.  To determine whether
      the symbol is local or not, we check the block where we found it
This page took 0.035 seconds and 4 git commands to generate.