* ada-lang.c (ada_decode_symbol): Check and set 'ada_mangled'.
[deliverable/binutils-gdb.git] / gdb / symtab.h
index 7c27bf927b049c0b7dc68bed40bc5b0f91fcd63f..a1da44be9cb98aded6148e0bca5b5332114cda15 100644 (file)
@@ -135,6 +135,11 @@ struct general_symbol_info
 
   union
   {
+    /* A pointer to an obstack that can be used for storage associated
+       with this symbol.  This is only used by Ada, and only when the
+       'ada_mangled' field is zero.  */
+    struct obstack *obstack;
+
     /* This is used by languages which wish to store a demangled name.
        currently used by Ada, Java, and Objective C.  */
     struct mangled_lang
@@ -153,6 +158,11 @@ struct general_symbol_info
 
   ENUM_BITFIELD(language) language : 8;
 
+  /* This is only used by Ada.  If set, then the 'mangled_lang' field
+     of language_specific is valid.  Otherwise, the 'obstack' field is
+     valid.  */
+  unsigned int ada_mangled : 1;
+
   /* Which section is this symbol in?  This is an index into
      section_offsets for this objfile.  Negative means that the symbol
      does not get relocated relative to a section.
@@ -196,10 +206,11 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
 
 /* Initializes the language dependent portion of a symbol
    depending upon the language for the symbol.  */
-#define SYMBOL_SET_LANGUAGE(symbol,language) \
-  (symbol_set_language (&(symbol)->ginfo, (language)))
+#define SYMBOL_SET_LANGUAGE(symbol,language,obstack)   \
+  (symbol_set_language (&(symbol)->ginfo, (language), (obstack)))
 extern void symbol_set_language (struct general_symbol_info *symbol,
-                                 enum language language);
+                                 enum language language,
+                                struct obstack *obstack);
 
 /* Set just the linkage name of a symbol; do not try to demangle
    it.  Used for constructs which do not have a mangled name,
This page took 0.024861 seconds and 4 git commands to generate.