This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use TRY/CATCH in remove_prev_frame
On 05/25/2018 03:58 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
>>> + CATCH (ex, RETURN_MASK_ERROR)
>
> Pedro> Use RETURN_MASK_ALL.
>
> I made this change but someone may want to audit the other uses of
> TRY/CATCH in frame.c. They all use RETURN_MASK_ERROR. Or I could just
> convert them all.
The other uses are all correct. They want to handle specific
types of exceptions, like:
CATCH (ex, RETURN_MASK_ERROR)
{
if (ex.error == MEMORY_ERROR)
CATCH (ex, RETURN_MASK_ERROR)
{
if (ex.error == NOT_AVAILABLE_ERROR)
All other types of exception are rethrown. So it would be
useless to use RETURN_MASK_ALL for those, because it would
mean we would catch Ctrl-C just to rethrow it again
immediately.
Thanks,
Pedro Alves