Lines Matching full:io
75 IO &IO, MachOYAML::FileHeader &FileHdr) { in mapping() argument
76 IO.mapRequired("magic", FileHdr.magic); in mapping()
77 IO.mapRequired("cputype", FileHdr.cputype); in mapping()
78 IO.mapRequired("cpusubtype", FileHdr.cpusubtype); in mapping()
79 IO.mapRequired("filetype", FileHdr.filetype); in mapping()
80 IO.mapRequired("ncmds", FileHdr.ncmds); in mapping()
81 IO.mapRequired("sizeofcmds", FileHdr.sizeofcmds); in mapping()
82 IO.mapRequired("flags", FileHdr.flags); in mapping()
85 IO.mapRequired("reserved", FileHdr.reserved); in mapping()
88 void MappingTraits<MachOYAML::Object>::mapping(IO &IO, in mapping() argument
92 if (!IO.getContext()) { in mapping()
93 IO.setContext(&Object); in mapping()
95 IO.mapTag("!mach-o", true); in mapping()
96 IO.mapRequired("FileHeader", Object.Header); in mapping()
97 IO.mapOptional("LoadCommands", Object.LoadCommands); in mapping()
98 IO.mapOptional("LinkEditData", Object.LinkEdit); in mapping()
100 if (IO.getContext() == &Object) in mapping()
101 IO.setContext(nullptr); in mapping()
105 IO &IO, MachOYAML::FatHeader &FatHeader) { in mapping() argument
106 IO.mapRequired("magic", FatHeader.magic); in mapping()
107 IO.mapRequired("nfat_arch", FatHeader.nfat_arch); in mapping()
110 void MappingTraits<MachOYAML::FatArch>::mapping(IO &IO, in mapping() argument
112 IO.mapRequired("cputype", FatArch.cputype); in mapping()
113 IO.mapRequired("cpusubtype", FatArch.cpusubtype); in mapping()
114 IO.mapRequired("offset", FatArch.offset); in mapping()
115 IO.mapRequired("size", FatArch.size); in mapping()
116 IO.mapRequired("align", FatArch.align); in mapping()
117 IO.mapOptional("reserved", FatArch.reserved, in mapping()
122 IO &IO, MachOYAML::UniversalBinary &UniversalBinary) { in mapping() argument
123 if (!IO.getContext()) { in mapping()
124 IO.setContext(&UniversalBinary); in mapping()
125 IO.mapTag("!fat-mach-o", true); in mapping()
127 IO.mapRequired("FatHeader", UniversalBinary.Header); in mapping()
128 IO.mapRequired("FatArchs", UniversalBinary.FatArchs); in mapping()
129 IO.mapRequired("Slices", UniversalBinary.Slices); in mapping()
131 if (IO.getContext() == &UniversalBinary) in mapping()
132 IO.setContext(nullptr); in mapping()
136 IO &IO, MachOYAML::LinkEditData &LinkEditData) { in mapping() argument
137 IO.mapOptional("RebaseOpcodes", LinkEditData.RebaseOpcodes); in mapping()
138 IO.mapOptional("BindOpcodes", LinkEditData.BindOpcodes); in mapping()
139 IO.mapOptional("WeakBindOpcodes", LinkEditData.WeakBindOpcodes); in mapping()
140 IO.mapOptional("LazyBindOpcodes", LinkEditData.LazyBindOpcodes); in mapping()
141 IO.mapOptional("ExportTrie", LinkEditData.ExportTrie); in mapping()
142 IO.mapOptional("NameList", LinkEditData.NameList); in mapping()
143 IO.mapOptional("StringTable", LinkEditData.StringTable); in mapping()
147 IO &IO, MachOYAML::RebaseOpcode &RebaseOpcode) { in mapping() argument
148 IO.mapRequired("Opcode", RebaseOpcode.Opcode); in mapping()
149 IO.mapRequired("Imm", RebaseOpcode.Imm); in mapping()
150 IO.mapOptional("ExtraData", RebaseOpcode.ExtraData); in mapping()
154 IO &IO, MachOYAML::BindOpcode &BindOpcode) { in mapping() argument
155 IO.mapRequired("Opcode", BindOpcode.Opcode); in mapping()
156 IO.mapRequired("Imm", BindOpcode.Imm); in mapping()
157 IO.mapOptional("ULEBExtraData", BindOpcode.ULEBExtraData); in mapping()
158 IO.mapOptional("SLEBExtraData", BindOpcode.SLEBExtraData); in mapping()
159 IO.mapOptional("Symbol", BindOpcode.Symbol); in mapping()
163 IO &IO, MachOYAML::ExportEntry &ExportEntry) { in mapping() argument
164 IO.mapRequired("TerminalSize", ExportEntry.TerminalSize); in mapping()
165 IO.mapOptional("NodeOffset", ExportEntry.NodeOffset); in mapping()
166 IO.mapOptional("Name", ExportEntry.Name); in mapping()
167 IO.mapOptional("Flags", ExportEntry.Flags); in mapping()
168 IO.mapOptional("Address", ExportEntry.Address); in mapping()
169 IO.mapOptional("Other", ExportEntry.Other); in mapping()
170 IO.mapOptional("ImportName", ExportEntry.ImportName); in mapping()
171 IO.mapOptional("Children", ExportEntry.Children); in mapping()
175 IO &IO, MachOYAML::NListEntry &NListEntry) { in mapping() argument
176 IO.mapRequired("n_strx", NListEntry.n_strx); in mapping()
177 IO.mapRequired("n_type", NListEntry.n_type); in mapping()
178 IO.mapRequired("n_sect", NListEntry.n_sect); in mapping()
179 IO.mapRequired("n_desc", NListEntry.n_desc); in mapping()
180 IO.mapRequired("n_value", NListEntry.n_value); in mapping()
184 void mapLoadCommandData(IO &IO, MachOYAML::LoadCommand &LoadCommand) {} in mapLoadCommandData() argument
188 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
189 IO.mapOptional("Sections", LoadCommand.Sections); in mapLoadCommandData()
194 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
195 IO.mapOptional("Sections", LoadCommand.Sections); in mapLoadCommandData()
200 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
201 IO.mapOptional("PayloadString", LoadCommand.PayloadString); in mapLoadCommandData()
206 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
207 IO.mapOptional("PayloadString", LoadCommand.PayloadString); in mapLoadCommandData()
212 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
213 IO.mapOptional("PayloadString", LoadCommand.PayloadString); in mapLoadCommandData()
217 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapping() argument
220 IO.mapRequired("cmd", TempCmd); in mapping()
222 IO.mapRequired("cmdsize", LoadCommand.Data.load_command_data.cmdsize); in mapping()
226 MappingTraits<MachO::LCStruct>::mapping(IO, \ in mapping()
228 mapLoadCommandData<MachO::LCStruct>(IO, LoadCommand); \ in mapping()
234 IO.mapOptional("PayloadBytes", LoadCommand.PayloadBytes); in mapping()
235 IO.mapOptional("ZeroPadBytes", LoadCommand.ZeroPadBytes, (uint64_t)0ull); in mapping()
239 IO &IO, MachO::dyld_info_command &LoadCommand) { in mapping() argument
240 IO.mapRequired("rebase_off", LoadCommand.rebase_off); in mapping()
241 IO.mapRequired("rebase_size", LoadCommand.rebase_size); in mapping()
242 IO.mapRequired("bind_off", LoadCommand.bind_off); in mapping()
243 IO.mapRequired("bind_size", LoadCommand.bind_size); in mapping()
244 IO.mapRequired("weak_bind_off", LoadCommand.weak_bind_off); in mapping()
245 IO.mapRequired("weak_bind_size", LoadCommand.weak_bind_size); in mapping()
246 IO.mapRequired("lazy_bind_off", LoadCommand.lazy_bind_off); in mapping()
247 IO.mapRequired("lazy_bind_size", LoadCommand.lazy_bind_size); in mapping()
248 IO.mapRequired("export_off", LoadCommand.export_off); in mapping()
249 IO.mapRequired("export_size", LoadCommand.export_size); in mapping()
252 void MappingTraits<MachOYAML::Section>::mapping(IO &IO, in mapping() argument
254 IO.mapRequired("sectname", Section.sectname); in mapping()
255 IO.mapRequired("segname", Section.segname); in mapping()
256 IO.mapRequired("addr", Section.addr); in mapping()
257 IO.mapRequired("size", Section.size); in mapping()
258 IO.mapRequired("offset", Section.offset); in mapping()
259 IO.mapRequired("align", Section.align); in mapping()
260 IO.mapRequired("reloff", Section.reloff); in mapping()
261 IO.mapRequired("nreloc", Section.nreloc); in mapping()
262 IO.mapRequired("flags", Section.flags); in mapping()
263 IO.mapRequired("reserved1", Section.reserved1); in mapping()
264 IO.mapRequired("reserved2", Section.reserved2); in mapping()
265 IO.mapOptional("reserved3", Section.reserved3); in mapping()
268 void MappingTraits<MachO::dylib>::mapping(IO &IO, MachO::dylib &DylibStruct) { in mapping() argument
269 IO.mapRequired("name", DylibStruct.name); in mapping()
270 IO.mapRequired("timestamp", DylibStruct.timestamp); in mapping()
271 IO.mapRequired("current_version", DylibStruct.current_version); in mapping()
272 IO.mapRequired("compatibility_version", DylibStruct.compatibility_version); in mapping()
276 IO &IO, MachO::dylib_command &LoadCommand) { in mapping() argument
277 IO.mapRequired("dylib", LoadCommand.dylib); in mapping()
281 IO &IO, MachO::dylinker_command &LoadCommand) { in mapping() argument
283 IO.mapRequired("name", LoadCommand.name); in mapping()
287 IO &IO, MachO::dysymtab_command &LoadCommand) { in mapping() argument
289 IO.mapRequired("ilocalsym", LoadCommand.ilocalsym); in mapping()
290 IO.mapRequired("nlocalsym", LoadCommand.nlocalsym); in mapping()
291 IO.mapRequired("iextdefsym", LoadCommand.iextdefsym); in mapping()
292 IO.mapRequired("nextdefsym", LoadCommand.nextdefsym); in mapping()
293 IO.mapRequired("iundefsym", LoadCommand.iundefsym); in mapping()
294 IO.mapRequired("nundefsym", LoadCommand.nundefsym); in mapping()
295 IO.mapRequired("tocoff", LoadCommand.tocoff); in mapping()
296 IO.mapRequired("ntoc", LoadCommand.ntoc); in mapping()
297 IO.mapRequired("modtaboff", LoadCommand.modtaboff); in mapping()
298 IO.mapRequired("nmodtab", LoadCommand.nmodtab); in mapping()
299 IO.mapRequired("extrefsymoff", LoadCommand.extrefsymoff); in mapping()
300 IO.mapRequired("nextrefsyms", LoadCommand.nextrefsyms); in mapping()
301 IO.mapRequired("indirectsymoff", LoadCommand.indirectsymoff); in mapping()
302 IO.mapRequired("nindirectsyms", LoadCommand.nindirectsyms); in mapping()
303 IO.mapRequired("extreloff", LoadCommand.extreloff); in mapping()
304 IO.mapRequired("nextrel", LoadCommand.nextrel); in mapping()
305 IO.mapRequired("locreloff", LoadCommand.locreloff); in mapping()
306 IO.mapRequired("nlocrel", LoadCommand.nlocrel); in mapping()
310 IO &IO, MachO::encryption_info_command &LoadCommand) { in mapping() argument
312 IO.mapRequired("cryptoff", LoadCommand.cryptoff); in mapping()
313 IO.mapRequired("cryptsize", LoadCommand.cryptsize); in mapping()
314 IO.mapRequired("cryptid", LoadCommand.cryptid); in mapping()
318 IO &IO, MachO::encryption_info_command_64 &LoadCommand) { in mapping() argument
320 IO.mapRequired("cryptoff", LoadCommand.cryptoff); in mapping()
321 IO.mapRequired("cryptsize", LoadCommand.cryptsize); in mapping()
322 IO.mapRequired("cryptid", LoadCommand.cryptid); in mapping()
323 IO.mapRequired("pad", LoadCommand.pad); in mapping()
327 IO &IO, MachO::entry_point_command &LoadCommand) { in mapping() argument
329 IO.mapRequired("entryoff", LoadCommand.entryoff); in mapping()
330 IO.mapRequired("stacksize", LoadCommand.stacksize); in mapping()
334 IO &IO, MachO::fvmfile_command &LoadCommand) { in mapping() argument
336 IO.mapRequired("name", LoadCommand.name); in mapping()
337 IO.mapRequired("header_addr", LoadCommand.header_addr); in mapping()
340 void MappingTraits<MachO::fvmlib>::mapping(IO &IO, MachO::fvmlib &FVMLib) { in mapping() argument
341 IO.mapRequired("name", FVMLib.name); in mapping()
342 IO.mapRequired("minor_version", FVMLib.minor_version); in mapping()
343 IO.mapRequired("header_addr", FVMLib.header_addr); in mapping()
347 IO &IO, MachO::fvmlib_command &LoadCommand) { in mapping() argument
349 IO.mapRequired("fvmlib", LoadCommand.fvmlib); in mapping()
353 IO &IO, MachO::ident_command &LoadCommand) {} in mapping() argument
356 IO &IO, MachO::linkedit_data_command &LoadCommand) { in mapping() argument
358 IO.mapRequired("dataoff", LoadCommand.dataoff); in mapping()
359 IO.mapRequired("datasize", LoadCommand.datasize); in mapping()
363 IO &IO, MachO::linker_option_command &LoadCommand) { in mapping() argument
365 IO.mapRequired("count", LoadCommand.count); in mapping()
369 IO &IO, MachO::prebind_cksum_command &LoadCommand) { in mapping() argument
371 IO.mapRequired("cksum", LoadCommand.cksum); in mapping()
375 IO &IO, MachO::load_command &LoadCommand) {} in mapping() argument
378 IO &IO, MachO::prebound_dylib_command &LoadCommand) { in mapping() argument
380 IO.mapRequired("name", LoadCommand.name); in mapping()
381 IO.mapRequired("nmodules", LoadCommand.nmodules); in mapping()
382 IO.mapRequired("linked_modules", LoadCommand.linked_modules); in mapping()
386 IO &IO, MachO::routines_command &LoadCommand) { in mapping() argument
388 IO.mapRequired("init_address", LoadCommand.init_address); in mapping()
389 IO.mapRequired("init_module", LoadCommand.init_module); in mapping()
390 IO.mapRequired("reserved1", LoadCommand.reserved1); in mapping()
391 IO.mapRequired("reserved2", LoadCommand.reserved2); in mapping()
392 IO.mapRequired("reserved3", LoadCommand.reserved3); in mapping()
393 IO.mapRequired("reserved4", LoadCommand.reserved4); in mapping()
394 IO.mapRequired("reserved5", LoadCommand.reserved5); in mapping()
395 IO.mapRequired("reserved6", LoadCommand.reserved6); in mapping()
399 IO &IO, MachO::routines_command_64 &LoadCommand) { in mapping() argument
401 IO.mapRequired("init_address", LoadCommand.init_address); in mapping()
402 IO.mapRequired("init_module", LoadCommand.init_module); in mapping()
403 IO.mapRequired("reserved1", LoadCommand.reserved1); in mapping()
404 IO.mapRequired("reserved2", LoadCommand.reserved2); in mapping()
405 IO.mapRequired("reserved3", LoadCommand.reserved3); in mapping()
406 IO.mapRequired("reserved4", LoadCommand.reserved4); in mapping()
407 IO.mapRequired("reserved5", LoadCommand.reserved5); in mapping()
408 IO.mapRequired("reserved6", LoadCommand.reserved6); in mapping()
412 IO &IO, MachO::rpath_command &LoadCommand) { in mapping() argument
414 IO.mapRequired("path", LoadCommand.path); in mapping()
417 void MappingTraits<MachO::section>::mapping(IO &IO, MachO::section &Section) { in mapping() argument
418 IO.mapRequired("sectname", Section.sectname); in mapping()
419 IO.mapRequired("segname", Section.segname); in mapping()
420 IO.mapRequired("addr", Section.addr); in mapping()
421 IO.mapRequired("size", Section.size); in mapping()
422 IO.mapRequired("offset", Section.offset); in mapping()
423 IO.mapRequired("align", Section.align); in mapping()
424 IO.mapRequired("reloff", Section.reloff); in mapping()
425 IO.mapRequired("nreloc", Section.nreloc); in mapping()
426 IO.mapRequired("flags", Section.flags); in mapping()
427 IO.mapRequired("reserved1", Section.reserved1); in mapping()
428 IO.mapRequired("reserved2", Section.reserved2); in mapping()
431 void MappingTraits<MachO::section_64>::mapping(IO &IO, in mapping() argument
433 IO.mapRequired("sectname", Section.sectname); in mapping()
434 IO.mapRequired("segname", Section.segname); in mapping()
435 IO.mapRequired("addr", Section.addr); in mapping()
436 IO.mapRequired("size", Section.size); in mapping()
437 IO.mapRequired("offset", Section.offset); in mapping()
438 IO.mapRequired("align", Section.align); in mapping()
439 IO.mapRequired("reloff", Section.reloff); in mapping()
440 IO.mapRequired("nreloc", Section.nreloc); in mapping()
441 IO.mapRequired("flags", Section.flags); in mapping()
442 IO.mapRequired("reserved1", Section.reserved1); in mapping()
443 IO.mapRequired("reserved2", Section.reserved2); in mapping()
444 IO.mapRequired("reserved3", Section.reserved3); in mapping()
448 IO &IO, MachO::segment_command &LoadCommand) { in mapping() argument
450 IO.mapRequired("segname", LoadCommand.segname); in mapping()
451 IO.mapRequired("vmaddr", LoadCommand.vmaddr); in mapping()
452 IO.mapRequired("vmsize", LoadCommand.vmsize); in mapping()
453 IO.mapRequired("fileoff", LoadCommand.fileoff); in mapping()
454 IO.mapRequired("filesize", LoadCommand.filesize); in mapping()
455 IO.mapRequired("maxprot", LoadCommand.maxprot); in mapping()
456 IO.mapRequired("initprot", LoadCommand.initprot); in mapping()
457 IO.mapRequired("nsects", LoadCommand.nsects); in mapping()
458 IO.mapRequired("flags", LoadCommand.flags); in mapping()
462 IO &IO, MachO::segment_command_64 &LoadCommand) { in mapping() argument
464 IO.mapRequired("segname", LoadCommand.segname); in mapping()
465 IO.mapRequired("vmaddr", LoadCommand.vmaddr); in mapping()
466 IO.mapRequired("vmsize", LoadCommand.vmsize); in mapping()
467 IO.mapRequired("fileoff", LoadCommand.fileoff); in mapping()
468 IO.mapRequired("filesize", LoadCommand.filesize); in mapping()
469 IO.mapRequired("maxprot", LoadCommand.maxprot); in mapping()
470 IO.mapRequired("initprot", LoadCommand.initprot); in mapping()
471 IO.mapRequired("nsects", LoadCommand.nsects); in mapping()
472 IO.mapRequired("flags", LoadCommand.flags); in mapping()
476 IO &IO, MachO::source_version_command &LoadCommand) { in mapping() argument
478 IO.mapRequired("version", LoadCommand.version); in mapping()
482 IO &IO, MachO::sub_client_command &LoadCommand) { in mapping() argument
484 IO.mapRequired("client", LoadCommand.client); in mapping()
488 IO &IO, MachO::sub_framework_command &LoadCommand) { in mapping() argument
490 IO.mapRequired("umbrella", LoadCommand.umbrella); in mapping()
494 IO &IO, MachO::sub_library_command &LoadCommand) { in mapping() argument
496 IO.mapRequired("sub_library", LoadCommand.sub_library); in mapping()
500 IO &IO, MachO::sub_umbrella_command &LoadCommand) { in mapping() argument
502 IO.mapRequired("sub_umbrella", LoadCommand.sub_umbrella); in mapping()
506 IO &IO, MachO::symseg_command &LoadCommand) { in mapping() argument
508 IO.mapRequired("offset", LoadCommand.offset); in mapping()
509 IO.mapRequired("size", LoadCommand.size); in mapping()
513 IO &IO, MachO::symtab_command &LoadCommand) { in mapping() argument
515 IO.mapRequired("symoff", LoadCommand.symoff); in mapping()
516 IO.mapRequired("nsyms", LoadCommand.nsyms); in mapping()
517 IO.mapRequired("stroff", LoadCommand.stroff); in mapping()
518 IO.mapRequired("strsize", LoadCommand.strsize); in mapping()
522 IO &IO, MachO::thread_command &LoadCommand) {} in mapping() argument
525 IO &IO, MachO::twolevel_hints_command &LoadCommand) { in mapping() argument
527 IO.mapRequired("offset", LoadCommand.offset); in mapping()
528 IO.mapRequired("nhints", LoadCommand.nhints); in mapping()
532 IO &IO, MachO::uuid_command &LoadCommand) { in mapping() argument
534 IO.mapRequired("uuid", LoadCommand.uuid); in mapping()
538 IO &IO, MachO::version_min_command &LoadCommand) { in mapping() argument
540 IO.mapRequired("version", LoadCommand.version); in mapping()
541 IO.mapRequired("sdk", LoadCommand.sdk); in mapping()