aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.h
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.h
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.h')
-rw-r--r--gdb/stabsread.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 0a1d165..c08635f 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -106,11 +106,15 @@ struct header_file
};
-EXTERN struct header_file *header_files;
+/* The table of header_files of this OBJFILE. */
+#define HEADER_FILES(OBJFILE) (DBX_SYMFILE_INFO (OBJFILE)->header_files)
-EXTERN int n_header_files;
+/* The actual length of HEADER_FILES. */
+#define N_HEADER_FILES(OBJFILE) (DBX_SYMFILE_INFO (OBJFILE)->n_header_files)
-EXTERN int n_allocated_header_files;
+/* The allocated lengh of HEADER_FILES. */
+#define N_ALLOCATED_HEADER_FILES(OBJFILE) \
+ (DBX_SYMFILE_INFO (OBJFILE)->n_allocated_header_files)
/* Within each object file, various header files are assigned numbers.
A type is defined or referred to with a pair of numbers
@@ -118,7 +122,7 @@ EXTERN int n_allocated_header_files;
and TYPENUM is the number within that header file.
TYPENUM is the index within the vector of types for that header file.
- FILENUM == 1 is special; it refers to the main source of the object file,
+ FILENUM == 0 is special; it refers to the main source of the object file,
and not to any header file. FILENUM != 1 is interpreted by looking it up
in the following table, which contains indices in header_files. */