diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-03 16:36:19 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-26 09:18:30 -0600 |
commit | 4ae976d1df96aee0ecd97ea1235efc4490562932 (patch) | |
tree | 06fef646b60339d2b42b63109505252742031125 /gdb/xcoffread.c | |
parent | 02e9e7f7e2bed3b82cb6541f566caf07256b9b2f (diff) | |
download | gdb-4ae976d1df96aee0ecd97ea1235efc4490562932.zip gdb-4ae976d1df96aee0ecd97ea1235efc4490562932.tar.gz gdb-4ae976d1df96aee0ecd97ea1235efc4490562932.tar.bz2 |
Introduce accessors for psymtab high and low fields
This introduces accessors for the partial symbol table textlow and
texthigh fields. This lets us later arrange to relocate these values
at their point of use.
I did this conversion by renaming the fields. I didn't rename the
fields back afterward, thinking that on the off chance that someone
has a patch touching this area, then a merge would helpfully break
their compile.
I looked at making the fields private, but this interferes with the
memset in allocate_psymtab, and I didn't want to chase this down.
This conversion can be done later if need be.
gdb/ChangeLog
2018-07-26 Tom Tromey <tom@tromey.com>
* dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
Update.
* dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
textlow and texthigh fields.
(process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
Update.
* mdebugread.c (parse_lines, parse_partial_symbols)
(psymtab_to_symtab_1): Update.
* psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
Rename fields. Update comment. Now private.
<text_low, text_high, set_text_low, set_text_high>: New methods.
* psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
(find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
(start_psymtab_common, maintenance_info_psymtabs)
(maintenance_check_psymtabs): Update.
* xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
texthigh fields.
(scan_xcoff_symtab): Update.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 1446036..1aa2e52 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -2093,8 +2093,6 @@ xcoff_end_psymtab (struct objfile *objfile, struct partial_symtab *pst, subpst->read_symtab_private = XOBNEW (&objfile->objfile_obstack, symloc); ((struct symloc *) subpst->read_symtab_private)->first_symnum = 0; ((struct symloc *) subpst->read_symtab_private)->numsyms = 0; - subpst->textlow = 0; - subpst->texthigh = 0; /* We could save slight bits of space by only making one of these, shared by the entire set of include files. FIXME-someday. */ @@ -2344,10 +2342,11 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, CORE_ADDR highval = symbol.n_value + csect_aux.x_csect.x_scnlen.l; - if (highval > pst->texthigh) - pst->texthigh = highval; - if (pst->textlow == 0 || symbol.n_value < pst->textlow) - pst->textlow = symbol.n_value; + if (highval > pst->text_high ()) + pst->set_text_high (highval); + if (pst->text_low () == 0 + || symbol.n_value < pst->text_low ()) + pst->set_text_low (symbol.n_value); } misc_func_recorded = 0; break; |