2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-dwp.x86_64.o | FileCheck %s
|
2015-11-12 03:28:21 +08:00
|
|
|
|
|
|
|
; Testing the following simple dwp file:
|
|
|
|
; a.cpp:
|
|
|
|
; struct foo { };
|
|
|
|
; foo a;
|
|
|
|
; b.cpp:
|
2015-11-12 09:41:52 +08:00
|
|
|
; struct bar { };
|
2015-11-17 08:39:55 +08:00
|
|
|
; bar b() {
|
|
|
|
; }
|
|
|
|
|
2017-09-14 06:09:01 +08:00
|
|
|
; CHECK-NOT: .debug_info contents:
|
2015-11-18 05:08:05 +08:00
|
|
|
; CHECK-LABEL: .debug_info.dwo contents:
|
2015-11-17 08:39:55 +08:00
|
|
|
; CHECK: Compile Unit
|
|
|
|
|
|
|
|
; Verify that the second CU uses the index for its abbrev offset
|
|
|
|
; CHECK: Compile Unit
|
|
|
|
; CHECK-SAME: abbr_offset = 0x0043
|
|
|
|
; CHECK: DW_TAG_compile_unit
|
|
|
|
; CHECK-NOT: DW_TAG
|
2015-11-18 06:39:23 +08:00
|
|
|
; CHECK: DW_AT_name {{.*}} "b.cpp"
|
2015-11-17 08:39:55 +08:00
|
|
|
|
|
|
|
; Verify that abbreviations are decoded using the abbrev offset in the index
|
|
|
|
; CHECK: DW_TAG_structure_type
|
2015-11-18 05:08:05 +08:00
|
|
|
; CHECK: DW_TAG_subprogram
|
|
|
|
|
|
|
|
; CHECK-LABEL: .debug_types.dwo contents:
|
|
|
|
; CHECK: Type Unit
|
|
|
|
; CHECK: DW_TAG_type_unit
|
|
|
|
; CHECK: DW_AT_stmt_list {{.*}}(0x00000000)
|
|
|
|
; CHECK: DW_TAG_structure_type
|
|
|
|
; CHECK: DW_AT_decl_file {{.*}} ("a.cpp")
|
|
|
|
; CHECK: Type Unit
|
|
|
|
; CHECK: DW_TAG_type_unit
|
|
|
|
; CHECK: DW_AT_stmt_list {{.*}}(0x00000000)
|
|
|
|
; CHECK: DW_TAG_structure_type
|
|
|
|
; CHECK: DW_AT_decl_file {{.*}} ("b.cpp")
|
2015-11-12 03:28:21 +08:00
|
|
|
|
|
|
|
; CHECK: .debug_cu_index contents:
|
2020-06-13 03:39:08 +08:00
|
|
|
; CHECK-NEXT: version = 2, units = 2, slots = 16
|
2015-11-17 08:39:55 +08:00
|
|
|
; CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS
|
2015-11-14 03:18:49 +08:00
|
|
|
; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------
|
2015-12-04 02:41:59 +08:00
|
|
|
; CHECK-NEXT: 3 0xfef104c25502f092 [0x0000002d, 0x0000005f) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
|
|
|
|
; CHECK-NEXT: 9 0x03c30756e2d45008 [0x00000000, 0x0000002d) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
|
2015-11-12 03:40:49 +08:00
|
|
|
|
|
|
|
; CHECK: .debug_tu_index contents:
|
2020-06-13 03:39:08 +08:00
|
|
|
; CHECK-NEXT: version = 2, units = 2, slots = 16
|
2015-11-14 03:18:49 +08:00
|
|
|
; CHECK: Index Signature TYPES ABBREV LINE STR_OFFSETS
|
|
|
|
; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------
|
2015-12-04 02:41:59 +08:00
|
|
|
; CHECK-NEXT: 9 0x1d02f3be30cc5688 [0x00000024, 0x00000048) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
|
|
|
|
; CHECK-NEXT: 13 0x3875c0e21cda63fc [0x00000000, 0x00000024) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
|
2015-11-12 03:28:21 +08:00
|
|
|
|
2015-11-17 08:39:55 +08:00
|
|
|
; TODO: use the index section offset info to correctly dump strings in debug info
|
|
|
|
; TODO: use the index section offset info to correctly dump file names in debug info
|