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