This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Rethrow exception properly.
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 27 Jan 2008 15:18:32 +1300
- Subject: Re: [RFA] Rethrow exception properly.
- References: <200801262257.36197.vladimir@codesourcery.com>
> Such rethrowing is just wrong -- if we fully delegate handling of
> the error to our caller, we should just throw the original exception.
>
> The attached patch switches to using throw_exception and gets us
> back to sane MI error message. OK?
There is still the anomaly between break_command_really returning int and
gdb_breakpoint returning enum gdb_rc. Currently it looks like the return value
of break_command_1 is not used, so this could presumably be void. If the
exception handling is all done in break_command_really perhaps we don't need
the return value of gdb_breakpoint.
>...
> +proc test_error {} {
> + global mi_gdb_prompt
> +
> + mi_gdb_test "-break-insert function_that_does_not_exit" \
function_that_does_not_exist
> + ".*\\^error,msg=\"Function \\\\\"function_that_does_not_exit\\\\\" not defined.\"" \
function_that_does_not_exist
> + "breakpoint at nonexistent function"
> +}
>...
--
Nick http://www.inet.net.nz/~nickrob