summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-dwp/X86/simple.test
blob: 3c9795fbb9342cbcd73cbec3ed158b352d5aa883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
RUN: llvm-dwp %p/../Inputs/simple/a.dwo %p/../Inputs/simple/b.dwo -o %t
RUN: llvm-dwarfdump %t | FileCheck %s

FIXME: For some reason, piping straight from llvm-dwp to llvm-dwarfdump doesn't behave well - looks like dwarfdump is reading/closes before dwp has finished.

DWP from non-type-unit debug info for these two translation units:
a.cpp:
  struct foo { };
  foo a;

b.cpp:
  struct bar { };
  void b(bar) {
  }

CHECK: .debug_abbrev.dwo contents:
CHECK: Abbrev table for offset: 0x00000000
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_variable
CHECK: DW_TAG_structure_type
CHECK: Abbrev table for offset: 0x00000031
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_structure_type
CHECK: DW_TAG_subprogram
CHECK: DW_TAG_formal_parameter

CHECK: .debug_info.dwo contents:
CHECK: 0x00000000: Compile Unit: length = 0x00000025 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000029)
CHECK: DW_TAG_compile_unit
CHECK:   DW_AT_name {{.*}} "a.cpp"
CHECK:   DW_AT_GNU_dwo_id {{.*}} ([[DWOA:.*]])
CHECK:   DW_TAG_variable
CHECK:     DW_AT_name {{.*}} "a"
CHECK:   DW_TAG_structure_type
CHECK:     DW_AT_name {{.*}} "foo"

CHECK: 0x00000029: Compile Unit: length = 0x00000031 version = 0x0004 abbr_offset = 0x0031 addr_size = 0x08 (next unit at 0x0000005e)
CHECK:   DW_AT_name {{.*}} "b.cpp"
CHECK:   DW_AT_GNU_dwo_id {{.*}} ([[DWOB:.*]])
CHECK:   DW_TAG_structure_type
CHECK:     DW_AT_name {{.*}} "bar"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "b"
CHECK:     DW_TAG_formal_parameter

CHECK: .debug_cu_index contents:
Ensure only the relevant/contained sections are included in the table:
CHECK: Index Signature          INFO                     ABBREV                   LINE                     STR_OFFSETS
Don't bother checking the Signatures, they aren't correct yet.
CHECK:     1 [[DWOA]]           [0x00000000, 0x00000029) [0x00000000, 0x00000031) [0x00000000, 0x00000011) [0x00000000, 0x00000010)
CHECK:     2 [[DWOB]]           [0x00000029, 0x0000005e) [0x00000031, 0x00000075) [0x00000011, 0x00000022) [0x00000010, 0x00000024)

CHECK: .debug_str.dwo contents:
CHECK: "clang version
CHECK: 0x[[ACPP:.*]]: "a.cpp"
CHECK-NOT: "clang version
CHECK: 0x[[BCPP:.*]]: "b.cpp"

CHECK: .debug_str_offsets.dwo contents:
CHECK: : 00000000
CHECK: : [[ACPP]]
CHECK: : 00000000
CHECK: : [[BCPP]]
OpenPOWER on IntegriCloud