friss added inline comments.

================
Comment at: lldb/source/Core/ValueObjectChild.cpp:202-205
-            if (m_bitfield_bit_size)
-              scalar.ExtractBitfield(m_bitfield_bit_size,
-                                     m_bitfield_bit_offset);
-            else
----------------
shafik wrote:
> friss wrote:
> > Why remove the code in `ValueObject` rather than avoid re-extracting at 
> > printing time? I'm not sure which one is correct. If you get your hands on 
> > a `ValueObject` for the field in your test, what will `GetValueAsUnsigned` 
> > return? it should give the correct field value.
> `lldb_private::DumpDataExtractor(…)` is general purpose and it used by a lot 
> of other code, it does know the value comes from a `Scalar` or otherwise it 
> is just receiving a `DataExtractor` and obtaining the data from there. 
You didn't answer the most important question. Will `GetValueAsUnsigned` return 
the correct value on such a ValueObject once you remove this code?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85376/new/

https://reviews.llvm.org/D85376

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to