diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-21 00:15:12 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-20 09:42:42 -0600 |
commit | 3c65e5b31cb5587773deff979099435b9687a0f4 (patch) | |
tree | b13e4e32406f0d0ef00600828133d4b564f7f7df /gdb/stabsread.c | |
parent | a60f3166aa946336c68e7a873d5eed6061b5733c (diff) | |
download | gdb-3c65e5b31cb5587773deff979099435b9687a0f4.zip gdb-3c65e5b31cb5587773deff979099435b9687a0f4.tar.gz gdb-3c65e5b31cb5587773deff979099435b9687a0f4.tar.bz2 |
Move current_subfile to buildsym_compunit
This moves the global current_subfile into buildsym_compunit.
gdb/ChangeLog
2018-07-20 Tom Tromey <tom@tromey.com>
* xcoffread.c (process_linenos): Update.
* stabsread.c (define_symbol, read_type, read_enum_type): Update.
* mdebugread.c (psymtab_to_symtab_1): Update.
* dwarf2read.c (setup_type_unit_groups)
(lnp_state_machine::handle_set_file, dwarf_record_line_p)
(lnp_state_machine::record_line, dwarf_decode_lines): Update.
* dbxread.c (process_one_symbol): Update.
* coffread.c (coff_symtab_read, enter_linenos)
(process_coff_symbol): Update.
* buildsym.h (current_subfile): Don't declare.
(get_current_subfile): Declare.
* buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
member.
(start_subfile, free_buildsym_compunit, push_subfile)
(prepare_for_building, start_symtab): Update.
(get_current_subfile): New function.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 50ca0e4..ad7b459 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -695,7 +695,7 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type, SYMBOL_LINE (sym) = 0; /* unknown */ } - SYMBOL_SET_LANGUAGE (sym, current_subfile->language, + SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language, &objfile->objfile_obstack); if (is_cplus_marker (string[0])) @@ -1296,7 +1296,7 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type, */ /* Pascal accepts names for pointer types. */ - if (current_subfile->language == language_pascal) + if (get_current_subfile ()->language == language_pascal) { TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_LINKAGE_NAME (sym); } @@ -1638,7 +1638,7 @@ again: return error_type (pp, objfile); } type_name = NULL; - if (current_subfile->language == language_cplus) + if (get_current_subfile ()->language == language_cplus) { char *name = (char *) alloca (p - *pp + 1); @@ -3678,7 +3678,7 @@ read_enum_type (const char **pp, struct type *type, sym = allocate_symbol (objfile); SYMBOL_SET_LINKAGE_NAME (sym, name); - SYMBOL_SET_LANGUAGE (sym, current_subfile->language, + SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language, &objfile->objfile_obstack); SYMBOL_ACLASS_INDEX (sym) = LOC_CONST; SYMBOL_DOMAIN (sym) = VAR_DOMAIN; |