aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1996-10-07 17:45:29 +0000
committerPer Bothner <per@bothner.com>1996-10-07 17:45:29 +0000
commit7f8da359a85c040f6b22960eba8e8785a5576251 (patch)
tree4c51e70fb365f0f5f1e0bfcd4265c6408da4a896 /gdb/stabsread.c
parente61a754e396df151e55b22c2d0277258e0ec0e1d (diff)
downloadgdb-7f8da359a85c040f6b22960eba8e8785a5576251.zip
gdb-7f8da359a85c040f6b22960eba8e8785a5576251.tar.gz
gdb-7f8da359a85c040f6b22960eba8e8785a5576251.tar.bz2
Replace header_files global by per-objfile field.
* gdb-stabs.h (struct dbx_symfile_info): Add fields header_files, n_header_files, n_allocated_header_files. * stabsread.h (header_files, n_header_files, n_allocated_header_files): Replace externs by macros HEADER_FILES, N_HEADER_FILES, and N_ALLOCATED_HEADER_FILES. * dbxread.c (dbx_symfile_finish): Free HEADER_FILES. (free_header_files, init_header-files): Don't free/init headerfiles. (various functions): Use macros instead of header_files globals. * stabsread.c (various functions): Likewise.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 8c03a6f..adc0a36 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -344,7 +344,7 @@ Invalid symbol data: type number (%d,%d) out of range at symtab pos %d.",
{
real_filenum = this_object_header_files[filenum];
- if (real_filenum >= n_header_files)
+ if (real_filenum >= N_HEADER_FILES (current_objfile))
{
struct type *temp_type;
struct type **temp_type_p;
@@ -358,7 +358,7 @@ Invalid symbol data: type number (%d,%d) out of range at symtab pos %d.",
return temp_type_p;
}
- f = &header_files[real_filenum];
+ f = HEADER_FILES (current_objfile) + real_filenum;
f_orig_length = f->length;
if (index >= f_orig_length)