================
@@ -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) {
----------------
ashgti wrote:

Should this be an `else if`?

https://github.com/llvm/llvm-project/pull/170644
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to