From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com,
Michael Elizabeth Chastain <mec@shout.net>
Subject: Re: RFC: gdb_test_multiple
Date: Sun, 05 Jan 2003 15:42:00 -0000 [thread overview]
Message-ID: <20030105154234.GA1348@nevyn.them.org> (raw)
In-Reply-To: <3E18501D.8050601@redhat.com>
On Sun, Jan 05, 2003 at 10:32:45AM -0500, Andrew Cagney wrote:
> >gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" {
> > -re "Breakpoint at .*\[\r\n\]$gdb_prompt $" {
> > pass "$_gdb_message"
> > }
> > -re "Explode!" {
> > fail "$_gdb_message (gdb/90210)"
> > }
> > -re "Bang." {
> > kfail "gdb/90211" "$_gdb_message"
> > }
> >}
>
> Why not just use:
>
> set msg "breakpoint on Foo::Bar"
> gdb_test_multiple "break Foo::Bar" {
> ... fail "$msg ...
> }
>
> I don't think the ``$_gdb_message'' is right. It certainly isn't
> exactly intuative.
No, it certainly isn't. The problem is that the other cases internally
need to know the msg; the only way to do it as above would be to
document a _required_ variable named $msg. This works, of course:
set msg "breakpoint on Foo::Bar"
gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" {
... fail "$msg ...
}
I want to think about this a little more anyway; as Michael mentioned,
I don't think it's recursion safe. I can't fix this syntax due to TCL
limitations, so it might become:
gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" \
"Breakpoint at .*\[\r\n\]$gdb_prompt $" { pass $msg } \
"Bang." { kfail "gdb/90211" $msg }
Which isn't so bad, after all. I had some reason not to do it that way
but I can't remember what it was, now. What do you think of this
change?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-01-05 15:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-04 20:16 Daniel Jacobowitz
2003-01-05 15:32 ` Andrew Cagney
2003-01-05 15:42 ` Daniel Jacobowitz [this message]
2003-01-06 21:12 ` Andrew Cagney
2003-01-07 3:25 ` Daniel Jacobowitz
2003-01-05 5:25 Michael Elizabeth Chastain
2003-01-05 16:33 Michael Elizabeth Chastain
2003-01-05 16:46 ` Daniel Jacobowitz
2003-01-05 16:54 Michael Elizabeth Chastain
2003-01-05 17:38 ` Daniel Jacobowitz
2003-01-05 17:45 Michael Elizabeth Chastain
2003-01-07 4:33 Michael Elizabeth Chastain
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=20030105154234.GA1348@nevyn.them.org \
--to=drow@mvista.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
/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