[Lldb-commits] [lldb] [lldb-dap] Don't duplicate script output in the evaluate response (PR #232583)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 20 07:50:27 PDT 2026


================
@@ -118,13 +118,16 @@ EvaluateRequestHandler::Run(const EvaluateArguments &arguments) const {
                          /*add_to_history=*/true);
 
     if (!result.Succeeded()) {
+      const char *error = result.GetError(/*only_if_no_immediate=*/true);
       return llvm::make_error<DAPError>(
-          std::string(result.GetError(), result.GetErrorSize()),
+          error ? std::string(error, result.GetErrorSize()) : std::string(),
----------------
da-viper wrote:

The `GetErrorSize()` is not for `only_if_no_immediate`. so it create the string with the wrong size. Same issue with `GetOutputSize()`

https://github.com/llvm/llvm-project/pull/232583


More information about the lldb-commits mailing list