File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
lldb/source/Plugins/SymbolFile/DWARF Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -896,8 +896,9 @@ void DWARFUnit::ComputeAbsolutePath() {
896
896
m_file_spec->MakeAbsolute (GetCompilationDirectory ());
897
897
}
898
898
899
- SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile () {
900
- ExtractUnitDIEIfNeeded ();
899
+ SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile (bool load_if_needed) {
900
+ if (load_if_needed)
901
+ ExtractUnitDIEIfNeeded ();
901
902
if (m_dwo)
902
903
return &llvm::cast<SymbolFileDWARFDwo>(m_dwo->GetSymbolFileDWARF ());
903
904
return nullptr ;
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ class DWARFUnit : public UserID {
241
241
FileSpec GetFile (size_t file_idx);
242
242
FileSpec::Style GetPathStyle ();
243
243
244
- SymbolFileDWARFDwo *GetDwoSymbolFile ();
244
+ SymbolFileDWARFDwo *GetDwoSymbolFile (bool load_if_needed = true );
245
245
246
246
die_iterator_range dies () {
247
247
ExtractDIEsIfNeeded ();
Original file line number Diff line number Diff line change @@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize() {
2687
2687
if (cu == nullptr )
2688
2688
continue ;
2689
2689
2690
- SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile ();
2690
+ SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile (false );
2691
2691
if (dwo)
2692
2692
debug_info_size += dwo->GetDebugInfoSize ();
2693
2693
}
Original file line number Diff line number Diff line change @@ -186,6 +186,10 @@ class SymbolFileDWARF : public SymbolFileCommon {
186
186
GetMangledNamesForFunction (const std::string &scope_qualified_name,
187
187
std::vector<ConstString> &mangled_names) override ;
188
188
189
+ // / Return total currently loaded debug info.
190
+ // / For cases like .dwo files, the debug info = skeleton debug info + all dwo
191
+ // / debug info where .dwo files might not be loaded yet. Calling this function
192
+ // / will not force the loading of any .dwo files.
189
193
uint64_t GetDebugInfoSize () override ;
190
194
191
195
void FindTypes (const lldb_private::TypeQuery &match,
You can’t perform that action at this time.
0 commit comments