summaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
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/xcoffread.c
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/xcoffread.c')
-rw-r--r--gdb/xcoffread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index ce28eb7a14d..a71a958d4e6 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -655,7 +655,7 @@ process_linenos (CORE_ADDR start, CORE_ADDR end)
start, 0, &main_source_baseline);
}
- if (strcmp (inclTable[ii].name, last_source_file) == 0)
+ if (strcmp (inclTable[ii].name, get_last_source_file ()) == 0)
{
/* The entry in the include table refers to the main source
file. Add the lines to the main subfile. */
@@ -894,7 +894,7 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset,
text address for the file, and SIZE is the number of bytes of text. */
#define complete_symtab(name, start_addr) { \
- last_source_file = xstrdup (name); \
+ set_last_source_file (name); \
last_source_start_addr = start_addr; \
}
@@ -1031,7 +1031,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
handling. */
local_symesz = coff_data (abfd)->local_symesz;
- last_source_file = NULL;
+ set_last_source_file (NULL);
last_csect_name = 0;
start_stabs ();
@@ -1119,7 +1119,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
if (cs->c_symnum == next_file_symnum && cs->c_sclass != C_FILE)
{
- if (last_source_file)
+ if (get_last_source_file ())
{
pst->symtab = end_symtab (cur_src_end_addr, objfile,
SECT_OFF_TEXT (objfile));
@@ -1488,7 +1488,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
}
}
- if (last_source_file)
+ if (get_last_source_file ())
{
struct symtab *s;
@@ -2225,7 +2225,7 @@ scan_xcoff_symtab (struct objfile *objfile)
(struct partial_symtab **) alloca (dependencies_allocated *
sizeof (struct partial_symtab *));
- last_source_file = NULL;
+ set_last_source_file (NULL);
abfd = objfile->obfd;
next_symbol_text_func = xcoff_next_symbol_text;