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