File tree 4 files changed +27
-0
lines changed
include/llvm/DebugInfo/DWARF
4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,11 @@ class DWARFContext : public DIContext {
189
189
DWOUnits.begin () + DWOUnits.getNumInfoUnits ());
190
190
}
191
191
192
+ const DWARFUnitVector &getDWOUnitsVector () {
193
+ parseDWOUnits ();
194
+ return DWOUnits;
195
+ }
196
+
192
197
// / Get units from .debug_types.dwo in the DWO context.
193
198
unit_iterator_range dwo_types_section_units () {
194
199
parseDWOUnits ();
Original file line number Diff line number Diff line change @@ -390,6 +390,9 @@ bool DWARFVerifier::handleDebugInfo() {
390
390
391
391
OS << " Verifying non-dwo Units...\n " ;
392
392
NumErrors += verifyUnits (DCtx.getNormalUnitsVector ());
393
+
394
+ OS << " Verifying dwo Units...\n " ;
395
+ NumErrors += verifyUnits (DCtx.getDWOUnitsVector ());
393
396
return NumErrors == 0 ;
394
397
}
395
398
Original file line number Diff line number Diff line change 8
8
# CHECK-NEXT: warning: DW_TAG_skeleton_unit has DW_CHILDREN_yes but DIE has no children
9
9
# CHECK-NEXT: DW_TAG_skeleton_unit
10
10
# CHECK-NEXT: error: Skeleton compilation unit has children.
11
+ # CHECK-NEXT: Verifying dwo Units...
11
12
# CHECK-NEXT: Errors detected.
12
13
13
14
.section .debug_abbrev,"",@progbits
Original file line number Diff line number Diff line change
1
+ # RUN: llvm-mc %s -filetype obj -triple x86_64-linux-gnu -o - \
2
+ # RUN: | not llvm-dwarfdump -v -verify - \
3
+ # RUN: | FileCheck %s --implicit-check-not=error --implicit-check-not=warning
4
+
5
+ # CHECK: Verifying dwo Units...
6
+ # CHECK: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
7
+ # CHECK: error: Compilation unit type (DW_UT_split_compile) and root DIE (DW_TAG_null) do not match.
8
+ # CHECK: Errors detected
9
+ .section .debug_info.dwo,"e" ,@progbits
10
+ .long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
11
+ .Ldebug_info_dwo_start1:
12
+ .short 5 # DWARF version number
13
+ .byte 5 # DWARF Unit Type
14
+ .byte 8 # Address Size (in bytes)
15
+ .long 0 # Offset Into Abbrev. Section
16
+ .quad 5527374834836270265
17
+ .byte 0 # End Of Children Mark
18
+ .Ldebug_info_dwo_end1:
You can’t perform that action at this time.
0 commit comments