This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [2/2] Don't raise an error for optimized out sub-fields.
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 30 Jul 2013 15:53:27 +0100
- Subject: Re: [PATCH] [2/2] Don't raise an error for optimized out sub-fields.
- References: <51DEC299 dot 8040109 at broadcom dot com>
On 07/11/2013 03:35 PM, Andrew Burgess wrote:
> When performing a lazy fetch of a sub-bitfield, we raise an error
> if the bits have been optimized-out from the parent value. This
> is odd, as in most other cases we report the value as "<optimized out>".
Agreed. For printing, we aim at being graceful, and not throw
errors. Errors are left for when computing expressions that
would require the contents of a non-optimized out value. IOW,
gdb_test "p s.d + 1"
should still throw. Can you confirm that? Might as well add it
to the test while at it.
>
> This patch marks the result of the lazy fetch as optimized out,
> and then returns rather than raising an error. No regressions,
> and the one test I see that hits this now seems more consistent.
Nice, thanks.
> 2013-07-11 Andrew Burgess <aburgess@broadcom.com>
>
> * value.c (value_fetch_lazy): Mark optimized out values as such
> rather than raising an error.
>
> gdb/testsuite/ChangeLog
>
> 2013-07-11 Andrew Burgess <aburgess@broadcom.com>
>
> * gdb.dwarf2/pieces-optimized-out.exp: Expect "<optimized out>"
OK.
--
Pedro Alves