DWARFVerifier: Print the CU name and CU count to help visualize progress
This commit is contained in:
@@ -322,12 +322,17 @@ unsigned DWARFVerifier::verifyUnits(const DWARFUnitVector &Units) {
|
||||
unsigned NumDebugInfoErrors = 0;
|
||||
ReferenceMap CrossUnitReferences;
|
||||
|
||||
unsigned int Index = 0;
|
||||
for (const auto &Unit : Units) {
|
||||
ReferenceMap UnitLocalReferences;
|
||||
NumDebugInfoErrors +=
|
||||
verifyUnitContents(*Unit, UnitLocalReferences, CrossUnitReferences);
|
||||
NumDebugInfoErrors += verifyDebugInfoReferences(
|
||||
UnitLocalReferences, [&](uint64_t Offset) { return Unit.get(); });
|
||||
OS << "Verifying unit: " << Index << " / " << Units.getNumUnits() << '\n';
|
||||
OS << "Unit Name: " << Unit->getUnitDIE(true).getShortName() << '\n';
|
||||
OS.flush();
|
||||
ReferenceMap UnitLocalReferences;
|
||||
NumDebugInfoErrors +=
|
||||
verifyUnitContents(*Unit, UnitLocalReferences, CrossUnitReferences);
|
||||
NumDebugInfoErrors += verifyDebugInfoReferences(
|
||||
UnitLocalReferences, [&](uint64_t Offset) { return Unit.get(); });
|
||||
++Index;
|
||||
}
|
||||
|
||||
NumDebugInfoErrors += verifyDebugInfoReferences(
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
# CHECK-NEXT: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: Verifying .debug_types Unit Header Chain...
|
||||
# CHECK-NEXT: Verifying non-dwo Units...
|
||||
# CHECK-NEXT: Verifying unit: 0 / 2
|
||||
# CHECK-NEXT: Unit Name: test.cpp
|
||||
# CHECK-NEXT: Verifying unit: 1 / 2
|
||||
# CHECK-NEXT: Unit Name:
|
||||
# CHECK-NEXT: warning: DW_TAG_skeleton_unit has DW_CHILDREN_yes but DIE has no children
|
||||
# CHECK-NEXT: DW_TAG_skeleton_unit
|
||||
# CHECK-NEXT: error: Skeleton compilation unit has children.
|
||||
@@ -15,6 +19,8 @@
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 8 # DW_FORM_string
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
@@ -34,6 +40,7 @@
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad -6573227469967412476
|
||||
.byte 1 # Abbrev [1]
|
||||
.asciz "test.cpp"
|
||||
.byte 0
|
||||
.Lcu_end0:
|
||||
.long .Lcu_end1-.Lcu_start1 # Length of Unit
|
||||
|
||||
Reference in New Issue
Block a user