This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA/testsuite] Shorten the maint.exp symbols tests
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnasser at redhat dot com
- Date: Mon, 21 Oct 2002 21:58:52 -0400
- Subject: [RFA/testsuite] Shorten the maint.exp symbols tests
Right now maint.exp dumps the contents of all symbols. There's a comment
from Jim that, if the C library has debug info, this can take a long time.
And we bump the timeout way up.
Well, on my test systems it takes longer than just a long time: it takes
about 45 minutes. And the generated files are close to a gigabyte. I think
that's a little bit overkill, don't you? :)
I modified the test to dump just the symbols for the files we're interested
in, and it works quite nicely. This cuts the test time back to a reasonable
amount. Is this change OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-10-21 Daniel Jacobowitz <drow@mvista.com>
* gdb.base/maint.exp: Only dump symbols from one source file
or objfile.
Index: testsuite/gdb.base/maint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/maint.exp,v
retrieving revision 1.14
diff -u -p -r1.14 maint.exp
--- testsuite/gdb.base/maint.exp 18 Sep 2002 23:53:52 -0000 1.14
+++ testsuite/gdb.base/maint.exp 13 Oct 2002 22:55:02 -0000
@@ -230,9 +230,9 @@ gdb_expect {
timeout { fail "(timeout) maint print psymbols w/o args" }
}
-send_gdb "maint print psymbols psymbols_output\n"
+send_gdb "maint print psymbols psymbols_output ${srcdir}/${subdir}/${srcfile}\n"
gdb_expect {
- -re "^maint print psymbols psymbols_output\r\n$gdb_prompt $"\
+ -re "^maint print psymbols psymbols_output \[^\n\]*\r\n$gdb_prompt $"\
{
send_gdb "shell ls psymbols_output\n"
gdb_expect {
@@ -272,9 +272,9 @@ gdb_expect {
timeout { fail "(timeout) maint print msymbols w/o args" }
}
-send_gdb "maint print msymbols msymbols_output\n"
+send_gdb "maint print msymbols msymbols_output ${binfile}\n"
gdb_expect {
- -re "^maint print msymbols msymbols_output\r\n$gdb_prompt $"\
+ -re "^maint print msymbols msymbols_output \[^\n\]*\r\n$gdb_prompt $"\
{
send_gdb "shell ls msymbols_output\n"
gdb_expect {
@@ -307,16 +307,13 @@ gdb_expect {
timeout { fail "(timeout) maint print symbols w/o args" }
}
-# This command can legitimately take many minutes to execute. If the
-# executable is dynamically linked, then you get all the debugging
-# info for the entire library --- 89Mb on my system. -jimb
+# Request symbols for one particular source file so that we don't try to
+# dump the symbol information for the entire C library - over 500MB nowadays
+# for GNU libc.
-set old_timeout $timeout
-set timeout 600
-
-send_gdb "maint print symbols symbols_output\n"
+send_gdb "maint print symbols symbols_output ${srcdir}/${subdir}/${srcfile}\n"
gdb_expect {
- -re "^maint print symbols symbols_output\r\n$gdb_prompt $"\
+ -re "^maint print symbols symbols_output \[^\n\]*\r\n$gdb_prompt $"\
{
send_gdb "shell ls symbols_output\n"
gdb_expect {
@@ -340,8 +337,6 @@ gdb_expect {
-re ".*$gdb_prompt $" { fail "maint print symbols" }
timeout { fail "(timeout) maint print symbols" }
}
-
-set timeout $old_timeout
send_gdb "maint print type argc\n"
gdb_expect {