From: Don Breazeal <donb@codesourcery.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"palves@redhat.com" <palves@redhat.com>
Subject: Re: [PATCH] Eliminate -var-create error for optzd ptr to struct
Date: Wed, 06 Apr 2016 21:41:00 -0000 [thread overview]
Message-ID: <5705828A.3030708@codesourcery.com> (raw)
In-Reply-To: <86lh4rm7kq.fsf@gmail.com>
On 4/6/2016 2:04 AM, Yao Qi wrote:
> Don Breazeal <donb@codesourcery.com> writes:
>
>>> Please don't. A RETURN_MASK_ALL swallows Ctrl-C/QUIT, and that's almost
>>> always a bug. The cases you mention translate a QUIT to a python/scheme
>>> exception, which is not the same as just swallowing the exception.
>>
>> Patch below changes that back. Pedro, thanks for clarifying.
>>
>
> No, it doesn't.
>
>> @@ -1433,7 +1434,17 @@ value_optimized_out (struct value *value)
>> /* We can only know if a value is optimized out once we have tried to
>> fetch it. */
>> if (VEC_empty (range_s, value->optimized_out) && value->lazy)
>> - value_fetch_lazy (value);
>> + {
>> + TRY
>> + {
>> + value_fetch_lazy (value);
>> + }
>> + CATCH (ex, RETURN_MASK_ALL)
>
> It should be RETURN_MASK_ERROR.
Sorry about that.
/me shakes head at self for goofing up the easy stuff.
>
>> + {
>> + /* Fall back to checking value->optimized_out. */
>> + }
>> + END_CATCH
>> + }
>
> Otherwise, patch is good to me.
>
Thanks Yao. This is now corrected and pushed in.
Question: in light of Pedro's comments regarding
gdbscm_value_optimized_out_p and valpy_get_is_optimized_out:
> A RETURN_MASK_ALL swallows Ctrl-C/QUIT, and that's almost
> always a bug. The cases you mention translate a QUIT to
> a python/scheme exception, which is not the same as just
> swallowing the exception.
Would you still like for me to follow up with a patch to remove the
TRY/CATCH blocks around the calls to value_optimized_out in those two
functions? Or do we want to leave it as-is so that the QUIT handling
remains unchanged?
Thanks
--Don
next prev parent reply other threads:[~2016-04-06 21:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <861t6knro9.fsf@gmail.com>
2016-04-05 18:51 ` Don Breazeal
2016-04-05 19:00 ` Pedro Alves
2016-04-05 20:39 ` Don Breazeal
2016-04-06 9:05 ` Yao Qi
2016-04-06 21:41 ` Don Breazeal [this message]
2016-04-06 22:24 ` Pedro Alves
2016-04-07 14:12 ` Yao Qi
[not found] <1456273154-28629-1-git-send-email-donb@codesourcery.com>
2016-02-24 1:14 ` Luis Machado
2016-02-24 16:31 ` Don Breazeal
2016-02-25 12:22 ` Pedro Alves
2016-03-29 12:01 ` Yao Qi
2016-03-29 17:14 ` Don Breazeal
2016-03-30 14:35 ` Yao Qi
2016-04-01 16:01 ` Don Breazeal
2016-04-04 10:42 ` Yao Qi
2016-04-04 17:16 ` Don Breazeal
2016-04-04 21:28 ` Don Breazeal
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=5705828A.3030708@codesourcery.com \
--to=donb@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.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