aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSami Wagiaalla <swagiaal@redhat.com>2010-07-16 19:23:56 +0000
committerSami Wagiaalla <swagiaal@redhat.com>2010-07-16 19:23:56 +0000
commit29df156df4e7df351f9ba24641df74739d39c8e8 (patch)
tree871abb704d7e9222c4b40e32aff076ec9d141ec0 /gdb/symtab.h
parent502abbdf22c780cc0acdc17b90159a8e475db036 (diff)
downloadgdb-29df156df4e7df351f9ba24641df74739d39c8e8.zip
gdb-29df156df4e7df351f9ba24641df74739d39c8e8.tar.gz
gdb-29df156df4e7df351f9ba24641df74739d39c8e8.tar.bz2
Use allocated cplus_specific for cplus symbols.
2010-07-16 Sami Wagiaalla <swagiaal@redhat.com> * symtab.h (symbol_set_demangled_name): Now takes an optional objfile* argument. (cplus_specific): New struct. * symtab.c (symbol_set_demangled_name): Updated. Use cplus_specific for cplus symbols. (symbol_get_demangled_name): Retrive the name from the cplus_specific struct for cplus symbols. (symbol_init_language_specific): Set cplus_specific for cplus symbols. (symbol_set_names): Pass objfile to symbol_set_demangled_name. * symtab.c (symbol_init_cplus_specific): New function.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 7f18fb3..4be0bd5 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -75,7 +75,12 @@ struct program_space;
--chastain 2003-08-21 */
+/* Struct for storing C++ specific information. Allocated when needed. */
+struct cplus_specific
+{
+ char *demangled_name;
+};
/* Define a structure for the information that is common to all symbol types,
including minimal symbols, partial symbols, and full symbols. In a
@@ -120,7 +125,7 @@ struct general_symbol_info
value;
/* Since one and only one language can apply, wrap the language specific
- information inside a union. */
+ information inside a union. */
union
{
@@ -131,6 +136,8 @@ struct general_symbol_info
char *demangled_name;
}
mangled_lang;
+
+ struct cplus_specific *cplus_specific;
}
language_specific;
@@ -154,7 +161,8 @@ struct general_symbol_info
struct obj_section *obj_section;
};
-extern void symbol_set_demangled_name (struct general_symbol_info *, char *);
+extern void symbol_set_demangled_name (struct general_symbol_info *, char *,
+ struct objfile *);
extern char *symbol_get_demangled_name (const struct general_symbol_info *);