Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/testsuite] Shorten the maint.exp symbols tests
@ 2002-10-21 18:58 Daniel Jacobowitz
  2002-12-03  7:19 ` Fernando Nasser
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-10-21 18:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnasser

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  {


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-12-05 20:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 18:58 [RFA/testsuite] Shorten the maint.exp symbols tests Daniel Jacobowitz
2002-12-03  7:19 ` Fernando Nasser
2002-12-04 13:52   ` David Carlton
2002-12-04 14:20     ` Daniel Jacobowitz
2002-12-04 14:47       ` David Carlton
2002-12-05 12:50         ` David Carlton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox