From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28176 invoked by alias); 21 Feb 2002 20:08:05 -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 28112 invoked from network); 21 Feb 2002 20:08:03 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 21 Feb 2002 20:08:03 -0000 Received: from redhat.com (notinuse.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA27915; Thu, 21 Feb 2002 12:07:42 -0800 (PST) Message-ID: <3C75519B.F30EADAA@redhat.com> Date: Thu, 21 Feb 2002 12:08:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Fernando Nasser CC: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: RFA: parse output from `info sources' one filename at a time References: <20020214001154.0A7605E9DE@zwingli.cygnus.com> <3C7542CF.A82DFC33@redhat.com> <3C754D4A.CC9FAE82@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00599.txt.bz2 Fernando Nasser wrote: > > Michael Snyder wrote: > > > > Jim Blandy wrote: > > > > > > This eliminates an `ERROR' when the test is run under Linux. The > > > output from `info sources' includes all the shared library source > > > files, making it so long that it overflows Expect's buffer. > > > > Not the maintainer, but I recommend acceptance. > > > > We don't have a co-maintainer for testsuite/gdb.asm... > > Who was it that was fixing it all ove and adding lots > of things lately? That would be me. > Would be a good candidate for a "volunteer" ;-) Yep. That's why I looked at this patch. We can call me a co-maintainer for gdb.asm if we like. > Thanks for looking into it Michael. > > Please check it in Jim, and thanks for the patch. > > Regards to all, > Fernando > > > > > > > 2002-02-13 Jim Blandy > > > > > > * gdb.asm/asm-source.exp: Parse the output from `info sources' one > > > filename at a time, and watch for the ones we want to see. > > > > > > Index: gdb/testsuite/gdb.asm/asm-source.exp > > > =================================================================== > > > RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v > > > retrieving revision 1.17 > > > diff -c -r1.17 asm-source.exp > > > *** gdb/testsuite/gdb.asm/asm-source.exp 2002/01/18 00:13:00 1.17 > > > --- gdb/testsuite/gdb.asm/asm-source.exp 2002/02/14 00:05:30 > > > *************** > > > *** 202,211 **** > > > "Current source file is .*asmsrc2.s.*Source language is asm.*" \ > > > "info source asmsrc2.s" > > > > > > ! # Try 'info sources' > > > ! gdb_test "info sources" \ > > > ! "Source files .*asmsrc\[12\].s.*asmsrc\[12\].s.*" \ > > > ! "info sources" > > > > > > # Try 'info line' > > > gdb_test "info line" \ > > > --- 202,238 ---- > > > "Current source file is .*asmsrc2.s.*Source language is asm.*" \ > > > "info source asmsrc2.s" > > > > > > ! # Try 'info sources'. This can produce a lot of output on systems > > > ! # with dynamic linking, where the system's shared libc was compiled > > > ! # with debugging info; for example, on Linux, this produces 47kb of > > > ! # output. So we consume it as we go. > > > ! send_gdb "info sources\n" > > > ! set seen_asmsrc_1 0 > > > ! set seen_asmsrc_2 0 > > > ! gdb_expect { > > > ! -re "^\[^,\]*asmsrc1.s(, |\[\r\n\]+)" { > > > ! set seen_asmsrc_1 1 > > > ! exp_continue > > > ! } > > > ! -re "^\[^,\]*asmsrc2.s(, |\[\r\n\]+)" { > > > ! set seen_asmsrc_2 1 > > > ! exp_continue > > > ! } > > > ! -re ", " { > > > ! exp_continue > > > ! } > > > ! -re "$gdb_prompt $" { > > > ! if {$seen_asmsrc_1 && $seen_asmsrc_2} { > > > ! pass "info sources" > > > ! } else { > > > ! fail "info sources" > > > ! } > > > ! } > > > ! timeout { > > > ! fail "info sources (timeout)" > > > ! } > > > ! } > > > ! > > > > > > # Try 'info line' > > > gdb_test "info line" \ > > -- > Fernando Nasser > Red Hat Canada Ltd. E-Mail: fnasser@redhat.com > 2323 Yonge Street, Suite #300 > Toronto, Ontario M4P 2C9