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: drow at mvista dot com
- Cc: ac131313 at redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Sun, 5 Jan 2003 10:53:57 -0600
- Subject: Re: RFC: gdb_test_multiple
Hi Daniel,
> This isn't a style thing, though. Let me point out the actual
> syntactic difference between the two above: the strings are
> expanded/substituted at the time of the call to gdb_test_multiple
> instead of at the time of the actual expect {}, down the call chain.
I don't understand. Are you saying that:
set msg "breakpoint on Foo::Bar"
gdb_test_multiple "break Foo::Bar" $msg {
-re "foo" {
... fail $msg ...
}
}
requires something gross in gdb_test_multiple in order to work?
I guess my question is: when does the "$msg" in "fail $msg" get
expanded. If the caller expands it before calling gdb_test_multiple
then I don't see the problem. If the caller passes "{ ... fail $msg ... }"
without expanding $msg then I do see the problem.
Michael C