Re: [RFC] new GDB server testcase

Daniel Jacobowitz
2005-05-05T16:27:46Z

On Thu, May 05, 2005 at 11:19:17AM -0500, Manoj Iyer wrote:
>
> When I have an output in a test as this:
>
> (gdb)
> step
> function4 () at gdb.server/server.c:24
> 24 int x = 1;
> (gdb)
>
> What should I test for in the gdb_test command?
>
> gdb_test "step" "function4 \(\) at .*$srcfile:\[0-9\]+."
>
> or
>
> gdb_test "step" ".*.\[0-9\].*int x \= 1\;
>
>
> Its not working for me in either case currently, unless I use a ".*" at
> the end, which I am trying to avoid (as per daniel's suggestion).

Well, you can test for either. But the second one ought to work
(though you have some more backslashes than you need). When you have
matching troubles, put "exp_internal 1" in front of the line giving you
trouble.