[PATCH] Command trace testsuite

Daniel Jacobowitz drow@false.org
Tue Aug 8 17:34:00 GMT 2006


On Mon, Aug 07, 2006 at 06:04:50PM +0100, Andrew STUBBS wrote:
> Here is a set of tests for the 'set trace-commands' command that I added 
> a while back.

Thanks!

> +# Source the script with verbose mode.
> +gdb_test "source -v tracecommandsscript" {source -v tracecommandsscript[\r\n]+\+echo in tracecommandsscript\\n[\r\n]+in tracecommandsscript[\r\n]+\+define func[\r\n]+\+if 1[\r\n]+\+\+if 2[\r\n]+\+\+\+if 3[\r\n]+\+\+\+\+if 4[\r\n]+\+\+\+\+\+echo deep\\n[\r\n]+deep[\r\n]+\+\+\+\+\+func 999[\r\n]+\+\+\+\+\+\+echo in func 999\\n[\r\n]+in func 999} "source -v"

For this sort of test, there's gdb_expect_list.  The nice thing about
that is that it will tell you where there's a problem on errors (and
not generate thousand-character lines).  Could you give that a try?

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list