From 9eddc8b9bf4e4e0b01e2ecc90a71c4b3b4e9c8af Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 14 Oct 2024 16:29:26 -0700 Subject: [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. --- lldb/source/Commands/CommandObjectDWIMPrint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectDWIMPrint.cpp') 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 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; } -- cgit v1.2.3