From: Corinna Vinschen <vinschen@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: Expect fails to recognize regexp
Date: Fri, 13 Sep 2002 14:23:00 -0000 [thread overview]
Message-ID: <20020913232250.J1574@cygbert.vinschen.de> (raw)
In-Reply-To: <15746.11507.688049.368955@localhost.redhat.com>
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
next prev parent reply other threads:[~2002-09-13 21:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 11:06 Corinna Vinschen
2002-09-13 11:10 ` David Carlton
2002-09-13 11:15 ` Daniel Jacobowitz
2002-09-13 11:24 ` Elena Zannoni
2002-09-13 14:23 ` Corinna Vinschen [this message]
2002-09-13 15:01 ` Daniel Jacobowitz
2002-09-14 2:28 ` Corinna Vinschen
2002-09-13 17:53 ` Felix Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020913232250.J1574@cygbert.vinschen.de \
--to=vinschen@redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox