aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2025-02-19 15:17:35 -0800
committerGitHub <noreply@github.com>2025-02-19 15:17:35 -0800
commitf62f13d5db212b4bebe6fc143fb9827703e88dfd (patch)
tree7033693c7a17e0c9231e4105af5349dde482c721 /lldb/source/Commands/CommandObjectExpression.cpp
parentb0e24d17f294ce421ebf7174d8c74cdae374d7e7 (diff)
downloadllvm-f62f13d5db212b4bebe6fc143fb9827703e88dfd.zip
llvm-f62f13d5db212b4bebe6fc143fb9827703e88dfd.tar.gz
llvm-f62f13d5db212b4bebe6fc143fb9827703e88dfd.tar.bz2
[lldb] Store the return SBValueList in the CommandReturnObject (#127566)
There are a lot of lldb commands whose result is really one or more ValueObjects that we then print with the ValueObjectPrinter. Now that we have the ability to access the SBCommandReturnObject through a callback (#125006), we can store the resultant ValueObjects in the return object, allowing an IDE to access the SBValues and do its own rich formatting. rdar://143965453
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 7e26381..18526c4 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -434,6 +434,8 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
}
if (result_valobj_sp) {
+ result.GetValueObjectList().Append(result_valobj_sp);
+
Format format = m_format_options.GetFormat();
if (result_valobj_sp->GetError().Success()) {