aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-20 11:01:37 -0600
committerTom Tromey <tom@tromey.com>2018-07-16 08:55:16 -0600
commit2c99ee5c4f44d52258fa176563cc6a4cfbf0069d (patch)
tree8c4cc533610f3262a43cf562d6bfae0b4b71f8e2 /gdb/dbxread.c
parent530fedbcbf61b6d74c76a8ba720fe29d98896831 (diff)
downloadgdb-2c99ee5c4f44d52258fa176563cc6a4cfbf0069d.zip
gdb-2c99ee5c4f44d52258fa176563cc6a4cfbf0069d.tar.gz
gdb-2c99ee5c4f44d52258fa176563cc6a4cfbf0069d.tar.bz2
Move last_source_start_addr to buildsym_compunit
This moves the global last_source_start_addr into buildsym_compunit, adding some accessors as well. gdb/ChangeLog 2018-07-16 Tom Tromey <tom@tromey.com> * xcoffread.c (aix_process_linenos, complete_symtab): Update. * dbxread.c (read_ofile_symtab): Update. * coffread.c (coff_start_symtab, coff_end_symtab): Update. * buildsym.h (last_source_start_addr): Remove. (set_last_source_start_addr, get_last_source_start_addr): Declare. * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr parameter. (struct buildsym_compunit) <m_last_source_start_addr>: New member. (prepare_for_building): Remove start_addr parameter. (start_symtab, restart_symtab, end_symtab_get_static_block) (end_symtab_with_blockvector): Update. (set_last_source_start_addr, get_last_source_start_addr): New functions.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 1b524ec..f6059a8 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2371,14 +2371,14 @@ read_ofile_symtab (struct objfile *objfile, struct partial_symtab *pst)
/* In a Solaris elf file, this variable, which comes from the
value of the N_SO symbol, will still be 0. Luckily, text_offset,
which comes from pst->textlow is correct. */
- if (last_source_start_addr == 0)
- last_source_start_addr = text_offset;
+ if (get_last_source_start_addr () == 0)
+ set_last_source_start_addr (text_offset);
/* In reordered executables last_source_start_addr may not be the
lower bound for this symtab, instead use text_offset which comes
from pst->textlow which is correct. */
- if (last_source_start_addr > text_offset)
- last_source_start_addr = text_offset;
+ if (get_last_source_start_addr () > text_offset)
+ set_last_source_start_addr (text_offset);
pst->compunit_symtab = end_symtab (text_offset + text_size,
SECT_OFF_TEXT (objfile));