Look up primitive types as symbols.
[deliverable/binutils-gdb.git] / gdb / symmisc.c
index 3b6639df6515f0c42d0f9594ec0650af54e1262d..9ae0847f58bbdcae0e9466af4589d47a888ef1da 100644 (file)
@@ -466,8 +466,12 @@ print_symbol (void *args)
   struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
   int depth = ((struct print_symbol_args *) args)->depth;
   struct ui_file *outfile = ((struct print_symbol_args *) args)->outfile;
-  struct obj_section *section = SYMBOL_OBJ_SECTION (symbol_objfile (symbol),
-                                                   symbol);
+  struct obj_section *section;
+
+  if (SYMBOL_OBJFILE_OWNED (symbol))
+    section = SYMBOL_OBJ_SECTION (symbol_objfile (symbol), symbol);
+  else
+    section = NULL;
 
   print_spaces (depth, outfile);
   if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
This page took 0.024673 seconds and 4 git commands to generate.