Lines Matching defs:IO

19 static inline void mapOptional(yaml::IO &IO, const char *Key, EndianType &Val,
21 IO.mapOptional(Key, Val, EndianType(Default));
26 static inline void mapRequiredAs(yaml::IO &IO, const char *Key,
29 IO.mapRequired(Key, Mapped);
36 static inline void mapOptionalAs(yaml::IO &IO, const char *Key, EndianType &Val,
39 IO.mapOptional(Key, Mapped, Default);
53 static inline void mapRequiredHex(yaml::IO &IO, const char *Key,
55 mapRequiredAs<typename HexType<EndianType>::type>(IO, Key, Val);
61 static inline void mapOptionalHex(yaml::IO &IO, const char *Key,
64 mapOptionalAs<typename HexType<EndianType>::type>(IO, Key, Val, Default);
124 IO &IO, MemoryProtection &Protect) {
126 IO.bitSetCase(Protect, #NATIVENAME, MemoryProtection::NAME);
130 void yaml::ScalarBitSetTraits<MemoryState>::bitset(IO &IO, MemoryState &State) {
132 IO.bitSetCase(State, #NATIVENAME, MemoryState::NAME);
136 void yaml::ScalarBitSetTraits<MemoryType>::bitset(IO &IO, MemoryType &Type) {
138 IO.bitSetCase(Type, #NATIVENAME, MemoryType::NAME);
143 IO &IO, ProcessorArchitecture &Arch) {
145 IO.enumCase(Arch, #NAME, ProcessorArchitecture::NAME);
147 IO.enumFallback<Hex16>(Arch);
150 void yaml::ScalarEnumerationTraits<OSPlatform>::enumeration(IO &IO,
153 IO.enumCase(Plat, #NAME, OSPlatform::NAME);
155 IO.enumFallback<Hex32>(Plat);
158 void yaml::ScalarEnumerationTraits<StreamType>::enumeration(IO &IO,
161 IO.enumCase(Type, #NAME, StreamType::NAME);
163 IO.enumFallback<Hex32>(Type);
166 void yaml::MappingTraits<CPUInfo::ArmInfo>::mapping(IO &IO,
168 mapRequiredHex(IO, "CPUID", Info.CPUID);
169 mapOptionalHex(IO, "ELF hwcaps", Info.ElfHWCaps, 0);
203 IO &IO, CPUInfo::OtherInfo &Info) {
205 IO.mapRequired("Features", Features);
238 void yaml::MappingTraits<CPUInfo::X86Info>::mapping(IO &IO,
241 IO.mapRequired("Vendor ID", VendorID);
243 mapRequiredHex(IO, "Version Info", Info.VersionInfo);
244 mapRequiredHex(IO, "Feature Info", Info.FeatureInfo);
245 mapOptionalHex(IO, "AMD Extended Features", Info.AMDExtendedFeatures, 0);
248 void yaml::MappingTraits<MemoryInfo>::mapping(IO &IO, MemoryInfo &Info) {
249 mapRequiredHex(IO, "Base Address", Info.BaseAddress);
250 mapOptionalHex(IO, "Allocation Base", Info.AllocationBase, Info.BaseAddress);
251 mapRequiredAs<MemoryProtection>(IO, "Allocation Protect",
253 mapOptionalHex(IO, "Reserved0", Info.Reserved0, 0);
254 mapRequiredHex(IO, "Region Size", Info.RegionSize);
255 mapRequiredAs<MemoryState>(IO, "State", Info.State);
256 mapOptionalAs<MemoryProtection>(IO, "Protect", Info.Protect,
258 mapRequiredAs<MemoryType>(IO, "Type", Info.Type);
259 mapOptionalHex(IO, "Reserved1", Info.Reserved1, 0);
263 IO &IO, Memory64ListStream::entry_type &Mem) {
265 IO, Mem.Entry, Mem.Content);
268 void yaml::MappingTraits<VSFixedFileInfo>::mapping(IO &IO,
270 mapOptionalHex(IO, "Signature", Info.Signature, 0);
271 mapOptionalHex(IO, "Struct Version", Info.StructVersion, 0);
272 mapOptionalHex(IO, "File Version High", Info.FileVersionHigh, 0);
273 mapOptionalHex(IO, "File Version Low", Info.FileVersionLow, 0);
274 mapOptionalHex(IO, "Product Version High", Info.ProductVersionHigh, 0);
275 mapOptionalHex(IO, "Product Version Low", Info.ProductVersionLow, 0);
276 mapOptionalHex(IO, "File Flags Mask", Info.FileFlagsMask, 0);
277 mapOptionalHex(IO, "File Flags", Info.FileFlags, 0);
278 mapOptionalHex(IO, "File OS", Info.FileOS, 0);
279 mapOptionalHex(IO, "File Type", Info.FileType, 0);
280 mapOptionalHex(IO, "File Subtype", Info.FileSubtype, 0);
281 mapOptionalHex(IO, "File Date High", Info.FileDateHigh, 0);
282 mapOptionalHex(IO, "File Date Low", Info.FileDateLow, 0);
286 IO &IO, ModuleListStream::entry_type &M) {
287 mapRequiredHex(IO, "Base of Image", M.Entry.BaseOfImage);
288 mapRequiredHex(IO, "Size of Image", M.Entry.SizeOfImage);
289 mapOptionalHex(IO, "Checksum", M.Entry.Checksum, 0);
290 mapOptional(IO, "Time Date Stamp", M.Entry.TimeDateStamp, 0);
291 IO.mapRequired("Module Name", M.Name);
292 IO.mapOptional("Version Info", M.Entry.VersionInfo, VSFixedFileInfo());
293 IO.mapRequired("CodeView Record", M.CvRecord);
294 IO.mapOptional("Misc Record", M.MiscRecord, yaml::BinaryRef());
295 mapOptionalHex(IO, "Reserved0", M.Entry.Reserved0, 0);
296 mapOptionalHex(IO, "Reserved1", M.Entry.Reserved1, 0);
299 static void streamMapping(yaml::IO &IO, RawContentStream &Stream) {
300 IO.mapOptional("Content", Stream.Content);
301 IO.mapOptional("Size", Stream.Size, Stream.Content.binary_size());
311 IO &IO, MemoryListStream::entry_type &Range) {
313 IO, Range.Entry, Range.Content);
316 static void streamMapping(yaml::IO &IO, MemoryInfoListStream &Stream) {
317 IO.mapRequired("Memory Ranges", Stream.Infos);
320 static void streamMapping(yaml::IO &IO, MemoryListStream &Stream) {
321 IO.mapRequired("Memory Ranges", Stream.Entries);
324 static void streamMapping(yaml::IO &IO, Memory64ListStream &Stream) {
325 IO.mapRequired("Memory Ranges", Stream.Entries);
336 static void streamMapping(yaml::IO &IO, ModuleListStream &Stream) {
337 IO.mapRequired("Modules", Stream.Entries);
340 static void streamMapping(yaml::IO &IO, SystemInfoStream &Stream) {
342 IO.mapRequired("Processor Arch", Info.ProcessorArch);
343 mapOptional(IO, "Processor Level", Info.ProcessorLevel, 0);
344 mapOptional(IO, "Processor Revision", Info.ProcessorRevision, 0);
345 IO.mapOptional("Number of Processors", Info.NumberOfProcessors, 0);
346 IO.mapOptional("Product type", Info.ProductType, 0);
347 mapOptional(IO, "Major Version", Info.MajorVersion, 0);
348 mapOptional(IO, "Minor Version", Info.MinorVersion, 0);
349 mapOptional(IO, "Build Number", Info.BuildNumber, 0);
350 IO.mapRequired("Platform ID", Info.PlatformId);
351 IO.mapOptional("CSD Version", Stream.CSDVersion, "");
352 mapOptionalHex(IO, "Suite Mask", Info.SuiteMask, 0);
353 mapOptionalHex(IO, "Reserved", Info.Reserved, 0);
357 IO.mapOptional("CPU", Info.CPU.X86);
362 IO.mapOptional("CPU", Info.CPU.Arm);
365 IO.mapOptional("CPU", Info.CPU.Other);
370 static void streamMapping(yaml::IO &IO, TextContentStream &Stream) {
371 IO.mapOptional("Text", Stream.Text);
375 IO &IO, MemoryDescriptor &Memory, BinaryRef &Content) {
376 mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange);
377 IO.mapRequired("Content", Content);
381 IO &IO, MemoryDescriptor_64 &Memory, BinaryRef &Content) {
382 mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange);
383 IO.mapRequired("Content", Content);
384 mapOptional(IO, "Data Size", Memory.DataSize, Content.binary_size());
388 IO &IO, ThreadListStream::entry_type &T) {
389 mapRequiredHex(IO, "Thread Id", T.Entry.ThreadId);
390 mapOptionalHex(IO, "Suspend Count", T.Entry.SuspendCount, 0);
391 mapOptionalHex(IO, "Priority Class", T.Entry.PriorityClass, 0);
392 mapOptionalHex(IO, "Priority", T.Entry.Priority, 0);
393 mapOptionalHex(IO, "Environment Block", T.Entry.EnvironmentBlock, 0);
394 IO.mapRequired("Context", T.Context);
395 IO.mapRequired("Stack", T.Entry.Stack, T.Stack);
398 static void streamMapping(yaml::IO &IO, ThreadListStream &Stream) {
399 IO.mapRequired("Threads", Stream.Entries);
402 static void streamMapping(yaml::IO &IO, MinidumpYAML::ExceptionStream &Stream) {
403 mapRequiredHex(IO, "Thread ID", Stream.MDExceptionStream.ThreadId);
404 IO.mapRequired("Exception Record", Stream.MDExceptionStream.ExceptionRecord);
405 IO.mapRequired("Thread Context", Stream.ThreadContext);
409 yaml::IO &IO, minidump::Exception &Exception) {
410 mapRequiredHex(IO, "Exception Code", Exception.ExceptionCode);
411 mapOptionalHex(IO, "Exception Flags", Exception.ExceptionFlags, 0);
412 mapOptionalHex(IO, "Exception Record", Exception.ExceptionRecord, 0);
413 mapOptionalHex(IO, "Exception Address", Exception.ExceptionAddress, 0);
414 mapOptional(IO, "Number of Parameters", Exception.NumberParameters, 0);
422 mapRequiredHex(IO, Name.c_str(), Field);
424 mapOptionalHex(IO, Name.c_str(), Field, 0);
429 yaml::IO &IO, std::unique_ptr<MinidumpYAML::Stream> &S) {
431 if (IO.outputting())
433 IO.mapRequired("Type", Type);
435 if (!IO.outputting())
439 streamMapping(IO, llvm::cast<MinidumpYAML::ExceptionStream>(*S));
442 streamMapping(IO, llvm::cast<MemoryInfoListStream>(*S));
445 streamMapping(IO, llvm::cast<MemoryListStream>(*S));
448 streamMapping(IO, llvm::cast<Memory64ListStream>(*S));
451 streamMapping(IO, llvm::cast<ModuleListStream>(*S));
454 streamMapping(IO, llvm::cast<RawContentStream>(*S));
457 streamMapping(IO, llvm::cast<SystemInfoStream>(*S));
460 streamMapping(IO, llvm::cast<TextContentStream>(*S));
463 streamMapping(IO, llvm::cast<ThreadListStream>(*S));
469 yaml::IO &IO, std::unique_ptr<MinidumpYAML::Stream> &S) {
487 void yaml::MappingTraits<Object>::mapping(IO &IO, Object &O) {
488 IO.mapTag("!minidump", true);
489 mapOptionalHex(IO, "Signature", O.Header.Signature, Header::MagicSignature);
490 mapOptionalHex(IO, "Version", O.Header.Version, Header::MagicVersion);
491 mapOptionalHex(IO, "Flags", O.Header.Flags, 0);
492 IO.mapRequired("Streams", O.Streams);