* python/py-autoload.c (print_script): Print "Missing" instead of
[deliverable/binutils-gdb.git] / gdb / symtab.h
index e4ec4bfd9737036ba355bc070b0090ab6f15997d..12f52a21dc4a0312801bb8842ae1b28b298816ab 100644 (file)
@@ -290,6 +290,9 @@ enum minimal_symbol_type
 {
   mst_unknown = 0,             /* Unknown type, the default */
   mst_text,                    /* Generally executable instructions */
+  mst_text_gnu_ifunc,          /* Executable code returning address
+                                  of executable code */
+  mst_slot_got_plt,            /* GOT entries for .plt sections */
   mst_data,                    /* Generally initialized data */
   mst_bss,                     /* Generally uninitialized data */
   mst_abs,                     /* Generally absolute (nonrelocatable) */
@@ -392,22 +395,27 @@ typedef enum domain_enum_tag
 
   /* LABEL_DOMAIN may be used for names of labels (for gotos).  */
 
-  LABEL_DOMAIN,
+  LABEL_DOMAIN
+} domain_enum;
 
-  /* Searching domains.  These overlap with VAR_DOMAIN, providing
-     some granularity with the search_symbols function.  */
+/* Searching domains, used for `search_symbols'.  Element numbers are
+   hardcoded in GDB, check all enum uses before changing it.  */
 
+enum search_domain
+{
   /* Everything in VAR_DOMAIN minus FUNCTIONS_DOMAIN and
      TYPES_DOMAIN.  */
-  VARIABLES_DOMAIN,
+  VARIABLES_DOMAIN = 0,
 
   /* All functions -- for some reason not methods, though.  */
-  FUNCTIONS_DOMAIN,
+  FUNCTIONS_DOMAIN = 1,
 
   /* All defined types */
-  TYPES_DOMAIN
-}
-domain_enum;
+  TYPES_DOMAIN = 2,
+
+  /* Any type.  */
+  ALL_DOMAIN = 3
+};
 
 /* An address-class says where to find the value of a symbol.  */
 
@@ -738,8 +746,7 @@ struct section_offsets
 
 struct symtab
 {
-
-  /* Chain of all existing symtabs.  */
+  /* Unordered chain of all existing symtabs of this objfile.  */
 
   struct symtab *next;
 
@@ -763,7 +770,13 @@ struct symtab
      should be designated the primary, so that the blockvector
      is relocated exactly once by objfile_relocate.  */
 
-  int primary;
+  unsigned int primary : 1;
+
+  /* Symtab has been compiled with both optimizations and debug info so that
+     GDB may stop skipping prologues as variables locations are valid already
+     at function entry points.  */
+
+  unsigned int locations_valid : 1;
 
   /* The macro table for this symtab.  Like the blockvector, this
      may be shared between different symtabs --- and normally is for
@@ -778,23 +791,6 @@ struct symtab
 
   char *dirname;
 
-  /* This component says how to free the data we point to:
-     free_nothing => do nothing; some other symtab will free
-     the data this one uses.
-     free_linetable => free just the linetable.  FIXME: Is this redundant
-     with the primary field?  */
-
-  enum free_code
-  {
-    free_nothing, free_linetable
-  }
-  free_code;
-
-  /* A function to call to free space, if necessary.  This is IN
-     ADDITION to the action indicated by free_code.  */
-
-  void (*free_func)(struct symtab *symtab);
-
   /* Total number of lines found in source file.  */
 
   int nlines;
@@ -814,11 +810,11 @@ struct symtab
      for automated testing of gdb but may also be information that is
      useful to the user.  */
 
-  char *debugformat;
+  const char *debugformat;
 
   /* String of producer version information.  May be zero.  */
 
-  char *producer;
+  const char *producer;
 
   /* Full name of file as found by searching the source path.
      NULL if not yet known.  */
@@ -954,6 +950,11 @@ extern struct symbol *find_pc_function (CORE_ADDR);
 
 extern struct symbol *find_pc_sect_function (CORE_ADDR, struct obj_section *);
 
+extern int find_pc_partial_function_gnu_ifunc (CORE_ADDR pc, char **name,
+                                              CORE_ADDR *address,
+                                              CORE_ADDR *endaddr,
+                                              int *is_gnu_ifunc_p);
+
 /* lookup function from address, return name, start addr and end addr.  */
 
 extern int find_pc_partial_function (CORE_ADDR, char **, CORE_ADDR *,
@@ -1013,6 +1014,13 @@ extern unsigned int msymbol_hash_iw (const char *);
 
 extern unsigned int msymbol_hash (const char *);
 
+/* Compute the next hash value from previous HASH and the character C.  This
+   is only a GDB in-memory computed value with no external files compatibility
+   requirements.  */
+
+#define SYMBOL_HASH_NEXT(hash, c) \
+  ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
+
 extern struct objfile * msymbol_objfile (struct minimal_symbol *sym);
 
 extern void
@@ -1035,6 +1043,35 @@ extern struct minimal_symbol *lookup_minimal_symbol_by_pc_name
 
 extern struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR);
 
+extern int in_gnu_ifunc_stub (CORE_ADDR pc);
+
+/* Functions for resolving STT_GNU_IFUNC symbols which are implemented only
+   for ELF symbol files.  */
+
+struct gnu_ifunc_fns
+{
+  /* See elf_gnu_ifunc_resolve_addr for its real implementation.  */
+  CORE_ADDR (*gnu_ifunc_resolve_addr) (struct gdbarch *gdbarch, CORE_ADDR pc);
+
+  /* See elf_gnu_ifunc_resolve_name for its real implementation.  */
+  int (*gnu_ifunc_resolve_name) (const char *function_name,
+                                CORE_ADDR *function_address_p);
+
+  /* See elf_gnu_ifunc_resolver_stop for its real implementation.  */
+  void (*gnu_ifunc_resolver_stop) (struct breakpoint *b);
+
+  /* See elf_gnu_ifunc_resolver_return_stop for its real implementation.  */
+  void (*gnu_ifunc_resolver_return_stop) (struct breakpoint *b);
+};
+
+#define gnu_ifunc_resolve_addr gnu_ifunc_fns_p->gnu_ifunc_resolve_addr
+#define gnu_ifunc_resolve_name gnu_ifunc_fns_p->gnu_ifunc_resolve_name
+#define gnu_ifunc_resolver_stop gnu_ifunc_fns_p->gnu_ifunc_resolver_stop
+#define gnu_ifunc_resolver_return_stop \
+  gnu_ifunc_fns_p->gnu_ifunc_resolver_return_stop
+
+extern const struct gnu_ifunc_fns *gnu_ifunc_fns_p;
+
 extern struct minimal_symbol *
     lookup_minimal_symbol_and_objfile (const char *,
                                       struct objfile **);
@@ -1145,8 +1182,6 @@ void maintenance_check_symtabs (char *, int);
 
 void maintenance_print_statistics (char *, int);
 
-extern void free_symtab (struct symtab *);
-
 /* Symbol-reading stuff in symfile.c and solib.c.  */
 
 extern void clear_solib (void);
@@ -1157,6 +1192,7 @@ extern int identify_source_line (struct symtab *, int, int, CORE_ADDR);
 
 extern void print_source_lines (struct symtab *, int, int, int);
 
+extern void forget_cached_source_info_for_objfile (struct objfile *);
 extern void forget_cached_source_info (void);
 
 extern void select_source_symtab (struct symtab *);
@@ -1227,7 +1263,7 @@ struct symbol_search
   struct symbol_search *next;
 };
 
-extern void search_symbols (char *, domain_enum, int, char **,
+extern void search_symbols (char *, enum search_domain, int, char **,
                            struct symbol_search **);
 extern void free_search_symbols (struct symbol_search *);
 extern struct cleanup *make_cleanup_free_search_symbols (struct symbol_search
This page took 0.026173 seconds and 4 git commands to generate.