summaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
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/psymtab.c
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/psymtab.c')
-rw-r--r--gdb/psymtab.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 1d5f0ee42d9..e36268dbd56 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1589,10 +1589,10 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
{
struct partial_symbol psymbol;
- /* We must ensure that the entire 'value' field has been zeroed
- before assigning to it, because an assignment may not write the
- entire field. */
- memset (&psymbol.ginfo.value, 0, sizeof (psymbol.ginfo.value));
+ /* We must ensure that the entire struct has been zeroed before
+ assigning to it, because an assignment may not touch some of the
+ holes. */
+ memset (&psymbol, 0, sizeof (psymbol));
/* val and coreaddr are mutually exclusive, one of them *will* be zero. */
if (val != 0)
@@ -1605,7 +1605,7 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
}
SYMBOL_SECTION (&psymbol) = 0;
SYMBOL_OBJ_SECTION (&psymbol) = NULL;
- SYMBOL_SET_LANGUAGE (&psymbol, language);
+ SYMBOL_SET_LANGUAGE (&psymbol, language, &objfile->objfile_obstack);
PSYMBOL_DOMAIN (&psymbol) = domain;
PSYMBOL_CLASS (&psymbol) = class;