1# RUN: yaml2obj %s -o %t.out 2# RUN: lldb-test symbols %t.out | FileCheck %s 3# Test that the deployment target is parsed from the load commands. 4# CHECK: x86_64-apple-macosx10.14.0 5--- !mach-o 6FileHeader: 7 magic: 0xFEEDFACF 8 cputype: 0x01000007 9 cpusubtype: 0x80000003 10 filetype: 0x00000002 11 ncmds: 14 12 sizeofcmds: 738 13 flags: 0x00200085 14 reserved: 0x00000000 15LoadCommands: 16 - cmd: LC_SEGMENT_64 17 cmdsize: 72 18 segname: __PAGEZERO 19 vmaddr: 0 20 vmsize: 4294967296 21 fileoff: 0 22 filesize: 0 23 maxprot: 0 24 initprot: 0 25 nsects: 0 26 flags: 0 27 - cmd: LC_SEGMENT_64 28 cmdsize: 232 29 segname: __TEXT 30 vmaddr: 4294967296 31 vmsize: 4096 32 fileoff: 0 33 filesize: 4096 34 maxprot: 7 35 initprot: 5 36 nsects: 2 37 flags: 0 38 Sections: 39 - sectname: __text 40 segname: __TEXT 41 addr: 0x0000000100000FB0 42 size: 8 43 offset: 0x00000FB0 44 align: 4 45 reloff: 0x00000000 46 nreloc: 0 47 flags: 0x80000400 48 reserved1: 0x00000000 49 reserved2: 0x00000000 50 reserved3: 0x00000000 51 - sectname: __unwind_info 52 segname: __TEXT 53 addr: 0x0000000100000FB8 54 size: 72 55 offset: 0x00000FB8 56 align: 2 57 reloff: 0x00000000 58 nreloc: 0 59 flags: 0x00000000 60 reserved1: 0x00000000 61 reserved2: 0x00000000 62 reserved3: 0x00000000 63 - cmd: LC_SEGMENT_64 64 cmdsize: 72 65 segname: __LINKEDIT 66 vmaddr: 4294971392 67 vmsize: 4096 68 fileoff: 4096 69 filesize: 152 70 maxprot: 7 71 initprot: 1 72 nsects: 0 73 flags: 0 74 - cmd: LC_DYLD_INFO_ONLY 75 cmdsize: 48 76 rebase_off: 0 77 rebase_size: 0 78 bind_off: 0 79 bind_size: 0 80 weak_bind_off: 0 81 weak_bind_size: 0 82 lazy_bind_off: 0 83 lazy_bind_size: 0 84 export_off: 4096 85 export_size: 48 86 - cmd: LC_SYMTAB 87 cmdsize: 24 88 symoff: 4152 89 nsyms: 3 90 stroff: 4200 91 strsize: 48 92 - cmd: LC_DYSYMTAB 93 cmdsize: 80 94 ilocalsym: 0 95 nlocalsym: 0 96 iextdefsym: 0 97 nextdefsym: 2 98 iundefsym: 2 99 nundefsym: 1 100 tocoff: 0 101 ntoc: 0 102 modtaboff: 0 103 nmodtab: 0 104 extrefsymoff: 0 105 nextrefsyms: 0 106 indirectsymoff: 0 107 nindirectsyms: 0 108 extreloff: 0 109 nextrel: 0 110 locreloff: 0 111 nlocrel: 0 112 - cmd: LC_LOAD_DYLINKER 113 cmdsize: 32 114 name: 12 115 PayloadString: /usr/lib/dyld 116 ZeroPadBytes: 7 117 - cmd: LC_UUID 118 cmdsize: 24 119 uuid: 8F41E140-23B9-3720-AC28-4E7AF9D159BA 120 - cmd: LC_BUILD_VERSION 121 cmdsize: 24 122 platform: 1 123 minos: 658944 124 sdk: 658944 125 ntools: 0 126 - cmd: LC_SOURCE_VERSION 127 cmdsize: 16 128 version: 0 129 - cmd: LC_MAIN 130 cmdsize: 24 131 entryoff: 4016 132 stacksize: 0 133 - cmd: LC_LOAD_DYLIB 134 cmdsize: 56 135 dylib: 136 name: 24 137 timestamp: 2 138 current_version: 82102276 139 compatibility_version: 65536 140 PayloadString: /usr/lib/libSystem.B.dylib 141 ZeroPadBytes: 6 142 - cmd: LC_FUNCTION_STARTS 143 cmdsize: 16 144 dataoff: 4144 145 datasize: 8 146 - cmd: LC_DATA_IN_CODE 147 cmdsize: 16 148 dataoff: 4152 149 datasize: 0 150LinkEditData: 151 ExportTrie: 152 TerminalSize: 0 153 NodeOffset: 0 154 Name: '' 155 Flags: 0x0000000000000000 156 Address: 0x0000000000000000 157 Other: 0x0000000000000000 158 ImportName: '' 159 Children: 160 - TerminalSize: 0 161 NodeOffset: 5 162 Name: _ 163 Flags: 0x0000000000000000 164 Address: 0x0000000000000000 165 Other: 0x0000000000000000 166 ImportName: '' 167 Children: 168 - TerminalSize: 2 169 NodeOffset: 33 170 Name: _mh_execute_header 171 Flags: 0x0000000000000000 172 Address: 0x0000000000000000 173 Other: 0x0000000000000000 174 ImportName: '' 175 - TerminalSize: 3 176 NodeOffset: 37 177 Name: main 178 Flags: 0x0000000000000000 179 Address: 0x0000000000000FB0 180 Other: 0x0000000000000000 181 ImportName: '' 182 NameList: 183 - n_strx: 2 184 n_type: 0x0F 185 n_sect: 1 186 n_desc: 16 187 n_value: 4294967296 188 - n_strx: 22 189 n_type: 0x0F 190 n_sect: 1 191 n_desc: 0 192 n_value: 4294971312 193 - n_strx: 28 194 n_type: 0x01 195 n_sect: 0 196 n_desc: 256 197 n_value: 0 198 StringTable: 199 - ' ' 200 - __mh_execute_header 201 - _main 202 - dyld_stub_binder 203 - '' 204 - '' 205 - '' 206... 207