diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-20 11:01:37 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-16 08:55:16 -0600 |
commit | 2c99ee5c4f44d52258fa176563cc6a4cfbf0069d (patch) | |
tree | 8c4cc533610f3262a43cf562d6bfae0b4b71f8e2 /gdb/buildsym.h | |
parent | 530fedbcbf61b6d74c76a8ba720fe29d98896831 (diff) | |
download | binutils-gdb-2c99ee5c4f44d52258fa176563cc6a4cfbf0069d.tar.gz |
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/buildsym.h')
-rw-r--r-- | gdb/buildsym.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 536d50a58eb..61ffc0fd895 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -49,12 +49,6 @@ struct dynamic_prop; #define HASHSIZE 127 /* Size of things hashed via hashname(). */ -/* Core address of start of text of current source file. This too - comes from the N_SO symbol. For Dwarf it typically comes from the - DW_AT_low_pc attribute of a DW_TAG_compile_unit DIE. */ - -EXTERN CORE_ADDR last_source_start_addr; - /* The list of sub-source-files within the current individual compilation. Each file gets its own symtab with its own linetable and associated info, but they all share one blockvector. */ @@ -310,6 +304,16 @@ extern struct compunit_symtab *buildsym_compunit_symtab (void); extern struct macro_table *get_macro_table (void); +/* Set the last source start address. Can only be used between + start_symtab and end_symtab* calls. */ + +extern void set_last_source_start_addr (CORE_ADDR addr); + +/* Get the last source start address. Can only be used between + start_symtab and end_symtab* calls. */ + +extern CORE_ADDR get_last_source_start_addr (); + #undef EXTERN #endif /* defined (BUILDSYM_H) */ |