https://github.com/augusto2112 created 
https://github.com/llvm/llvm-project/pull/93262

UpdateFormatsIfNeeded has hardcoded the call to GetFormat with no dynamic 
values. GetFormat will try to find the synthetic children of the ValueObject, 
and passing the wrong one can fail, which can be bad for performance but should 
not be user visible. Fix the performace bug by passing the dynamic value type 
of the ValueObject.

rdar://122506593

>From d698ba1ce41d04526dfc2d8abe69c673d524afa4 Mon Sep 17 00:00:00 2001
From: Augusto Noronha <anoro...@apple.com>
Date: Thu, 23 May 2024 17:30:47 -0700
Subject: [PATCH] [lldb] UpdateFormatsIfNeeded should respect the dynamic value
 type

UpdateFormatsIfNeeded has hardcoded the call to GetFormat with no
dynamic values. GetFormat will try to find the synthetic children of the
ValueObject, and passing the wrong one can fail, which can be bad for
performance but should not be user visible. Fix the performace bug by
passing the dynamic value type of the ValueObject.

rdar://122506593
---
 lldb/source/Core/ValueObject.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 1443d9dfc3280..c5c434a941b34 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -216,7 +216,7 @@ bool ValueObject::UpdateFormatsIfNeeded() {
     m_last_format_mgr_revision = DataVisualization::GetCurrentRevision();
     any_change = true;
 
-    SetValueFormat(DataVisualization::GetFormat(*this, eNoDynamicValues));
+    SetValueFormat(DataVisualization::GetFormat(*this, GetDynamicValueType()));
     SetSummaryFormat(
         DataVisualization::GetSummaryFormat(*this, GetDynamicValueType()));
     SetSyntheticChildren(

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to