[llvm] Gsymutil aggregation similar to DwarfDump --verify (PR #81154)
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 11:45:03 PST 2024
================
@@ -664,24 +677,28 @@ llvm::Error DwarfTransformer::verify(StringRef GsymPath, raw_ostream &Log) {
}
if (NumDwarfInlineInfos > 0 &&
NumDwarfInlineInfos != LR->Locations.size()) {
- Log << "error: address " << HEX64(Addr) << " has "
- << NumDwarfInlineInfos << " DWARF inline frames and GSYM has "
- << LR->Locations.size() << "\n";
- Log << " " << NumDwarfInlineInfos << " DWARF frames:\n";
- for (size_t Idx = 0; Idx < NumDwarfInlineInfos; ++Idx) {
- const auto &dii = DwarfInlineInfos.getFrame(Idx);
- Log << " [" << Idx << "]: " << dii.FunctionName << " @ "
- << dii.FileName << ':' << dii.Line << '\n';
- }
- Log << " " << LR->Locations.size() << " GSYM frames:\n";
- for (size_t Idx = 0, count = LR->Locations.size();
- Idx < count; ++Idx) {
- const auto &gii = LR->Locations[Idx];
- Log << " [" << Idx << "]: " << gii.Name << " @ " << gii.Dir
- << '/' << gii.Base << ':' << gii.Line << '\n';
- }
- DwarfInlineInfos = DICtx.getInliningInfoForAddress(SectAddr, DLIS);
- Gsym->dump(Log, *FI);
+ Out.Report(
+ "TODO: Greg what should this category be?", [&](raw_ostream &Log) {
+ Log << "error: address " << HEX64(Addr) << " has "
+ << NumDwarfInlineInfos << " DWARF inline frames and GSYM has "
+ << LR->Locations.size() << "\n";
+ Log << " " << NumDwarfInlineInfos << " DWARF frames:\n";
+ for (size_t Idx = 0; Idx < NumDwarfInlineInfos; ++Idx) {
+ const auto &dii = DwarfInlineInfos.getFrame(Idx);
+ Log << " [" << Idx << "]: " << dii.FunctionName << " @ "
+ << dii.FileName << ':' << dii.Line << '\n';
+ }
+ Log << " " << LR->Locations.size() << " GSYM frames:\n";
+ for (size_t Idx = 0, count = LR->Locations.size(); Idx < count;
+ ++Idx) {
+ const auto &gii = LR->Locations[Idx];
+ Log << " [" << Idx << "]: " << gii.Name << " @ " << gii.Dir
+ << '/' << gii.Base << ':' << gii.Line << '\n';
+ }
+ DwarfInlineInfos =
+ DICtx.getInliningInfoForAddress(SectAddr, DLIS);
+ Gsym->dump(Log, *FI);
+ });
----------------
clayborg wrote:
We could just leave this out of error aggregation all together as the --verify if for verifying that the DWARF actually matches the GSYM info and isn't needed for typical error aggregation. If we do want to do something is should be a different error aggregator.
https://github.com/llvm/llvm-project/pull/81154
More information about the llvm-commits
mailing list