aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-21 00:15:12 -0600
committerTom Tromey <tom@tromey.com>2018-07-20 09:42:42 -0600
commit3c65e5b31cb5587773deff979099435b9687a0f4 (patch)
treeb13e4e32406f0d0ef00600828133d4b564f7f7df /gdb/coffread.c
parenta60f3166aa946336c68e7a873d5eed6061b5733c (diff)
downloadgdb-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/coffread.c')
-rw-r--r--gdb/coffread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 718c334..758cd49 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -858,7 +858,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
language_unknown, since such a ``file name'' is not
recognized. Override that with the minimal language to
allow printing values in this symtab. */
- current_subfile->language = language_minimal;
+ get_current_subfile ()->language = language_minimal;
complete_symtab ("_globals_", 0, 0);
/* Done with all files, everything from here on out is
globals. */
@@ -1128,7 +1128,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
of the closing '}', and for which we do not have any
other statement-line-number. */
if (fcn_last_line == 1)
- record_line (current_subfile, fcn_first_line,
+ record_line (get_current_subfile (), fcn_first_line,
gdbarch_addr_bits_remove (gdbarch,
fcn_first_line_addr));
else
@@ -1504,7 +1504,7 @@ enter_linenos (long file_offset, int first_line,
CORE_ADDR addr = lptr.l_addr.l_paddr;
addr += ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile));
- record_line (current_subfile,
+ record_line (get_current_subfile (),
first_line + L_LNNO32 (&lptr),
gdbarch_addr_bits_remove (gdbarch, addr));
}
@@ -1627,7 +1627,7 @@ process_coff_symbol (struct coff_symbol *cs,
name = cs->c_name;
name = EXTERNAL_NAME (name, objfile->obfd);
- SYMBOL_SET_LANGUAGE (sym, current_subfile->language,
+ SYMBOL_SET_LANGUAGE (sym, get_current_subfile ()->language,
&objfile->objfile_obstack);
SYMBOL_SET_NAMES (sym, name, strlen (name), 1, objfile);