summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>2003-02-14 01:13:45 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>2003-02-14 01:13:45 +0000
commit4e316928fdf2524109999f38b1087fdbcc2b14b7 (patch)
treeb3bb3332a34518bcc08a9908c714b16b13404eaf /gdb
parentcadbdf2dc89c2c1efbe9517619cb608227b1a851 (diff)
downloadgdb-4e316928fdf2524109999f38b1087fdbcc2b14b7.tar.gz
[ChangeLog]
2003-02-12 Jason Molenda (jmolenda@apple.com) * symmisc.c (print_objfile_statistics): Include information about the number of psymtabs and symtabs in each object file. [testsuite/ChangeLog] 2003-02-13 Jason Molenda (jmolenda@apple.com) * gdb.base/maint.exp: Update maint print statistics regexp to include new entries.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symmisc.c25
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/maint.exp2
4 files changed, 36 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6d39a74bcee..34b1159ebce 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-12 Jason Molenda (jmolenda@apple.com)
+
+ * symmisc.c (print_objfile_statistics): Include information about
+ the number of psymtabs and symtabs in each object file.
+
2003-02-13 Keith R Seitz <keiths@redhat.com>
* main.h (struct captured_main_args): Add interpreter_p.
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 995372d1d05..3011335230a 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -179,6 +179,9 @@ void
print_objfile_statistics (void)
{
struct objfile *objfile;
+ struct symtab *s;
+ struct partial_symtab *ps;
+ int i, linetables, blockvectors;
immediate_quit++;
ALL_OBJFILES (objfile)
@@ -199,6 +202,28 @@ print_objfile_statistics (void)
if (OBJSTAT (objfile, n_types) > 0)
printf_filtered (" Number of \"types\" defined: %d\n",
OBJSTAT (objfile, n_types));
+ i = 0;
+ ALL_OBJFILE_PSYMTABS (objfile, ps)
+ {
+ if (ps->readin == 0)
+ i++;
+ }
+ printf_filtered (" Number of psym tables (not yet expanded): %d\n", i);
+ i = linetables = blockvectors = 0;
+ ALL_OBJFILE_SYMTABS (objfile, s)
+ {
+ i++;
+ if (s->linetable != NULL)
+ linetables++;
+ if (s->primary == 1)
+ blockvectors++;
+ }
+ printf_filtered (" Number of symbol tables: %d\n", i);
+ printf_filtered (" Number of symbol tables with line tables: %d\n",
+ linetables);
+ printf_filtered (" Number of symbol tables with blockvectors: %d\n",
+ blockvectors);
+
if (OBJSTAT (objfile, sz_strtab) > 0)
printf_filtered (" Space used by a.out string tables: %d\n",
OBJSTAT (objfile, sz_strtab));
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6304f4800dd..44ecc4b32ed 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-13 Jason Molenda (jmolenda@apple.com)
+
+ * gdb.base/maint.exp: Update maint print statistics regexp to include
+ new entries.
+
2003-02-13 Michael Chastain <mec@shout.net>
* gdb.c++/inherit.exp: Remove call to get_debug_format.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 69fecaddf17..d8286508699 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -180,7 +180,7 @@ gdb_expect {
send_gdb "maint print statistics\n"
gdb_expect {
- -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\
+ -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\
{ pass "maint print statistics" }
-re ".*$gdb_prompt $" { fail "maint print statistics" }
timeout { fail "(timeout) maint print statistics" }