• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This test checks that the unwind data is dumped by llvm-objdump.
2// RUN: llvm-objdump -u %p/Inputs/win64-unwind.exe.coff-x86_64.obj \
3// RUN:   | FileCheck -check-prefix=OBJ %s
4// RUN: llvm-objdump -u %p/Inputs/win64-unwind.exe.coff-x86_64.exe \
5// RUN:   | FileCheck -check-prefix=EXE %s
6
7OBJ:      Unwind info:
8OBJ:      Function Table:
9OBJ-NEXT:   Start Address: func
10OBJ-NEXT:   End Address: func + 0x001b
11OBJ-NEXT:   Unwind Info Address: .xdata
12OBJ-NEXT:     Version: 1
13OBJ-NEXT:     Flags: 1 UNW_ExceptionHandler
14OBJ-NEXT:     Size of prolog: 18
15OBJ-NEXT:     Number of Codes: 8
16OBJ-NEXT:     Frame register: RBX
17OBJ-NEXT:     Frame offset: 0
18OBJ-NEXT:     Unwind Codes:
19OBJ-NEXT:       0x12: UOP_SetFPReg
20OBJ-NEXT:       0x0f: UOP_PushNonVol RBX
21OBJ-NEXT:       0x0e: UOP_SaveXMM128 XMM8 [0x0000]
22OBJ-NEXT:       0x09: UOP_SaveNonVol RSI [0x0010]
23OBJ-NEXT:       0x04: UOP_AllocSmall 24
24OBJ-NEXT:       0x00: UOP_PushMachFrame w/o error code
25OBJ:      Function Table:
26OBJ-NEXT:   Start Address: func + 0x0012
27OBJ-NEXT:   End Address: func + 0x0012
28OBJ-NEXT:   Unwind Info Address: .xdata + 0x001c
29OBJ-NEXT:     Version: 1
30OBJ-NEXT:     Flags: 4 UNW_ChainInfo
31OBJ-NEXT:     Size of prolog: 0
32OBJ-NEXT:     Number of Codes: 0
33OBJ-NEXT:     No frame pointer used
34OBJ:      Function Table:
35OBJ-NEXT:   Start Address: smallFunc
36OBJ-NEXT:   End Address: smallFunc + 0x0001
37OBJ-NEXT:   Unwind Info Address: .xdata + 0x002c
38OBJ-NEXT:     Version: 1
39OBJ-NEXT:     Flags: 0
40OBJ-NEXT:     Size of prolog: 0
41OBJ-NEXT:     Number of Codes: 0
42OBJ-NEXT:     No frame pointer used
43OBJ:      Function Table:
44OBJ-NEXT:   Start Address: allocFunc
45OBJ-NEXT:   End Address: allocFunc + 0x001d
46OBJ-NEXT:   Unwind Info Address: .xdata + 0x0034
47OBJ-NEXT:     Version: 1
48OBJ-NEXT:     Flags: 0
49OBJ-NEXT:     Size of prolog: 14
50OBJ-NEXT:     Number of Codes: 6
51OBJ-NEXT:     No frame pointer used
52OBJ-NEXT:     Unwind Codes:
53OBJ-NEXT:       0x0e: UOP_AllocLarge 8454128
54OBJ-NEXT:       0x07: UOP_AllocLarge 8190
55OBJ-NEXT:       0x00: UOP_PushMachFrame w/o error code
56
57EXE:      Function Table:
58EXE-NEXT:   Start Address: 0x1000
59EXE-NEXT:   End Address: 0x101b
60EXE-NEXT:   Unwind Info Address: 0x2000
61EXE-NEXT:     Version: 1
62EXE-NEXT:     Flags: 1 UNW_ExceptionHandler
63EXE-NEXT:     Size of prolog: 18
64EXE-NEXT:     Number of Codes: 8
65EXE-NEXT:     Frame register: RBX
66EXE-NEXT:     Frame offset: 0
67EXE-NEXT:     Unwind Codes:
68EXE-NEXT:       0x12: UOP_SetFPReg
69EXE-NEXT:       0x0f: UOP_PushNonVol RBX
70EXE-NEXT:       0x0e: UOP_SaveXMM128 XMM8 [0x0000]
71EXE-NEXT:       0x09: UOP_SaveNonVol RSI [0x0010]
72EXE-NEXT:       0x04: UOP_AllocSmall 24
73EXE-NEXT:       0x00: UOP_PushMachFrame w/o error code
74
75EXE:      Function Table:
76EXE-NEXT:   Start Address: 0x1012
77EXE-NEXT:   End Address: 0x1012
78EXE-NEXT:   Unwind Info Address: 0x201c
79EXE-NEXT:     Version: 1
80EXE-NEXT:     Flags: 4 UNW_ChainInfo
81EXE-NEXT:     Size of prolog: 0
82EXE-NEXT:     Number of Codes: 0
83EXE-NEXT:     No frame pointer used
84
85EXE:      Function Table:
86EXE-NEXT:   Start Address: 0x101b
87EXE-NEXT:   End Address: 0x101c
88EXE-NEXT:   Unwind Info Address: 0x202c
89EXE-NEXT:     Version: 1
90EXE-NEXT:     Flags: 0
91EXE-NEXT:     Size of prolog: 0
92EXE-NEXT:     Number of Codes: 0
93EXE-NEXT:     No frame pointer used
94
95EXE:      Function Table:
96EXE-NEXT:   Start Address: 0x101c
97EXE-NEXT:   End Address: 0x1039
98EXE-NEXT:   Unwind Info Address: 0x2034
99EXE-NEXT:     Version: 1
100EXE-NEXT:     Flags: 0
101EXE-NEXT:     Size of prolog: 14
102EXE-NEXT:     Number of Codes: 6
103EXE-NEXT:     No frame pointer used
104EXE-NEXT:     Unwind Codes:
105EXE-NEXT:       0x0e: UOP_AllocLarge 8454128
106EXE-NEXT:       0x07: UOP_AllocLarge 8190
107EXE-NEXT:       0x00: UOP_PushMachFrame w/o error code
108