forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -390,8 +390,8 @@ coff_start_symtab (struct objfile *objfile, const char *name)
|
||||
xstrdup (name),
|
||||
/* We never know the directory name for COFF. */
|
||||
NULL,
|
||||
/* The start address is irrelevant, since we set
|
||||
last_source_start_addr in coff_end_symtab. */
|
||||
/* The start address is irrelevant, since we call
|
||||
set_last_source_start_addr in coff_end_symtab. */
|
||||
0,
|
||||
/* Let buildsym.c deduce the language for this symtab. */
|
||||
language_unknown);
|
||||
@@ -420,7 +420,7 @@ complete_symtab (const char *name, CORE_ADDR start_addr, unsigned int size)
|
||||
static void
|
||||
coff_end_symtab (struct objfile *objfile)
|
||||
{
|
||||
last_source_start_addr = current_source_start_addr;
|
||||
set_last_source_start_addr (current_source_start_addr);
|
||||
|
||||
end_symtab (current_source_end_addr, SECT_OFF_TEXT (objfile));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user