This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix segfault on empty else
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 6 Jul 2006 12:23:49 -0400
- Subject: Re: [PATCH] Fix segfault on empty else
- References: <44980741.4040404@st.com> <20060620201752.GA1453@nevyn.them.org> <4499247B.7050404@st.com> <20060706133044.GC18827@nevyn.them.org> <44AD37E6.5050705@st.com>
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