[all-commits] [llvm/llvm-project] 0478ea: [lldb/DataFormatters] Fix the `$$deference$$` synt...
fredriss via All-commits
all-commits at lists.llvm.org
Tue Jan 21 13:37:00 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0478eadf73c191199cba12c85785cfafb8bfa174
https://github.com/llvm/llvm-project/commit/0478eadf73c191199cba12c85785cfafb8bfa174
Author: Fred Riss <friss at apple.com>
Date: 2020-01-21 (Tue, 21 Jan 2020)
Changed paths:
M lldb/docs/use/variable.rst
M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/fooSynthProvider.py
M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/main.cpp
M lldb/source/Core/ValueObject.cpp
Log Message:
-----------
[lldb/DataFormatters] Fix the `$$deference$$` synthetic child
Summary:
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.
Reviewers: jingham
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73053
More information about the All-commits
mailing list