[Lldb-commits] [PATCH] D73053: [lldb/DataFormatters] Fix the `$$deference$$` synthetic child
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 20 08:52:29 PST 2020
friss created this revision.
friss added a reviewer: jingham.
Herald added a project: LLDB.
The ValueObject code checks for a special `$$dereference$$` synthetic
child to allow formatter providers to implement a natural
dereferencing behavior in `frame variable` for objects like smart
pointers.
This support was broken when used directly throught the Python API and
not trhough `frame variable`. The reason is that
SBFrame.FindVariable() will return by default the synthetic variable
if it exists, while `frame variable` will not do this eagerly. The
code in `ValueObject::Dereference()` accounted for the latter but not
for the former. The fix is trivial. The test change includes
additional covergage for the already-working bahevior as it wasn't
covered by the testsuite before.
This commit also adds a short piece of documentatione explaining that
it is possible (even advisable) to provide this synthetic child
outstide of the range of the normal children.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73053
Files:
lldb/docs/use/variable.rst
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/fooSynthProvider.py
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/main.cpp
lldb/source/Core/ValueObject.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73053.239148.patch
Type: text/x-patch
Size: 8070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200120/d6c0db09/attachment-0001.bin>
More information about the lldb-commits
mailing list