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 30/07/2013 3:53 PM, Pedro Alves wrote:
> 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.

Confirmed that we get an error for the example you gave.  I've
included a test of this as part of this commit.

> 
>> 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.

Committed.

Thanks,
Andrew




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