Cleanup value_fetch_lazy's comment and return value
[deliverable/binutils-gdb.git] / gdb / psympriv.h
index 370ce86b3159ff83b7879e8fcb4cf0cadcf64e83..ea2454cacfdd247006a6daacaf4c07bbc38eb61f 100644 (file)
@@ -1,6 +1,6 @@
 /* Private partial symbol table definitions.
 
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -45,7 +45,9 @@ struct partial_symbol
 
   ENUM_BITFIELD(domain_enum_tag) domain : 6;
 
-  /* Address class (for info_symbols).  */
+  /* Address class (for info_symbols).  Note that we don't allow
+     synthetic "aclass" values here at present, simply because there's
+     no need.  */
 
   ENUM_BITFIELD(address_class) aclass : 6;
 
@@ -82,7 +84,9 @@ struct partial_symtab
 
   struct partial_symtab *next;
 
-  /* Name of the source file which this partial_symtab defines.  */
+  /* Name of the source file which this partial_symtab defines,
+     or if the psymtab is anonymous then a descriptive name for
+     debugging purposes, or "".  It must not be NULL.  */
 
   const char *filename;
 
@@ -94,14 +98,6 @@ struct partial_symtab
 
   const char *dirname;
 
-  /* Information about the object file from which symbols should be read.  */
-
-  struct objfile *objfile;
-
-  /* Set of relocation offsets to apply to each section.  */
-
-  struct section_offsets *section_offsets;
-
   /* Range of text addresses covered by this file; texthigh is the
      beginning of the next section.  Do not use if PSYMTABS_ADDRMAP_SUPPORTED
      is set.  */
@@ -109,19 +105,6 @@ struct partial_symtab
   CORE_ADDR textlow;
   CORE_ADDR texthigh;
 
-  /* Array of pointers to all of the partial_symtab's which this one
-     depends on.  Since this array can only be set to previous or
-     the current (?) psymtab, this dependency tree is guaranteed not
-     to have any loops.  "depends on" means that symbols must be read
-     for the dependencies before being read for this psymtab; this is
-     for type references in stabs, where if foo.c includes foo.h, declarations
-     in foo.h may use type numbers defined in foo.c.  For other debugging
-     formats there may be no need to use dependencies.  */
-
-  struct partial_symtab **dependencies;
-
-  int number_of_dependencies;
-
   /* If NULL, this is an ordinary partial symbol table.
 
      If non-NULL, this holds a single includer of this partial symbol
@@ -151,6 +134,19 @@ struct partial_symtab
 
   struct partial_symtab *user;
 
+  /* Array of pointers to all of the partial_symtab's which this one
+     depends on.  Since this array can only be set to previous or
+     the current (?) psymtab, this dependency tree is guaranteed not
+     to have any loops.  "depends on" means that symbols must be read
+     for the dependencies before being read for this psymtab; this is
+     for type references in stabs, where if foo.c includes foo.h, declarations
+     in foo.h may use type numbers defined in foo.c.  For other debugging
+     formats there may be no need to use dependencies.  */
+
+  struct partial_symtab **dependencies;
+
+  int number_of_dependencies;
+
   /* Global symbol list.  This list will be sorted after readin to
      improve access.  Binary search will be the usual method of
      finding a symbol within it.  globals_offset is an integer offset
@@ -182,19 +178,23 @@ struct partial_symtab
 
   unsigned char psymtabs_addrmap_supported;
 
+  /* True if the name of this partial symtab is not a source file name.  */
+
+  unsigned char anonymous;
+
   /* A flag that is temporarily used when searching psymtabs.  */
 
   ENUM_BITFIELD (psymtab_search_status) searched_flag : 2;
 
-  /* Pointer to symtab eventually allocated for this source file, 0 if
+  /* Pointer to compunit eventually allocated for this source file, 0 if
      !readin or if we haven't looked for the symtab after it was readin.  */
 
-  struct symtab *symtab;
+  struct compunit_symtab *compunit_symtab;
 
   /* Pointer to function which will read in the symtab corresponding to
      this psymtab.  */
 
-  void (*read_symtab) (struct partial_symtab *);
+  void (*read_symtab) (struct partial_symtab *, struct objfile *);
 
   /* Information that lets read_symtab() locate the part of the symbol table
      that this psymtab corresponds to.  This information is private to the
@@ -204,7 +204,7 @@ struct partial_symtab
   void *read_symtab_private;
 };
 
-extern void sort_pst_symbols (struct partial_symtab *);
+extern void sort_pst_symbols (struct objfile *, struct partial_symtab *);
 
 /* Add any kind of symbol to a psymbol_allocation_list.  */
 
@@ -218,15 +218,17 @@ extern void add_psymbol_to_list (const char *, int,
 extern void init_psymbol_list (struct objfile *, int);
 
 extern struct partial_symtab *start_psymtab_common (struct objfile *,
-                                                   struct section_offsets *,
                                                    const char *, CORE_ADDR,
                                                    struct partial_symbol **,
                                                    struct partial_symbol **);
 
 extern struct partial_symtab *allocate_psymtab (const char *,
-                                               struct objfile *);
+                                               struct objfile *)
+  ATTRIBUTE_NONNULL (1);
+
+extern void discard_psymtab (struct objfile *, struct partial_symtab *);
 
-extern void discard_psymtab (struct partial_symtab *);
+extern struct cleanup *make_cleanup_discard_psymtabs (struct objfile *);
 
 /* Traverse all psymtabs in one objfile.  */
 
This page took 0.03622 seconds and 4 git commands to generate.