* valops.c (value_of_this): Use lookup_language_this.
[deliverable/binutils-gdb.git] / gdb / symtab.h
index 59bbe2450f380ba25260454047b79921d4e16184..2716f3479f38f568f554ea018af75676c87a9399 100644 (file)
@@ -33,6 +33,7 @@ struct blockvector;
 struct axs_value;
 struct agent_expr;
 struct program_space;
+struct language_defn;
 
 /* Some of the structures in this file are space critical.
    The space-critical structures are:
@@ -398,19 +399,23 @@ typedef enum domain_enum_tag
   LABEL_DOMAIN
 } domain_enum;
 
-/* Searching domains, used for `search_symbols'.  */
+/* 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
+  TYPES_DOMAIN = 2,
+
+  /* Any type.  */
+  ALL_DOMAIN = 3
 };
 
 /* An address-class says where to find the value of a symbol.  */
@@ -766,7 +771,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
@@ -837,10 +848,6 @@ struct symtab
 
 /* External variables and functions for the objects described above.  */
 
-/* See the comment in symfile.c about how current_objfile is used.  */
-
-extern struct objfile *current_objfile;
-
 /* True if we are nested inside psymtab_to_symtab.  */
 
 extern int currently_reading_symtab;
@@ -911,6 +918,9 @@ extern struct symbol *lookup_symbol_aux_block (const char *name,
                                               const struct block *block,
                                               const domain_enum domain);
 
+extern struct symbol *lookup_language_this (const struct language_defn *lang,
+                                           const struct block *block);
+
 /* Lookup a symbol only in the file static scope of all the objfiles.  */
 
 struct symbol *lookup_static_symbol_aux (const char *name,
@@ -1004,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
This page took 0.024504 seconds and 4 git commands to generate.