[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 12 08:45:13 PDT 2024
================
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr,
m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on
// the synthetic children being
// up-to-date (e.g. ${svar%#})
- summary_ptr->FormatObject(this, destination, actual_options);
+ SummaryStatistics &summary_stats = GetExecutionContextRef()
+ .GetProcessSP()
+ ->GetTarget()
----------------
Michael137 wrote:
This should be:
```suggestion
if (auto target_sp = GetTargetSP())
SummaryStatistics &summary_stats = target_sp->GetSummaryStatisticsForProvider(GetTypeName())
```
etc.
Not sure if we're guaranteed a `ProcessSP` and `TargetSP` here (which might be the cause of the PR test failures)
https://github.com/llvm/llvm-project/pull/102708
More information about the lldb-commits
mailing list