This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [2/2] Don't raise an error for optimized out sub-fields.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]