summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 19:56:02 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 19:56:02 +0000
commitfcb4486c32cb089362753f42c4e69ddb2aeee705 (patch)
tree400aab25956685f6365854a68efd97899b4f8e5e /gdb/symtab.h
parentcbc30f137ef95dda9cfbe90eeb6292b9fdb0da69 (diff)
downloadgdb-fcb4486c32cb089362753f42c4e69ddb2aeee705.tar.gz
* ada-lang.c (ada_decode_symbol): Check and set 'ada_mangled'.
Use symbol's obstack, not an objfile. * coffread.c (process_coff_symbol): Update. * dwarf2read.c (fixup_go_packaging, new_symbol_full): Update. * jv-lang.c (add_class_symbol): Update. * mdebugread.c (new_symbol): Update. * minsyms.c (prim_record_minimal_symbol_full) (terminate_minimal_symbol_table): Update. * psymtab.c (add_psymbol_to_bcache): Clear entire symbol. Update. * stabsread.c (define_symbol, read_enum_type): Update. * symtab.c (symbol_set_demangled_name, symbol_get_demangled_name): Handle Ada specially. (symbol_set_language): Add 'obstack' argument. (symbol_set_names): Update. (symbol_natural_name, symbol_demangled_name): Always use ada_decode_symbol. * symtab.h (struct general_symbol_info) <language_specific::obstack>: New field. <ada_mangled>: New field. (SYMBOL_SET_LANGUAGE): Add 'obstack' argument. (symbol_set_language): Update.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 7c27bf927b0..a1da44be9cb 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -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,