aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-21 18:05:13 +0000
committerTom Tromey <tromey@redhat.com>2013-01-21 18:05:13 +0000
commit46212e0bb5c0c74454045ef9410f80f1c9b44ddd (patch)
tree90b988eca506f669c864e94101c58c296bfb6e16 /gdb/dbxread.c
parent9d2ceabe7fb356a5905dec679f87a40f4e5a896a (diff)
downloadgdb-46212e0bb5c0c74454045ef9410f80f1c9b44ddd.zip
gdb-46212e0bb5c0c74454045ef9410f80f1c9b44ddd.tar.gz
gdb-46212e0bb5c0c74454045ef9410f80f1c9b44ddd.tar.bz2
* 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/dbxread.c')
-rw-r--r--gdb/dbxread.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index cfd8df6..5857e33 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1255,7 +1255,7 @@ read_dbx_symtab (struct objfile *objfile)
init_bincl_list (20, objfile);
back_to = make_cleanup_free_bincl_list (objfile);
- last_source_file = NULL;
+ set_last_source_file (NULL);
lowest_text_address = (CORE_ADDR) -1;
@@ -2541,7 +2541,7 @@ read_ofile_symtab (struct objfile *objfile, struct partial_symtab *pst)
subfile_stack = NULL;
stringtab_global = DBX_STRINGTAB (objfile);
- last_source_file = NULL;
+ set_last_source_file (NULL);
abfd = objfile->obfd;
symfile_bfd = objfile->obfd; /* Implicit param to next_text_symbol. */
@@ -2765,7 +2765,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
/* Something is wrong if we see real data before seeing a source
file name. */
- if (last_source_file == NULL && type != (unsigned char) N_SO)
+ if (get_last_source_file () == NULL && type != (unsigned char) N_SO)
{
/* Ignore any symbols which appear before an N_SO symbol.
Currently no one puts symbols there, but we should deal
@@ -2941,7 +2941,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
n_opt_found = 0;
- if (last_source_file)
+ if (get_last_source_file ())
{
/* Check if previous symbol was also an N_SO (with some
sanity checks). If so, that one was actually the
@@ -3174,7 +3174,8 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
CORE_ADDR minsym_valu =
- find_stab_function_addr (name, last_source_file, objfile);
+ find_stab_function_addr (name, get_last_source_file (),
+ objfile);
/* The function find_stab_function_addr will return
0 if the minimal symbol wasn't found.