This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: gdb_test_multiple
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: ac131313 at redhat dot com, drow at mvista dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 5 Jan 2003 10:33:02 -0600
- Subject: Re: RFC: gdb_test_multiple
Daniel Jacobowitz writes:
set msg "breakpoint on Foo::Bar"
gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" {
... fail "$msg ...
}
This can be improved to:
set msg "breakpoint on Foo::Bar"
gdb_test_multiple "break Foo::Bar" $msg {
... fail $msg ...
}
The grammar would still allow different messages for the explicit
messages given by the caller versus the internal messages generated
by gdb_test_multiple. But the normal idiom would have one $msg.
gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" \
"Breakpoint at .*\[\r\n\]$gdb_prompt $" { pass $msg } \
"Bang." { kfail "gdb/90211" $msg }
Err, I like my treatment of $msg better, I dislike subroutines that
create variables like this for little inferior blocks of code.
But maybe I have poor taste in TCL style.
Michael C