gdb/testsuite: show evaluation errors in gdb_assert
Let's say you put this gdb_assert in a test:
gdb_assert "some invalid tcl code"
You just get:
FAIL: gdb.base/template.exp: some invalid tcl code
That's not very easy to debug, since you don't know what's invalid in
your code.
Change gdb_assert to print the error message when catch's return code is
1 (TCL_ERROR). The "warning" is shown both on stdout and in the log
file. Mark the test as unresolved, because the evaluation error means
we couldn't reach a valid pass/fail conclusion.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (gdb_assert): Show error message on error.
Change-Id: Ie6477859554e909ed8d07fb2769c6f2f55e7cce6