[Lldb-commits] [lldb] [lldb-dap] Add clipboard context support (PR #170644)

Sergei Druzhkov via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 17 09:07:16 PST 2025


================
@@ -1261,15 +1262,31 @@ lldb::SBValue SBValue::EvaluateExpression(const char *expr,
 
 bool SBValue::GetDescription(SBStream &description) {
   LLDB_INSTRUMENT_VA(this, description);
+  return GetDescription(description, eDescriptionLevelFull);
+}
+
+bool SBValue::GetDescription(SBStream &description,
+                             lldb::DescriptionLevel description_level) {
+  LLDB_INSTRUMENT_VA(this, description, description_level);
 
   Stream &strm = description.ref();
 
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
     DumpValueObjectOptions options;
-    options.SetUseDynamicType(m_opaque_sp->GetUseDynamic());
-    options.SetUseSyntheticValue(m_opaque_sp->GetUseSynthetic());
+    if (description_level != eDescriptionLevelInitial) {
+      options.SetUseDynamicType(m_opaque_sp->GetUseDynamic());
+      options.SetUseSyntheticValue(m_opaque_sp->GetUseSynthetic());
+    }
+    if (description_level == eDescriptionLevelBrief) {
----------------
DrSergei wrote:

No, I mean if level is initial we keep default options. For other levels we enable dynamic types and synthetic values. If level brief we hide some information (type, name). If level is verbose we add some additional information (locations, ...). I am not sure which options are the best for each level. 

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


More information about the lldb-commits mailing list