aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-21 09:12:54 -0600
committerTom Tromey <tom@tromey.com>2018-07-20 09:42:46 -0600
commite148f09d75af9e5c6af5136fee3a5a298114d41f (patch)
tree0f9ca53921bd325bae5d3cd079cead946204ac60 /gdb/xcoffread.c
parent93b8bea4143cafae79076076c64aaa4c46a9b73c (diff)
downloadgdb-e148f09d75af9e5c6af5136fee3a5a298114d41f.zip
gdb-e148f09d75af9e5c6af5136fee3a5a298114d41f.tar.gz
gdb-e148f09d75af9e5c6af5136fee3a5a298114d41f.tar.bz2
Move the symbol lists to buildsym_compunit
This moves the global symbol lists into buildsym_compunit, adds accessors, and updates all the users. gdb/ChangeLog 2018-07-20 Tom Tromey <tom@tromey.com> * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update. * stabsread.c (patch_block_stabs, define_symbol, read_type) (read_enum_type, common_block_start, common_block_end) (cleanup_undefined_types_1, finish_global_stabs): Update. * mdebugread.c (psymtab_to_symtab_1): Update. * dwarf2read.c (fixup_go_packaging, read_func_scope) (read_lexical_block_scope, new_symbol): Update. * dbxread.c (process_one_symbol): Update. * coffread.c (coff_symtab_read, process_coff_symbol) (coff_read_enum_type): Update. * buildsym.h (file_symbols, global_symbols, local_symbols): Don't declare. (get_local_symbols, get_file_symbols, get_global_symbols): New functions. * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and m_global_symbols. <m_file_symbols, m_local_symbols, m_global_symbols>: New members. (~scoped_free_pendings): Update. (finish_block, prepare_for_building, reset_symtab_globals) (end_symtab_get_static_block, end_symtab_with_blockvector) (augment_type_symtab, push_context): Update. (get_local_symbols, get_file_symbols, get_global_symbols): New functions. (buildsym_init): Update.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index f8dd3e9..9268a3f 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1496,7 +1496,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
eb_complaint (cs->c_symnum);
break;
}
- if (local_symbols && !outermost_context_p ())
+ if (*get_local_symbols () && !outermost_context_p ())
{
/* Make a block for the local symbols within. */
finish_block (cstk.name,
@@ -1506,7 +1506,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
+ ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile))));
}
- local_symbols = cstk.locals;
+ *get_local_symbols () = cstk.locals;
}
break;
@@ -1594,9 +1594,9 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
SYMBOL_DUP (sym, sym2);
if (cs->c_sclass == C_EXT || C_WEAKEXT)
- add_symbol_to_list (sym2, &global_symbols);
+ add_symbol_to_list (sym2, get_global_symbols ());
else if (cs->c_sclass == C_HIDEXT || cs->c_sclass == C_STAT)
- add_symbol_to_list (sym2, &file_symbols);
+ add_symbol_to_list (sym2, get_file_symbols ());
}
else
{