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: [PATCH v2 14/22] Simplify exception handling


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


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