cleanup mi error message handling
Pedro Alves
pedro@codesourcery.com
Fri Apr 4 23:08:00 GMT 2008
A Friday 04 April 2008 13:34:07, Vladimir Prus wrote:
> > +
> > + rc = gdb_thread_select (uiout, argv[0], &mi_error_message);
> > +
> > + if (rc == GDB_RC_FAIL)
> > {
> > - mi_error_message = xstrprintf ("mi_cmd_thread_select: USAGE:
> > threadnum."); - return MI_CMD_ERROR;
> > + make_cleanup (xfree, mi_error_message);
> > + error ("%s", mi_error_message);
>
> Oh, so first gdb_thread_select catches exception and converts it to string,
> and then we throw that string again? Eek, but guess we can fix that with
> a separate patch.
>
I understood this is as one of those libgdb-functions-can't-throw
issues (gdb_ prefix). I don't know if we should be worrying about
those today, but didn't want to go there for this patch.
> This patch is OK. Please be sure to re-run the MI testsuite before checking
> in, though, as there were various testsuite changes recently.
>
Refreshed, retested, and checked in. Attached is the patch I applied.
Thanks,
--
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mi_exceptions.diff
Type: text/x-diff
Size: 46643 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080404/ebc4779b/attachment.bin>
More information about the Gdb-patches
mailing list