This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 14/22] Simplify exception handling
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Tue, 2 Apr 2019 23:07:39 +0100
- Subject: Re: [PATCH v2 14/22] Simplify exception handling
- References: <20190227201849.32210-1-tom@tromey.com> <20190227201849.32210-15-tom@tromey.com>
On 02/27/2019 08:18 PM, Tom Tromey wrote:
> Now that cleanups have been removed, TRY/CATCH can't be SJLJ-based any
> more. This patch simplifies the exception handling code, by removing
> the non-working variants.
>
> Note that the "pure" C++ exception handling code is removed as well;
That's fine, if we're getting rid of TRY/CATCH.
That mode is/was useful to catch issues like these:
https://sourceware.org/ml/gdb-patches/2017-10/msg00080.html
but if we're getting rid of TRY/CATCH, then it won't be
needed anymore, of course.
> I
> think the route forward must be to change exceptions to be
> self-destructing, so that try_scope_depth can simply be removed.
Agreed.
>
> Some longjmp-based code remains, as it is needed to throw an exception
> through readline.
>
> gdb/ChangeLog
> 2019-02-27 Tom Tromey <tom@tromey.com>
>
> * common/common-exceptions.h (GDB_XCPT_SJMP, GDB_XCPT_TRY)
> (GDB_XCPT_RAW_TRY, GDB_XCPT): Remove.
> (TRY, CATCH, END_CATCH): Remove some definitions.
> * common/common-exceptions.c: Don't use GDB_XCPT.
> (catcher_list_size): Remove.
> (throw_exception, throw_it): Simplify.
Looks fine. I spotted a few comments that need updating,
even after the whole series is in, but no need to stress about it.
It's fine to tackle it with a final pass after the series.
I have comments for the other patches, will send them as soon
as possible.
Thanks,
Pedro Alves