RFC: gdb_test_multiple

Michael Elizabeth Chastain mec@shout.net
Sun Jan 5 16:54:00 GMT 2003


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



More information about the Gdb-patches mailing list