[Lldb-commits] [lldb] Improve VSCode DAP logpoint value summary (PR #71723)

via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 8 11:00:35 PST 2023


================
@@ -295,9 +295,11 @@ bool BreakpointBase::BreakpointHitCallback(
           frame.GetValueForVariablePath(expr, lldb::eDynamicDontRunTarget);
       if (value.GetError().Fail())
         value = frame.EvaluateExpression(expr);
-      const char *expr_val = value.GetValue();
-      if (expr_val)
-        output += expr_val;
+      llvm::StringRef summary_str = value.GetSummary();
+      if (!summary_str.empty())
+        output += summary_str.str();
+      else
+        output += value.GetValue();
----------------
jeffreytan81 wrote:

Sure, I can do that.

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


More information about the lldb-commits mailing list