This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/20] Remove cleanups
- From: John Baldwin <jhb at FreeBSD dot org>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 13 Feb 2019 13:48:00 -0800
- Subject: Re: [PATCH 00/20] Remove cleanups
- References: <20190213212927.9474-1-tom@tromey.com>
On 2/13/19 1:29 PM, Tom Tromey wrote:
> This series removes the remaining uses of make_cleanup from the tree,
> then removes make_cleanup and some related functions (but note that
> final cleanups remain).
>
> Then, it removes the TRY/CATCH macros in favor of ordinary C++ code.
>
> Finally, it cleans up a few spots that currently use TRY/CATCH but
> that are more succinctly written using SCOPE_EXIT or RAII.
>
> Regression tested by the buildbot.
Yay!
The only comment I have is that the structure names for exceptions look a
bit awkward in code now with the mix of lower and upper case, e.g.:
try
{
e_msg = ada_exception_message_1 ();
}
catch (struct gdb_exception_RETURN_MASK_ERROR &e)
{
e_msg.reset (nullptr);
}
We could drop the 'struct' perhaps, but not sure if we could simplify the
classes a bit to something like:
struct gdb_exception_error : public gdb_exception
{
};
struct gdb_exception_quit : public gdb_exception
{
};
And use 'gdb_execption' instead of 'struct gdb_exception_RETURN_MASK_ALL',
'gdb_exception_error' instead of 'struct gdb_exception_RETURN_MASK_ERROR',
and 'gdb_exception_quit' instead of 'struct gdb_exception_RETURN_MASK_QUIT'?
--
John Baldwin