• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: object-emission
2# RUN: rm -rf %t
3# RUN: mkdir -p %t
4# RUN: llc -filetype=obj %p/../Inputs/frame-dw2.ll -o %t/frame-dw2.o
5# RUN: llc -filetype=obj %p/../Inputs/frame-dw4.ll -o %t/frame-dw4.o
6# RUN: llvm-dsymutil -f -oso-prepend-path=%t -y %s -o - | llvm-dwarfdump -debug-dump=frames - | FileCheck %s
7
8# Check the handling of multiple different CIEs. To have CIEs that
9# appear to be different, use a dwarf2 version of the file along with
10# a dwarf 4 version. The CIE header version (and layout) will be different.
11# FIXME: this test also checks that we didn't reuse the first CIE when it
12# appears again. This is a behavior we inherited from dsymutil-classic
13# but this should be fixed (see comment in patchFrameInfoForObject())
14---
15triple:          'i386-apple-darwin'
16objects:
17  - filename: frame-dw2.o
18    symbols:
19      - { sym: _bar, objAddr: 0x0, binAddr: 0x1000, size: 0x12 }
20      - { sym: _baz, objAddr: 0x0, binAddr: 0x2000, size: 0x12 }
21  - filename: frame-dw4.o
22    symbols:
23      - { sym: _baz, objAddr: 0x0, binAddr: 0x3000, size: 0x12 }
24  - filename: frame-dw2.o
25    symbols:
26      - { sym: _bar, objAddr: 0x0, binAddr: 0x4000, size: 0x12 }
27...
28
29# CHECK: .debug_frame contents:
30# CHECK: 00000000 {{[0-9a-f]*}} ffffffff CIE
31# CHECK-NEXT: Version:{{.*}}1
32# CHECK-NOT: FDE
33# CHECK:  FDE cie=00000000 pc=00001000...00001
34# CHECK-NOT: FDE
35# CHECK:  FDE cie=00000000 pc=00002000...00002
36# CHECK-NOT: FDE
37# CHECK: [[CIEDW4:[0-9a-f]*]] 00000010 ffffffff CIE
38# CHECK-NEXT: Version:{{.*}}4
39# CHECK-NOT: FDE
40# CHECK:  FDE cie=[[CIEDW4]] pc=00003000...00003
41# CHECK-NOT: FDE
42# CHECK: [[CIEDW2:[0-9a-f]*]] {{[0-9a-f]*}} ffffffff CIE
43# CHECK-NEXT: Version:{{.*}}1
44# CHECK-NOT: FDE
45# CHECK:  FDE cie=[[CIEDW2]] pc=00004000...00004
46# CHECK-NOT: FDE
47
48