summaryrefslogtreecommitdiff
path: root/gdb/buildsym.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-21 18:05:12 +0000
committerTom Tromey <tromey@redhat.com>2013-01-21 18:05:12 +0000
commit076d987f482e45d3707fec51726f764d00b08d98 (patch)
tree1d6d8dbe215bc53476bf897fdd37367c227c506b /gdb/buildsym.h
parenteb1defae67a25c05311d2ddeb9c957c5a0c087ca (diff)
downloadgdb-076d987f482e45d3707fec51726f764d00b08d98.tar.gz
* buildsym.c (patch_subfile_names): Use set_last_source_file.
(start_symtab): Make 'name' and 'dirname' const. Use set_last_source_file. (restart_symtab, reset_symtab_globals): Use set_last_source_file. (last_source_file): Define. Now static. (set_last_source_file, get_last_source_file): New functions. * buildsym.h (last_source_file): Don't declare. (start_symtab): Update. (set_last_source_file, get_last_source_file): Declare. * coffread.c (complete_symtab): Use set_last_source_file. (coff_end_symtab): Likewise. (coff_symtab_read): Use set_last_source_file, get_last_source_file. * dbxread.c (read_dbx_symtab, read_ofile_symtab): Use set_last_source_file. (process_one_symbol): Use get_last_source_file. * mdebugread.c (parse_partial_symbols): Use set_last_source_file. (psymtab_to_symtab_1): Use get_last_source_file. * xcoffread.c (process_linenos): Use get_last_source_file. (complete_symtab): Use set_last_source_file. (read_xcoff_symtab): Use set_last_source_file, get_last_source_file. (scan_xcoff_symtab): Use set_last_source_file.
Diffstat (limited to 'gdb/buildsym.h')
-rw-r--r--gdb/buildsym.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index f44fd4bb000..4bde17a44c7 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -45,12 +45,6 @@ struct pending_block;
#define HASHSIZE 127 /* Size of things hashed via
hashname(). */
-/* Name of source file whose symbol data we are now processing. This
- comes from a symbol of type N_SO for stabs. For Dwarf it comes
- from the DW_AT_name attribute of a DW_TAG_compile_unit DIE. */
-
-EXTERN char *last_source_file;
-
/* 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. */
@@ -269,7 +263,8 @@ extern struct context_stack *pop_context (void);
extern void record_line (struct subfile *subfile, int line, CORE_ADDR pc);
-extern void start_symtab (char *name, char *dirname, CORE_ADDR start_addr);
+extern void start_symtab (const char *name, const char *dirname,
+ CORE_ADDR start_addr);
extern void restart_symtab (CORE_ADDR start_addr);
@@ -292,6 +287,15 @@ extern void record_producer (const char *producer);
extern void merge_symbol_lists (struct pending **srclist,
struct pending **targetlist);
+/* Set the name of the last source file. NAME is copied by this
+ function. */
+
+extern void set_last_source_file (const char *name);
+
+/* Fetch the name of the last source file. */
+
+extern const char *get_last_source_file (void);
+
/* The macro table for the compilation unit whose symbols we're
currently reading. All the symtabs for this CU will point to
this. */