From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29354 invoked by alias); 16 Mar 2007 15:33:53 -0000 Received: (qmail 29345 invoked by uid 22791); 16 Mar 2007 15:33:52 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Mar 2007 15:33:36 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id l2GFXVj7071776 for ; Fri, 16 Mar 2007 15:33:31 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l2GFXUej1208466 for ; Fri, 16 Mar 2007 16:33:30 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l2GFXUuL006027 for ; Fri, 16 Mar 2007 16:33:30 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l2GFXUQ1006024 for ; Fri, 16 Mar 2007 16:33:30 +0100 Message-Id: <200703161533.l2GFXUQ1006024@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 16 Mar 2007 16:33:30 +0100 Subject: [committed] Re: Testcase problem in chng-syms.exp To: gdb-patches@sourceware.org Date: Fri, 16 Mar 2007 15:33:00 -0000 From: "Ulrich Weigand" In-Reply-To: <200703100022.l2A0Mleb030342@d12av02.megacenter.de.ibm.com> from "Ulrich Weigand" at Mar 10, 2007 01:22:47 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00154.txt.bz2 Hello, > So you'd expect that the output would match the first pattern, right? > However, it doesn't. This appears to be caused by the implementation > of gdb_run_cmd, which ends in: > > send_gdb "run $args\n" > # This doesn't work quite right yet. > gdb_expect 60 { > -re "The program .* has been started already.*y or n. $" { > send_gdb "y\n" > exp_continue > } > -re "Starting program: \[^\r\n\]*" {} > } > > This means everything up to and including the line "Starting program: ..." > is swallowed up by this gdb_expect, and the second one in chng-syms.exp > does see the lines it is looking for any more. I've now fixed this problem by adding -notransfer to the pattern. Tested on s390-ibm-linux, s390x-ibm-linux, and spu-elf. Fixes the failure on spu-elf. Committed to mainline. Bye, Ulrich ChangeLog: * lib/gdb.exp (gdb_run_cmd): Use -notransfer to make start-up messages available to test cases (like chng-sym.exp). Index: gdb/testsuite/lib/gdb.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.78 diff -u -p -r1.78 gdb.exp --- gdb/testsuite/lib/gdb.exp 23 Jan 2007 17:11:55 -0000 1.78 +++ gdb/testsuite/lib/gdb.exp 16 Mar 2007 14:33:17 -0000 @@ -283,7 +283,9 @@ proc gdb_run_cmd {args} { send_gdb "y\n" exp_continue } - -re "Starting program: \[^\r\n\]*" {} + # Use -notransfer here so that test cases (like chng-sym.exp) + # may test for additional start-up messages. + -notransfer -re "Starting program: \[^\r\n\]*" {} } } -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com