llvm-project/lldb/source/Core
Tonko Sabolčec 0205aa4a02 [lldb] Fix member access in GetExpressionPath
This change fixes two issues in ValueObject::GetExpressionPath method:

 1. Accessing members of struct references used to produce expression
    paths such as "str.&str.member" (instead of the expected
    "str.member"). This is fixed by assigning the flag tha the child
    value is a dereference when calling Dereference() on references
    and adjusting logic in expression path creation.

 2. If the parent of member access is dereference, the produced
    expression path was "*(ptr).member". This is incorrect, since it
    dereferences the member instead of the pointer. This is fixed by
    wrapping dereference expression into parenthesis, resulting with
    "(*ptr).member".

Reviewed By: werat, clayborg

Differential Revision: https://reviews.llvm.org/D132734
2022-10-12 12:08:57 +00:00
..
Address.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
AddressRange.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
AddressResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
AddressResolverFileLine.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
CMakeLists.txt [lldb] [Core] Split read thread support into ThreadedCommunication 2022-09-06 13:09:42 +02:00
Communication.cpp [lldb] [Core] Split read thread support into ThreadedCommunication 2022-09-06 13:09:42 +02:00
CoreProperties.td [LLDB] Add missing space in help for frame-format-unique setting 2022-10-07 08:42:35 +00:00
DataFileCache.cpp [lldb] Appease the MSCV compiler 2022-09-19 17:37:27 -07:00
Debugger.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
DebuggerEvents.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
Declaration.cpp [lldb] Move and clean-up the Declaration class (NFC) 2021-05-04 16:34:44 +00:00
Disassembler.cpp [lldb] Silence a GCC warning about missing returns after a fully covered switch. NFC. 2022-08-02 10:57:33 +03:00
DumpDataExtractor.cpp Remove redundant initialization of Optional (NFC) 2022-08-20 21:18:28 -07:00
DumpRegisterValue.cpp [lldb] Always use APFloat for FP dumping 2022-07-27 14:30:35 +02:00
DynamicLoader.cpp Add mach-o corefile support for platform binaries 2022-09-13 15:46:18 -07:00
EmulateInstruction.cpp [LLDB] Change EmulateInstriction::ReadRegister to return Optional 2022-10-12 08:37:36 +00:00
FileLineResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
FileSpecList.cpp Implement better path matching in FileSpecList::FindCompatibleIndex(...). 2022-08-08 15:20:38 -07:00
FormatEntity.cpp [Formatters][NFCI] Replace 'is_regex' arguments with an enum. 2022-09-13 12:50:55 -07:00
Highlighter.cpp
IOHandler.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
IOHandlerCursesGUI.cpp [lldb] Fixed a number of typos 2022-09-13 10:38:38 -07:00
Mangled.cpp [demangler] Rust demangler buffer return 2022-04-13 08:50:04 -07:00
Module.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
ModuleChild.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ModuleList.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
Opcode.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
PluginManager.cpp [lldb] Teach LLDB about Mach-O filesets 2022-08-25 15:24:51 -07:00
Progress.cpp
RichManglingContext.cpp [lldb] Use Any::has_value instead of ANy::hasValue (NFC) 2022-08-20 07:28:06 -07:00
SearchFilter.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Section.cpp [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
SourceLocationSpec.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
SourceManager.cpp Check that a FileSpec has a Directory component before using 2022-05-26 11:12:37 -07:00
StreamAsynchronousIO.cpp [lldb] Print diagnostic prefixes (error, warning) in color 2022-04-12 20:28:29 -07:00
StreamFile.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadedCommunication.cpp [lldb] Fix ThreadedCommunication races 2022-09-09 15:10:38 +02:00
UserSettingsController.cpp Add SBDebugger::GetSetting() public APIs 2022-09-11 20:50:03 -07:00
Value.cpp [lldb] Use =default in the ValueList class 2022-03-30 09:12:59 +02:00
ValueObject.cpp [lldb] Fix member access in GetExpressionPath 2022-10-12 12:08:57 +00:00
ValueObjectCast.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectChild.cpp Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
ValueObjectConstResult.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultCast.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultChild.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultImpl.cpp Remove unused variable. 2021-11-18 15:58:20 -08:00
ValueObjectDynamicValue.cpp [lldb] Change back LLDBLog::Commands->Types in a couple more places 2022-03-16 15:46:17 +01:00
ValueObjectList.cpp
ValueObjectMemory.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectRegister.cpp [LLDB] Pass const RegisterInfo& to RegisterValue::SetValueFromData 2022-10-12 08:19:30 +00:00
ValueObjectSyntheticFilter.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ValueObjectUpdater.cpp
ValueObjectVariable.cpp [LLDB] Pass const RegisterInfo& to RegisterValue::SetValueFromData 2022-10-12 08:19:30 +00:00