PR ld/12549
[binutils-gdb.git] / gdb / buildsym.h
index b7d4a76bc3b08b7aaaddac2abf4bd7b8e7ae9c44..4bde17a44c70e73658907a4294177947503f6f3c 100644 (file)
@@ -1,6 +1,5 @@
 /* Build symbol tables in GDB's internal format.
-   Copyright (C) 1986-1993, 1995-2000, 2002-2003, 2007-2012 Free
-   Software Foundation, Inc.
+   Copyright (C) 1986-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,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.  */
@@ -270,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);
 
@@ -293,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.  */