This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Eliminate -var-create error for optzd ptr to struct
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Don Breazeal <donb at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>, <qiyaoltc at gmail dot com>, <palves at redhat dot com>
- Date: Wed, 06 Apr 2016 10:04:37 +0100
- Subject: Re: [PATCH] Eliminate -var-create error for optzd ptr to struct
- Authentication-results: sourceware.org; auth=none
- References: <1459888769-18875-1-git-send-email-donb at codesourcery dot com>
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.
> + {
> + /* Fall back to checking value->optimized_out. */
> + }
> + END_CATCH
> + }
Otherwise, patch is good to me.
--
Yao (éå)