[Lldb-commits] [lldb] [lldb] Resolve ObjC property backing storage in dwim-print (PR #225204)
Piotr Jeremicz via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 12 08:01:37 PDT 2026
================
@@ -51,6 +52,52 @@ CommandObjectDWIMPrint::CommandObjectDWIMPrint(CommandInterpreter &interpreter)
Options *CommandObjectDWIMPrint::GetOptions() { return &m_option_group; }
+std::string CommandObjectDWIMPrint::RewritePathForBackingStorage(
+ llvm::StringRef expr, StackFrame &frame,
+ lldb::DynamicValueType use_dynamic) {
+ llvm::SmallVector<llvm::StringRef, 4> components;
+ expr.split(components, '.');
+ if (components.empty())
+ return {};
+
+ VariableSP var_sp;
+ Status status;
+ ValueObjectSP valobj_sp = frame.GetValueForVariableExpressionPath(
----------------
piotrekjeremicz wrote:
Honestly, I wasn't aware of that. 😥
It won't work with a bare `foo`. That's fine for ObjC, where a bare name means the ivar, but Swift will need a fallback. I can improve it in the Swift follow-up PR, if that's OK with you.
https://github.com/llvm/llvm-project/pull/225204
More information about the lldb-commits
mailing list