This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Eliminate -var-create error for optzd ptr to struct
- From: Pedro Alves <palves at redhat dot com>
- To: Don Breazeal <donb at codesourcery dot com>, Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 6 Apr 2016 23:24:12 +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> <86lh4rm7kq dot fsf at gmail dot com> <5705828A dot 3030708 at codesourcery dot com>
On 04/06/2016 10:41 PM, Don Breazeal wrote:
> On 4/6/2016 2:04 AM, Yao Qi wrote:
> 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?
Please leave them as is. We need to translate gdb exceptions to Python/Scheme
exceptions at the gdb <-> extension-language boundaries. Those gdb
functions in question will be returning to the Python/Scheme runtimes, which
are not prepared to unwind correctly on a gdb exception.