[Lldb-commits] [PATCH] D85376: Fix how ValueObjectChild handles bit-fields stored in a Scalar in UpdateValue()
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 6 10:44:37 PDT 2020
friss added inline comments.
Comment at: lldb/source/Core/ValueObjectChild.cpp:202-205
- if (m_bitfield_bit_size)
> 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
More information about the lldb-commits