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

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 8 10:57:23 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();
----------------
clayborg wrote:

I think we should do what we do for variables: show the value + summary. If you have pointer, but it has a summary, we should still show the poiinter and tthe summary

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


More information about the lldb-commits mailing list