From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12679 invoked by alias); 20 May 2010 21:46:27 -0000 Received: (qmail 12669 invoked by uid 22791); 20 May 2010 21:46:26 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 21:46:19 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4KLkIxR019302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 20 May 2010 17:46:18 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4KLkFJC000619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 20 May 2010 17:46:17 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o4KLkFe6011454; Thu, 20 May 2010 23:46:15 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o4KLkExq011453; Thu, 20 May 2010 23:46:14 +0200 Date: Thu, 20 May 2010 21:47:00 -0000 From: Jan Kratochvil To: Michael Snyder Cc: "gdb-patches@sourceware.org" Subject: Re: [resubmit] gdb.base, r*.exp thru w*.exp Message-ID: <20100520214614.GA11229@host0.dyn.jankratochvil.net> References: <4BF59BBB.8020603@vmware.com> <20100520211446.GA8299@host0.dyn.jankratochvil.net> <4BF5ABAD.8030403@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BF5ABAD.8030403@vmware.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes 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: 2010-05/txt/msg00453.txt.bz2 On Thu, 20 May 2010 23:37:49 +0200, Michael Snyder wrote: > Jan Kratochvil wrote: > >On Thu, 20 May 2010 22:29:47 +0200, Michael Snyder wrote: > >>+ -re ".*in main after func1.*$gdb_prompt $" { > > > >Sorry for not a complete review but for this case there should be: > > > > -re ".*in main after func1.*\r\n$gdb_prompt $" { > > > >or lib/gdb.exp proc gdb_test is using: > > > > -re ".*in main after func1.*[\r\n]+$gdb_prompt $" { > > > >as just "$gdb_prompt $" is needlessly weak in practical cases causing false > >positives. > > Thanks for the review -- but I don't follow you. > > What is it about this particular case that you think requires > disambiguating? Or are you saying this in general? It was said in general. There could be for example output (gdb) return Make func1 return now? (y or n) y #0 main () at ./gdb.base/return.c:31 31 printf("in debugger (gdb) after func1\n"); (gdb) and if expect would read(2) just the part (gdb) return Make func1 return now? (y or n) y #0 main () at ./gdb.base/return.c:31 31 printf("in debugger (gdb) before the next part of input arrives it can have a false termination of waiting on the prompt. That can happens for example for "info set" where the output contains text: prompt: Gdb's prompt is "(gdb) ". (In this specific testcase there is no "(gdb) " contained in the output so it cannot have a false positive. But examining all the testcases would be difficult. Also I understand even "\r\n(gdb) " can have a false positive on some random output.) Thanks, Jan