From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25202 invoked by alias); 22 Oct 2002 01:58:34 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25194 invoked from network); 22 Oct 2002 01:58:33 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 22 Oct 2002 01:58:33 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 183pFB-0003fa-00; Mon, 21 Oct 2002 21:58:09 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 183oJo-0005u6-00; Mon, 21 Oct 2002 21:58:52 -0400 Date: Mon, 21 Oct 2002 18:58:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: fnasser@redhat.com Subject: [RFA/testsuite] Shorten the maint.exp symbols tests Message-ID: <20021022015852.GA22669@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, fnasser@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00381.txt.bz2 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 * 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 {