This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]