This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Rethrow exception properly.


 > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]