@@ -810,24 +810,31 @@ void ProfiledBinary::loadSymbolsFromDWARF(ObjectFile &Obj) {
810
810
loadSymbolsFromDWARFUnit (*CompilationUnit.get ());
811
811
812
812
// Handles DWO sections that can either be in .o, .dwo or .dwp files.
813
+ uint32_t NumOfDWOMissing = 0 ;
813
814
for (const auto &CompilationUnit : DebugContext->compile_units ()) {
814
815
DWARFUnit *const DwarfUnit = CompilationUnit.get ();
815
816
if (DwarfUnit->getDWOId ()) {
816
817
DWARFUnit *DWOCU = DwarfUnit->getNonSkeletonUnitDIE (false ).getDwarfUnit ();
817
818
if (!DWOCU->isDWOUnit ()) {
818
- std::string DWOName = dwarf::toString (
819
- DwarfUnit->getUnitDIE ().find (
820
- {dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}),
821
- " " );
822
- WithColor::warning ()
823
- << " DWO debug information for " << DWOName
824
- << " was not loaded. Please check the .o, .dwo or .dwp path.\n " ;
819
+ NumOfDWOMissing++;
820
+ if (ShowDetailedWarning) {
821
+ std::string DWOName = dwarf::toString (
822
+ DwarfUnit->getUnitDIE ().find (
823
+ {dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}),
824
+ " " );
825
+ WithColor::warning () << " DWO debug information for " << DWOName
826
+ << " was not loaded.\n " ;
827
+ }
825
828
continue ;
826
829
}
827
830
loadSymbolsFromDWARFUnit (*DWOCU);
828
831
}
829
832
}
830
833
834
+ if (NumOfDWOMissing)
835
+ WithColor::warning ()
836
+ << " DWO debug information was not loaded for " << NumOfDWOMissing
837
+ << " modules. Please check the .o, .dwo or .dwp path.\n " ;
831
838
if (BinaryFunctions.empty ())
832
839
WithColor::warning () << " Loading of DWARF info completed, but no binary "
833
840
" functions have been retrieved.\n " ;
0 commit comments