From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5403 invoked by alias); 13 Sep 2002 21:23:06 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5396 invoked from network); 13 Sep 2002 21:23:05 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Sep 2002 21:23:05 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8DL6Mw28393 for ; Fri, 13 Sep 2002 17:06:22 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8DLN3d24717 for ; Fri, 13 Sep 2002 17:23:03 -0400 Received: from cygbert.vinschen.de (vpn50-17.rdu.redhat.com [172.16.50.17]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8DLN1C16332 for ; Fri, 13 Sep 2002 14:23:02 -0700 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id g8DLMob19572 for gdb@sources.redhat.com; Fri, 13 Sep 2002 23:22:50 +0200 Date: Fri, 13 Sep 2002 14:23:00 -0000 From: Corinna Vinschen To: gdb@sources.redhat.com Subject: Re: Expect fails to recognize regexp Message-ID: <20020913232250.J1574@cygbert.vinschen.de> Reply-To: gdb@sources.redhat.com Mail-Followup-To: gdb@sources.redhat.com References: <20020913200643.I1574@cygbert.vinschen.de> <15746.11507.688049.368955@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15746.11507.688049.368955@localhost.redhat.com> User-Agent: Mutt/1.3.22.1i X-SW-Source: 2002-09/txt/msg00164.txt.bz2 On Fri, Sep 13, 2002 at 02:22:43PM -0400, Elena Zannoni wrote: > > Add > > exp_internal 1 > and > exp_internal 0 > > around the particualar send/expect interaction, then you will exacly > see in the output what expect think it matched. > > That's the only way I know of making sense of stuff like this. > > Elena I tried it but it didn't add anything to the output. Nothing! I added it this way: Index: gdb.exp =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.182 diff -u -p -r1.182 gdb.exp --- gdb.exp 2002/09/13 17:29:54 1.182 +++ gdb.exp 2002/09/13 21:22:12 @@ -1713,14 +1713,20 @@ proc rerun_to_main {} { timeout {fail "(timeout) rerun to main" ; return 0} } } else { + exp_internal 1 send_gdb "run\n" gdb_expect { + -re "The program .* has been started already.*y or n. $" { + send_gdb "y\n" + exp_continue + } -re "Starting program.*$gdb_prompt $"\ {pass "rerun to main" ; return 0} -re "$gdb_prompt $"\ {fail "rerun to main" ; return 0} timeout {fail "(timeout) rerun to main" ; return 0} } + exp_internal 0 } } Was that ok or did I do something wrong? Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen@redhat.com