summaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectDWIMPrint.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2024-10-14 16:29:26 -0700
committerGitHub <noreply@github.com>2024-10-14 16:29:26 -0700
commit9eddc8b9bf4e4e0b01e2ecc90a71c4b3b4e9c8af (patch)
treec5525898a47401b0e6ebb6d4cc8b72569fd5d953 /lldb/source/Commands/CommandObjectDWIMPrint.cpp
parentfc08ad6610c66856f48559e543eb7be317e908e7 (diff)
[lldb] Expose structured command diagnostics via the SBAPI. (#112109)
This allows IDEs to render LLDB expression diagnostics to their liking without relying on characterprecise ASCII art from LLDB. It is exposed as a versioned SBStructuredData object, since it is expected that this may need to be tweaked based on actual usage.
Diffstat (limited to 'lldb/source/Commands/CommandObjectDWIMPrint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectDWIMPrint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectDWIMPrint.cpp b/lldb/source/Commands/CommandObjectDWIMPrint.cpp
index beff5f4bbcc5..ddf0aca25fb3 100644
--- a/lldb/source/Commands/CommandObjectDWIMPrint.cpp
+++ b/lldb/source/Commands/CommandObjectDWIMPrint.cpp
@@ -194,7 +194,7 @@ void CommandObjectDWIMPrint::DoExecute(StringRef command,
// Record the position of the expression in the command.
std::optional<uint16_t> indent;
if (fixed_expression.empty()) {
- size_t pos = m_original_command.find(expr);
+ size_t pos = m_original_command.rfind(expr);
if (pos != llvm::StringRef::npos)
indent = pos;
}