aboutsummaryrefslogtreecommitdiff
path: root/gdb/psympriv.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-03 16:36:19 -0600
committerTom Tromey <tom@tromey.com>2018-07-26 09:18:30 -0600
commit4ae976d1df96aee0ecd97ea1235efc4490562932 (patch)
tree06fef646b60339d2b42b63109505252742031125 /gdb/psympriv.h
parent02e9e7f7e2bed3b82cb6541f566caf07256b9b2f (diff)
downloadfsf-binutils-gdb-4ae976d1df96aee0ecd97ea1235efc4490562932.zip
fsf-binutils-gdb-4ae976d1df96aee0ecd97ea1235efc4490562932.tar.gz
fsf-binutils-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/psympriv.h')
-rw-r--r--gdb/psympriv.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/gdb/psympriv.h b/gdb/psympriv.h
index be574bf..7116a1a 100644
--- a/gdb/psympriv.h
+++ b/gdb/psympriv.h
@@ -98,6 +98,31 @@ enum psymtab_search_status
struct partial_symtab
{
+ /* Return the low text address of this partial_symtab. */
+ CORE_ADDR text_low () const
+ {
+ return m_text_low;
+ }
+
+ /* Return the high text address of this partial_symtab. */
+ CORE_ADDR text_high () const
+ {
+ return m_text_high;
+ }
+
+ /* Set the low text address of this partial_symtab. */
+ void set_text_low (CORE_ADDR addr)
+ {
+ m_text_low = addr;
+ }
+
+ /* Set the hight text address of this partial_symtab. */
+ void set_text_high (CORE_ADDR addr)
+ {
+ m_text_high = addr;
+ }
+
+
/* Chain of all existing partial symtabs. */
struct partial_symtab *next;
@@ -118,10 +143,11 @@ struct partial_symtab
/* Range of text addresses covered by this file; texthigh is the
beginning of the next section. Do not use if PSYMTABS_ADDRMAP_SUPPORTED
- is set. */
+ is set. Do not refer directly to these fields. Instead, use the
+ accessors. */
- CORE_ADDR textlow;
- CORE_ADDR texthigh;
+ CORE_ADDR m_text_low;
+ CORE_ADDR m_text_high;
/* If NULL, this is an ordinary partial symbol table.