1 RUN: llvm-dwarfdump %p/Inputs/dwarfdump-dwp.x86_64.o | FileCheck %s
3 ; Testing the following simple dwp file:
12 ; CHECK-LABEL: .debug_info.dwo contents:
15 ; Verify that the second CU uses the index for its abbrev offset
17 ; CHECK-SAME: abbr_offset = 0x0043
18 ; CHECK: DW_TAG_compile_unit
20 ; CHECK: DW_AT_name {{.*}} "b.cpp"
22 ; Verify that abbreviations are decoded using the abbrev offset in the index
23 ; CHECK: DW_TAG_structure_type
24 ; CHECK: DW_TAG_subprogram
26 ; CHECK-LABEL: .debug_types.dwo contents:
28 ; CHECK: DW_TAG_type_unit
29 ; CHECK: DW_AT_stmt_list {{.*}}(0x00000000)
30 ; CHECK: DW_TAG_structure_type
31 ; CHECK: DW_AT_decl_file {{.*}} ("a.cpp")
33 ; CHECK: DW_TAG_type_unit
34 ; CHECK: DW_AT_stmt_list {{.*}}(0x00000000)
35 ; CHECK: DW_TAG_structure_type
36 ; CHECK: DW_AT_decl_file {{.*}} ("b.cpp")
38 ; CHECK: .debug_cu_index contents:
39 ; CHECK-NEXT: version = 2 slots = 16
40 ; CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS
41 ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------
42 ; CHECK-NEXT: 3 0xfef104c25502f092 [0x0000002d, 0x0000005f) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
43 ; CHECK-NEXT: 9 0x03c30756e2d45008 [0x00000000, 0x0000002d) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
45 ; CHECK: .debug_tu_index contents:
46 ; CHECK-NEXT: version = 2 slots = 16
47 ; CHECK: Index Signature TYPES ABBREV LINE STR_OFFSETS
48 ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------
49 ; CHECK-NEXT: 9 0x1d02f3be30cc5688 [0x00000024, 0x00000048) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
50 ; CHECK-NEXT: 13 0x3875c0e21cda63fc [0x00000000, 0x00000024) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
52 ; TODO: use the index section offset info to correctly dump strings in debug info
53 ; TODO: use the index section offset info to correctly dump file names in debug info