llvm-project/lldb/source/Core
Fred Riss 0478eadf73 [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
2020-01-21 13:35:55 -08:00
..
Address.cpp [lldb][NFC] Move Address and AddressRange functions out of Stream and let them take raw_ostream 2019-12-05 14:41:33 +01:00
AddressRange.cpp [lldb][NFC] Move Address and AddressRange functions out of Stream and let them take raw_ostream 2019-12-05 14:41:33 +01:00
AddressResolver.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
AddressResolverFileLine.cpp [lldb] NFC: refactor CompileUnit::ResolveSymbolContext 2019-11-28 21:37:31 +01:00
AddressResolverName.cpp Modernize the rest of the Find.* API (NFC) 2019-10-17 19:56:40 +00:00
CMakeLists.txt [lldb/CMake] Fix variable naming in FindLibEdit 2020-01-02 13:39:57 -08:00
Communication.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
CoreProperties.td [lldb] Don't process symlinks deep inside DWARFUnit 2020-01-20 13:05:00 +01:00
Debugger.cpp [lldb/IOHandler] Improve synchronization between IO handlers. 2020-01-20 11:17:55 -08:00
Disassembler.cpp Run all threads when extending a next range over a call. 2019-12-16 17:45:21 -08:00
DumpDataExtractor.cpp [lldb][NFC] Move Address and AddressRange functions out of Stream and let them take raw_ostream 2019-12-05 14:41:33 +01:00
DumpRegisterValue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DynamicLoader.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
EmulateInstruction.cpp Fix a "memset clearing an object of non-trivial type" warning in EmulateInstruction 2019-03-19 15:05:55 +00:00
FileLineResolver.cpp [lldb] Remove FileSpec->CompileUnit inheritance 2019-11-29 11:44:45 +01:00
FileSpecList.cpp [lldb][NFC] Migrate FileSpec::Dump to raw_ostream 2019-12-06 09:40:42 +01:00
FormatEntity.cpp [lldb] Fix an unused variable warning 2019-12-20 16:51:25 +01:00
Highlighter.cpp [NFC] Remove lldb_utility namespace. 2019-08-21 00:50:46 +00:00
IOHandler.cpp [lldb/Core] Add missing include 2019-12-12 09:55:11 -08:00
IOHandlerCursesGUI.cpp [lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSES 2019-12-12 09:13:31 -08:00
Mangled.cpp [LLDB] Fix handling for the clang name mangling extension for block invocations 2019-11-06 14:20:00 -08:00
Module.cpp [lldb/ScriptInterpreter] Remove can_reload which is always true (NFC) 2019-12-22 21:36:03 -08:00
ModuleChild.cpp Delete unnecessary copy ctors/copy assignment operators 2019-05-15 11:23:54 +00:00
ModuleList.cpp [lldb] Don't process symlinks deep inside DWARFUnit 2020-01-20 13:05:00 +01:00
Opcode.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PluginManager.cpp [lldb] Fix ARM32 inferior calls 2019-12-21 11:12:17 +01:00
RichManglingContext.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
SearchFilter.cpp [lldb] NFC: less nesting in SearchFilter.cpp 2019-12-06 08:38:33 +01:00
Section.cpp [lldb/DWARF] Move location list sections into DWARFContext 2020-01-14 15:19:29 +01:00
SourceManager.cpp [lldb] s/FileSpec::Equal/FileSpec::Match 2019-12-04 10:42:32 +01:00
StreamAsynchronousIO.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StreamFile.cpp [LLDB] Remove dead code from StreamFile 2019-11-13 15:08:51 -08:00
UserSettingsController.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
Value.cpp ValueObject: Upstream early-exit from swift-lldb. (NFC) 2019-11-05 10:53:57 -08:00
ValueObject.cpp [lldb/DataFormatters] Fix the `$$deference$$` synthetic child 2020-01-21 13:35:55 -08:00
ValueObjectCast.cpp Remove unused and undocumented data_offset parameter (NFC) 2019-08-08 19:22:32 +00:00
ValueObjectChild.cpp Remove unused and undocumented data_offset parameter (NFC) 2019-08-08 19:22:32 +00:00
ValueObjectConstResult.cpp Remove unused and undocumented data_offset parameter (NFC) 2019-08-08 19:22:32 +00:00
ValueObjectConstResultCast.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectConstResultChild.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectConstResultImpl.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
ValueObjectDynamicValue.cpp Remove unused and undocumented data_offset parameter (NFC) 2019-08-08 19:22:32 +00:00
ValueObjectList.cpp Delete unnecessary copy ctors/copy assignment operators 2019-05-15 11:23:54 +00:00
ValueObjectMemory.cpp Remove unused and undocumented data_offset parameter (NFC) 2019-08-08 19:22:32 +00:00
ValueObjectRegister.cpp [Symbol] Use llvm::Expected when getting TypeSystems 2019-07-30 22:12:34 +00:00
ValueObjectSyntheticFilter.cpp [lldb][NFC] Remove ThreadSafeSTLVector and ThreadSafeSTLMap and their use in ValueObjectSynthetic 2019-12-03 09:18:44 +01:00
ValueObjectVariable.cpp ValueObject: Fix a crash related to children address type computation 2019-10-25 17:49:06 +00:00