Lines Matching +full:stream +full:- +full:id +full:- +full:range
1 //===- MinidumpYAML.cpp - Minidump YAMLIO implementation ------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
16 /// Perform an optional yaml-mapping of an endian-aware type EndianType. The
25 /// Yaml-map an endian-aware type EndianType as some other type MapType.
34 /// Perform an optional yaml-mapping of an endian-aware type EndianType as some
45 /// Return the appropriate yaml Hex type for a given endian-aware type.
52 /// Yaml-map an endian-aware type as an appropriately-sized hex value.
59 /// Perform an optional yaml-mapping of an endian-aware type as an
60 /// appropriately-sized hex value.
68 Stream::~Stream() = default;
70 Stream::StreamKind Stream::getKind(StreamType Type) { in getKind()
97 std::unique_ptr<Stream> Stream::create(StreamType Type) { in create()
117 llvm_unreachable("Unhandled stream kind!"); in create()
238 IO.mapRequired("Vendor ID", VendorID); in mapping()
290 static void streamMapping(yaml::IO &IO, RawContentStream &Stream) { in streamMapping() argument
291 IO.mapOptional("Content", Stream.Content); in streamMapping()
292 IO.mapOptional("Size", Stream.Size, Stream.Content.binary_size()); in streamMapping()
295 static std::string streamValidate(RawContentStream &Stream) { in streamValidate() argument
296 if (Stream.Size.value < Stream.Content.binary_size()) in streamValidate()
297 return "Stream size must be greater or equal to the content size"; in streamValidate()
302 IO &IO, MemoryListStream::entry_type &Range) { in mapping() argument
304 IO, Range.Entry, Range.Content); in mapping()
307 static void streamMapping(yaml::IO &IO, MemoryInfoListStream &Stream) { in streamMapping() argument
308 IO.mapRequired("Memory Ranges", Stream.Infos); in streamMapping()
311 static void streamMapping(yaml::IO &IO, MemoryListStream &Stream) { in streamMapping() argument
312 IO.mapRequired("Memory Ranges", Stream.Entries); in streamMapping()
315 static void streamMapping(yaml::IO &IO, ModuleListStream &Stream) { in streamMapping() argument
316 IO.mapRequired("Modules", Stream.Entries); in streamMapping()
319 static void streamMapping(yaml::IO &IO, SystemInfoStream &Stream) { in streamMapping() argument
320 SystemInfo &Info = Stream.Info; in streamMapping()
329 IO.mapRequired("Platform ID", Info.PlatformId); in streamMapping()
330 IO.mapOptional("CSD Version", Stream.CSDVersion, ""); in streamMapping()
349 static void streamMapping(yaml::IO &IO, TextContentStream &Stream) { in streamMapping() argument
350 IO.mapOptional("Text", Stream.Text); in streamMapping()
355 mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange); in mapping()
361 mapRequiredHex(IO, "Thread Id", T.Entry.ThreadId); in mapping()
370 static void streamMapping(yaml::IO &IO, ThreadListStream &Stream) { in streamMapping() argument
371 IO.mapRequired("Threads", Stream.Entries); in streamMapping()
374 static void streamMapping(yaml::IO &IO, MinidumpYAML::ExceptionStream &Stream) { in streamMapping() argument
375 mapRequiredHex(IO, "Thread ID", Stream.MDExceptionStream.ThreadId); in streamMapping()
376 IO.mapRequired("Exception Record", Stream.MDExceptionStream.ExceptionRecord); in streamMapping()
377 IO.mapRequired("Thread Context", Stream.ThreadContext); in streamMapping()
400 void yaml::MappingTraits<std::unique_ptr<Stream>>::mapping( in mapping()
401 yaml::IO &IO, std::unique_ptr<MinidumpYAML::Stream> &S) { in mapping()
404 Type = S->Type; in mapping()
408 S = MinidumpYAML::Stream::create(Type); in mapping()
409 switch (S->Kind) { in mapping()
410 case MinidumpYAML::Stream::StreamKind::Exception: in mapping()
413 case MinidumpYAML::Stream::StreamKind::MemoryInfoList: in mapping()
416 case MinidumpYAML::Stream::StreamKind::MemoryList: in mapping()
419 case MinidumpYAML::Stream::StreamKind::ModuleList: in mapping()
422 case MinidumpYAML::Stream::StreamKind::RawContent: in mapping()
425 case MinidumpYAML::Stream::StreamKind::SystemInfo: in mapping()
428 case MinidumpYAML::Stream::StreamKind::TextContent: in mapping()
431 case MinidumpYAML::Stream::StreamKind::ThreadList: in mapping()
437 std::string yaml::MappingTraits<std::unique_ptr<Stream>>::validate( in validate()
438 yaml::IO &IO, std::unique_ptr<MinidumpYAML::Stream> &S) { in validate()
439 switch (S->Kind) { in validate()
440 case MinidumpYAML::Stream::StreamKind::RawContent: in validate()
442 case MinidumpYAML::Stream::StreamKind::Exception: in validate()
443 case MinidumpYAML::Stream::StreamKind::MemoryInfoList: in validate()
444 case MinidumpYAML::Stream::StreamKind::MemoryList: in validate()
445 case MinidumpYAML::Stream::StreamKind::ModuleList: in validate()
446 case MinidumpYAML::Stream::StreamKind::SystemInfo: in validate()
447 case MinidumpYAML::Stream::StreamKind::TextContent: in validate()
448 case MinidumpYAML::Stream::StreamKind::ThreadList: in validate()
462 Expected<std::unique_ptr<Stream>>
463 Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) { in create()
472 File.getRawData(ExpectedExceptionStream->ThreadContext); in create()
524 auto ExpectedCSDVersion = File.getString(ExpectedInfo->CSDVersionRVA); in create()
550 llvm_unreachable("Unhandled stream kind!"); in create()
554 std::vector<std::unique_ptr<Stream>> Streams; in create()
557 auto ExpectedStream = Stream::create(StreamDesc, File); in create()