Adrian Prantl | 3776c52 | 2017-09-11 23:05:20 +0000 | [diff] [blame] | 1 | RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-dwp.x86_64.o | FileCheck %s |
David Blaikie | 1040f99 | 2015-11-11 19:28:21 +0000 | [diff] [blame] | 2 | |
| 3 | ; Testing the following simple dwp file: |
| 4 | ; a.cpp: |
| 5 | ; struct foo { }; |
| 6 | ; foo a; |
| 7 | ; b.cpp: |
David Blaikie | ab8c64c | 2015-11-12 01:41:52 +0000 | [diff] [blame] | 8 | ; struct bar { }; |
David Blaikie | 7cd8652 | 2015-11-17 00:39:55 +0000 | [diff] [blame] | 9 | ; bar b() { |
| 10 | ; } |
| 11 | |
Adrian Prantl | 494372f | 2017-09-13 22:09:01 +0000 | [diff] [blame] | 12 | ; CHECK-NOT: .debug_info contents: |
David Blaikie | e6878eb | 2015-11-17 21:08:05 +0000 | [diff] [blame] | 13 | ; CHECK-LABEL: .debug_info.dwo contents: |
David Blaikie | 7cd8652 | 2015-11-17 00:39:55 +0000 | [diff] [blame] | 14 | ; CHECK: Compile Unit |
| 15 | |
| 16 | ; Verify that the second CU uses the index for its abbrev offset |
| 17 | ; CHECK: Compile Unit |
| 18 | ; CHECK-SAME: abbr_offset = 0x0043 |
| 19 | ; CHECK: DW_TAG_compile_unit |
| 20 | ; CHECK-NOT: DW_TAG |
David Blaikie | 6715b1e | 2015-11-17 22:39:23 +0000 | [diff] [blame] | 21 | ; CHECK: DW_AT_name {{.*}} "b.cpp" |
David Blaikie | 7cd8652 | 2015-11-17 00:39:55 +0000 | [diff] [blame] | 22 | |
| 23 | ; Verify that abbreviations are decoded using the abbrev offset in the index |
David Blaikie | 7cd8652 | 2015-11-17 00:39:55 +0000 | [diff] [blame] | 24 | ; CHECK: DW_TAG_structure_type |
David Blaikie | e6878eb | 2015-11-17 21:08:05 +0000 | [diff] [blame] | 25 | ; CHECK: DW_TAG_subprogram |
| 26 | |
| 27 | ; CHECK-LABEL: .debug_types.dwo contents: |
| 28 | ; CHECK: Type Unit |
| 29 | ; CHECK: DW_TAG_type_unit |
| 30 | ; CHECK: DW_AT_stmt_list {{.*}}(0x00000000) |
| 31 | ; CHECK: DW_TAG_structure_type |
| 32 | ; CHECK: DW_AT_decl_file {{.*}} ("a.cpp") |
| 33 | ; CHECK: Type Unit |
| 34 | ; CHECK: DW_TAG_type_unit |
| 35 | ; CHECK: DW_AT_stmt_list {{.*}}(0x00000000) |
| 36 | ; CHECK: DW_TAG_structure_type |
| 37 | ; CHECK: DW_AT_decl_file {{.*}} ("b.cpp") |
David Blaikie | 1040f99 | 2015-11-11 19:28:21 +0000 | [diff] [blame] | 38 | |
| 39 | ; CHECK: .debug_cu_index contents: |
David Blaikie | 6c42083 | 2015-11-13 19:18:49 +0000 | [diff] [blame] | 40 | ; CHECK-NEXT: version = 2 slots = 16 |
David Blaikie | 7cd8652 | 2015-11-17 00:39:55 +0000 | [diff] [blame] | 41 | ; CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS |
David Blaikie | 6c42083 | 2015-11-13 19:18:49 +0000 | [diff] [blame] | 42 | ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------ |
David Blaikie | d614812 | 2015-12-03 18:41:59 +0000 | [diff] [blame] | 43 | ; CHECK-NEXT: 3 0xfef104c25502f092 [0x0000002d, 0x0000005f) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024) |
| 44 | ; CHECK-NEXT: 9 0x03c30756e2d45008 [0x00000000, 0x0000002d) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010) |
David Blaikie | 1040f99 | 2015-11-11 19:28:21 +0000 | [diff] [blame] | 45 | |
David Blaikie | 8ad0ca8 | 2015-11-11 19:40:49 +0000 | [diff] [blame] | 46 | ; CHECK: .debug_tu_index contents: |
David Blaikie | 6c42083 | 2015-11-13 19:18:49 +0000 | [diff] [blame] | 47 | ; CHECK-NEXT: version = 2 slots = 16 |
| 48 | ; CHECK: Index Signature TYPES ABBREV LINE STR_OFFSETS |
| 49 | ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------ |
David Blaikie | d614812 | 2015-12-03 18:41:59 +0000 | [diff] [blame] | 50 | ; CHECK-NEXT: 9 0x1d02f3be30cc5688 [0x00000024, 0x00000048) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024) |
| 51 | ; CHECK-NEXT: 13 0x3875c0e21cda63fc [0x00000000, 0x00000024) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010) |
David Blaikie | 8ad0ca8 | 2015-11-11 19:40:49 +0000 | [diff] [blame] | 52 | |
David Blaikie | 7cd8652 | 2015-11-17 00:39:55 +0000 | [diff] [blame] | 53 | ; TODO: use the index section offset info to correctly dump strings in debug info |
| 54 | ; TODO: use the index section offset info to correctly dump file names in debug info |