mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 11:57:39 +08:00
Currently, `DebuggerStats::ReportStatistics()` calls `Module::GetSymtab(/*can_create=*/false)`, but then the latter calls `SymbolFile::GetSymtab()`. This will load symbols if haven't yet. See stacktrace below. The problem is that `DebuggerStats::ReportStatistics` should be read-only. This is especially important because it reports stats for symtab parsing/indexing time, which could be affected by the reporting itself if it's not read-only. This patch fixes this problem by adding an optional parameter `SymbolFile::GetSymtab(bool can_create = true)` and receive the `false` value passed down from `Module::GetSymtab(/*can_create=*/false)` when the call was initiated from `DebuggerStats::ReportStatistics()`.
59 KiB
59 KiB