Re: [PATCH] Fix segfault on empty else

Daniel Jacobowitz
2006-07-06T16:23:53Z

On Thu, Jul 06, 2006 at 05:18:46PM +0100, Andrew STUBBS wrote:
> # with true condition
> if {[gdb_test_multiple "if 1\nend\necho got here\\n" "if 1 with empty body" {
> -re ".*got here.*$gdb_prompt $" {pass "if 1 with empty body"}
> }] != 0} {
> gdb_exit
> gdb_start
> }

Does this work better?

set message "if 1 with empty body"
gdb_test_multiple "if 1\nend\necho got here\n" $message {
-re "got here.*$gdb_prompt $" {
pass $message
}
eof {
fail $message
gdb_exit
gdb_start
}
}

--
Daniel Jacobowitz
CodeSourcery