diff options
author | Fred Fish <fnf@specifix.com> | 1995-12-21 04:08:27 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1995-12-21 04:08:27 +0000 |
commit | 2dd30c722bd69b3086430017eb2b8c50956c0745 (patch) | |
tree | 3f18a341d467d3885df3aef4db28191e5ba0ff43 /gdb/objfiles.h | |
parent | 0b0124c6ccddb977b89fee805b7109fb276831f9 (diff) | |
download | binutils-gdb-2dd30c722bd69b3086430017eb2b8c50956c0745.tar.gz |
* defs.h: Delete extraneous whitespace at end of file.
* symfile.h: Move #include of demangle.h outside conditional.
* objfiles.h (struct objstats, OBJSTAT, OBJSTATS): New struct
and macros to hold per-objfile statistics for internal instrumentation.
(struct objfile): Add OBJSTATS member, which is optional.
* buildsym.h (next_symbol_text_func): Now takes objfile argument.
Also update copyright to 1995.
* dbxread.c (dbx_next_symbol_text): Now takes objfile argument.
(dbx_symfile_init, coffstab_build_psymtabs, elfstab_build_psymtabs,
stabsect_build_psymtabs): Accumulate string table size.
(dbx_next_symbol_text, read_dbx_symtab, read_ofile_symtab):
Accumulate number of stabs symbols read.
* dwarfread.c (new_symbol, symthesize_typedef):
Accumulate number of full symbols created.
* gdbtypes.c (alloc_type): Accumulate number of types.
* maint.c (maintenance_print_statistics): New function.
* mdebugread.c (mdebug_next_symbol_text): Now takes objfile argument.
* minsyms.c (prim_record_minimal_symbol_and_info): Accumulate
number of minimal symbols read.
* os9kread.c (read_os9k_psymtab): next_symbol_text takes objfile arg.
* partial-stab.h: next_symbol_text takes objfile arg.
* stabsread.c (error_type, STABS_CONTINUE): Now takes objfile arg and
uses it to call next_symbol_text.
* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
Accumulate number of partial symbols created.
* symfile.h (ADD_PSYMBOL_VT_TO_LIST): Accumulate number of partial
symbols created.
* symmisc.c (print_objfile_statistics): Print the per-objfile
internal instrumentation statistics gathered.
* xcoffread.c (xcoff_next_symbol_text): Now takes objfile argument.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r-- | gdb/objfiles.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index bb1df89b223..0a8bbd3803e 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -156,6 +156,33 @@ struct obj_section { struct objfile *objfile; }; +/* The "objstats" structure provides a place for gdb to record some + interesting information about its internal state at runtime, on a + per objfile basis, such as information about the number of symbols + read, size of string table (if any), etc. */ + +#if MAINTENANCE_CMDS + +struct objstats { + int n_minsyms; /* Number of minimal symbols read */ + int n_psyms; /* Number of partial symbols read */ + int n_syms; /* Number of full symbols read */ + int n_stabs; /* Number of ".stabs" read (if applicable) */ + int n_types; /* Number of types */ + int sz_strtab; /* Size of stringtable, (if applicable) */ +}; + +#define OBJSTAT(objfile, expr) (objfile -> stats.expr) +#define OBJSTATS struct objstats stats +extern void print_objfile_statistics PARAMS ((void)); + +#else + +#define OBJSTAT(objfile, expr) /* Nothing */ +#define OBJSTATS /* Nothing */ + +#endif /* MAINTENANCE_CMDS */ + /* Master structure for keeping track of each file from which gdb reads symbols. There are several ways these get allocated: 1. The main symbol file, symfile_objfile, set by the symbol-file command, @@ -321,6 +348,9 @@ struct objfile /* two auxiliary fields, used to hold the fp of separate symbol files */ FILE *auxf1, *auxf2; + + /* Place to stash various statistics about this objfile */ + OBJSTATS; }; /* Defines for the objfile flag word. */ |