From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Use TRY/CATCH in remove_prev_frame
Date: Fri, 25 May 2018 16:28:00 -0000 [thread overview]
Message-ID: <79a20552-8638-ea54-d046-072fc79bc45a@redhat.com> (raw)
In-Reply-To: <87d0xj234i.fsf@tromey.com>
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
next prev parent reply other threads:[~2018-05-25 16:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 9:55 Tom Tromey
2018-05-25 11:54 ` Pedro Alves
2018-05-25 15:04 ` Tom Tromey
2018-05-25 16:28 ` Pedro Alves [this message]
2018-05-25 16:28 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=79a20552-8638-ea54-d046-072fc79bc45a@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox