[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
This revision was automatically updated to reflect the committed changes. labath marked an inline comment as done. Closed by commit rL360350: MinidumpYAML: add support for the ThreadList stream (authored by labath, committed by ). Changed prior to commit: https://reviews.llvm.org/D61423?vs=198653&id=198830#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 Files: llvm/trunk/include/llvm/ObjectYAML/MinidumpYAML.h llvm/trunk/lib/ObjectYAML/MinidumpYAML.cpp llvm/trunk/test/tools/obj2yaml/basic-minidump.yaml Index: llvm/trunk/include/llvm/ObjectYAML/MinidumpYAML.h === --- llvm/trunk/include/llvm/ObjectYAML/MinidumpYAML.h +++ llvm/trunk/include/llvm/ObjectYAML/MinidumpYAML.h @@ -30,6 +30,7 @@ RawContent, SystemInfo, TextContent, +ThreadList, }; Stream(StreamKind Kind, minidump::StreamType Type) : Kind(Kind), Type(Type) {} @@ -50,30 +51,46 @@ const object::MinidumpFile &File); }; -/// A stream representing the list of modules loaded in the process. On disk, it -/// is represented as a sequence of minidump::Module structures. These contain -/// pointers to other data structures, like the module's name and CodeView -/// record. In memory, we represent these as the ParsedModule struct, which -/// groups minidump::Module with all of its dependant structures in a single -/// entity. -struct ModuleListStream : public Stream { - struct ParsedModule { -minidump::Module Module; -std::string Name; -yaml::BinaryRef CvRecord; -yaml::BinaryRef MiscRecord; - }; - std::vector Modules; +namespace detail { +/// A stream representing a list of abstract entries in a minidump stream. Its +/// instantiations can be used to represent the ModuleList stream and other +/// streams with a similar structure. +template struct ListStream : public Stream { + using entry_type = EntryT; - ModuleListStream(std::vector Modules = {}) - : Stream(StreamKind::ModuleList, minidump::StreamType::ModuleList), -Modules(std::move(Modules)) {} + std::vector Entries; - static bool classof(const Stream *S) { -return S->Kind == StreamKind::ModuleList; - } + explicit ListStream(std::vector Entries = {}) + : Stream(EntryT::Kind, EntryT::Type), Entries(std::move(Entries)) {} + + static bool classof(const Stream *S) { return S->Kind == EntryT::Kind; } }; +/// A structure containing all data belonging to a single minidump module. +struct ParsedModule { + static constexpr Stream::StreamKind Kind = Stream::StreamKind::ModuleList; + static constexpr minidump::StreamType Type = minidump::StreamType::ModuleList; + + minidump::Module Entry; + std::string Name; + yaml::BinaryRef CvRecord; + yaml::BinaryRef MiscRecord; +}; + +/// A structure containing all data belonging to a single minidump thread. +struct ParsedThread { + static constexpr Stream::StreamKind Kind = Stream::StreamKind::ThreadList; + static constexpr minidump::StreamType Type = minidump::StreamType::ThreadList; + + minidump::Thread Entry; + yaml::BinaryRef Stack; + yaml::BinaryRef Context; +}; +} // namespace detail + +using ModuleListStream = detail::ListStream; +using ThreadListStream = detail::ListStream; + /// A minidump stream represented as a sequence of hex bytes. This is used as a /// fallback when no other stream kind is suitable. struct RawContentStream : public Stream { @@ -176,6 +193,11 @@ static StringRef validate(IO &IO, std::unique_ptr &S); }; +template <> struct MappingContextTraits { + static void mapping(IO &IO, minidump::MemoryDescriptor &Memory, + BinaryRef &Content); +}; + } // namespace yaml } // namespace llvm @@ -188,11 +210,15 @@ LLVM_YAML_DECLARE_MAPPING_TRAITS(llvm::minidump::CPUInfo::OtherInfo) LLVM_YAML_DECLARE_MAPPING_TRAITS(llvm::minidump::CPUInfo::X86Info) LLVM_YAML_DECLARE_MAPPING_TRAITS(llvm::minidump::VSFixedFileInfo) + +LLVM_YAML_DECLARE_MAPPING_TRAITS( +llvm::MinidumpYAML::ModuleListStream::entry_type) LLVM_YAML_DECLARE_MAPPING_TRAITS( -llvm::MinidumpYAML::ModuleListStream::ParsedModule) +llvm::MinidumpYAML::ThreadListStream::entry_type) LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MinidumpYAML::ModuleListStream::ParsedModule) +LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MinidumpYAML::ModuleListStream::entry_type) +LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MinidumpYAML::ThreadListStream::entry_type) LLVM_YAML_DECLARE_MAPPING_TRAITS(llvm::MinidumpYAML::Object) Index: llvm/trunk/test/tools/obj2yaml/basic-minidump.yaml === --- llvm/trunk/test/tools/obj2yaml/basic-minidump.yaml +++ llvm/trunk/test/tools/obj2yaml/basic-minidump.yaml @@ -1,12 +1,12 @@ # RUN: yaml2obj %s | obj2yaml - | FileCheck %s --- !minidump -Streams: +Streams: - Type:SystemInfo
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
labath marked 6 inline comments as done. labath added a comment. Thanks for the review. Comment at: test/tools/obj2yaml/basic-minidump.yaml:47-49 + - Thread Id: 0x5C5D5E5F +Priority Class: 0x60616263 +Environment Block: 0x6465666768696A6B jhenderson wrote: > labath wrote: > > jhenderson wrote: > > > It would be nice if these were padded so that they all line up. Ditto in > > > the Stack block below. > > The microsoft structure definition calls this field just "teb" (for Thread > > Environment Block), but I've found that too opaque, so I expanded the > > acronym (sans "thread", because it is obvious we are talking about threads > > here). I could shorten this further to "environment" (the word "block" > > probably doesn't add that much value) , or even to "teb" for consistency > > with microsoft headers. Let me know what you think. > Environment Block is fine. I was actually referring to the number of spaces > between the attribute name and value, i.e. I'd prefer this: > > ``` > - Thread Id: 0x5C5D5E5F > Priority Class:0x60616263 > Environment Block: 0x6465666768696A6B > ``` Ok, I see. I can do that manually here, but that won't prevent the actual output from obj2yaml from being misaligned (which is why i was trying to come up with a shorter name). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
jhenderson accepted this revision. jhenderson added a comment. This revision is now accepted and ready to land. LGTM, with the suggested fixes. Comment at: test/tools/obj2yaml/basic-minidump.yaml:47-49 + - Thread Id: 0x5C5D5E5F +Priority Class: 0x60616263 +Environment Block: 0x6465666768696A6B labath wrote: > jhenderson wrote: > > It would be nice if these were padded so that they all line up. Ditto in > > the Stack block below. > The microsoft structure definition calls this field just "teb" (for Thread > Environment Block), but I've found that too opaque, so I expanded the acronym > (sans "thread", because it is obvious we are talking about threads here). I > could shorten this further to "environment" (the word "block" probably > doesn't add that much value) , or even to "teb" for consistency with > microsoft headers. Let me know what you think. Environment Block is fine. I was actually referring to the number of spaces between the attribute name and value, i.e. I'd prefer this: ``` - Thread Id: 0x5C5D5E5F Priority Class:0x60616263 Environment Block: 0x6465666768696A6B ``` Comment at: test/tools/obj2yaml/basic-minidump.yaml:51 +Stack: + Start of Memory Range: 0x6C6D6E6F70717273 + Content: 7475767778797A7B labath wrote: > jhenderson wrote: > > I don't have a concrete suggestion, but it might be nice to have a shorter > > field name than "Start of Memory Range", but that's less of a concern if > > that's the actual minidump field name. > That's how the field is called in the official microsoft documentation > (https://docs.microsoft.com/en-us/windows/desktop/api/minidumpapiset/ns-minidumpapiset-minidump_memory_descriptor), > which is probably the closest thing to a "spec" for this thing. It's a bit > verbose, and probably "Address" would just suffice here, but otoh it's nice > for this to match the official name. Let's leave it as is, since it matches the Microsoft document. Comment at: test/tools/obj2yaml/basic-minidump.yaml:105 +# CHECK-NEXT: Start of Memory Range: 0x6C6D6E6F70717273 +# CHECK-NEXT: Content: 7475767778797A7B +# CHECK-NEXT: Context: 7C7D7E7F80818283 Similar comment here about whitespace. Make the values of attributes within a block line up. Comment at: test/tools/obj2yaml/basic-minidump.yaml:106 +# CHECK-NEXT: Content: 7475767778797A7B +# CHECK-NEXT: Context: 7C7D7E7F80818283 # CHECK-NEXT: ... Move this to be above the Stack block for readability. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
labath updated this revision to Diff 198653. labath marked 2 inline comments as done. labath added a comment. Address review comments. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 Files: include/llvm/ObjectYAML/MinidumpYAML.h lib/ObjectYAML/MinidumpYAML.cpp test/tools/obj2yaml/basic-minidump.yaml Index: test/tools/obj2yaml/basic-minidump.yaml === --- test/tools/obj2yaml/basic-minidump.yaml +++ test/tools/obj2yaml/basic-minidump.yaml @@ -42,6 +42,15 @@ Size of Image: 0x54555657 Module Name: libb.so CodeView Record: 58595A5B + - Type:ThreadList +Threads: + - Thread Id: 0x5C5D5E5F +Priority Class: 0x60616263 +Environment Block: 0x6465666768696A6B +Stack: + Start of Memory Range: 0x6C6D6E6F70717273 + Content: 7475767778797A7B +Context: 7C7D7E7F80818283 ... # CHECK: --- !minidump @@ -86,4 +95,13 @@ # CHECK-NEXT: Size of Image: 0x54555657 # CHECK-NEXT: Module Name: libb.so # CHECK-NEXT: CodeView Record: 58595A5B +# CHECK-NEXT: - Type:ThreadList +# CHECK-NEXT: Threads: +# CHECK-NEXT: - Thread Id: 0x5C5D5E5F +# CHECK-NEXT: Priority Class: 0x60616263 +# CHECK-NEXT: Environment Block: 0x6465666768696A6B +# CHECK-NEXT: Stack: +# CHECK-NEXT: Start of Memory Range: 0x6C6D6E6F70717273 +# CHECK-NEXT: Content: 7475767778797A7B +# CHECK-NEXT: Context: 7C7D7E7F80818283 # CHECK-NEXT: ... Index: lib/ObjectYAML/MinidumpYAML.cpp === --- lib/ObjectYAML/MinidumpYAML.cpp +++ lib/ObjectYAML/MinidumpYAML.cpp @@ -180,6 +180,8 @@ case StreamType::LinuxProcStat: case StreamType::LinuxProcUptime: return StreamKind::TextContent; + case StreamType::ThreadList: +return StreamKind::ThreadList; default: return StreamKind::RawContent; } @@ -196,6 +198,8 @@ return llvm::make_unique(); case StreamKind::TextContent: return llvm::make_unique(Type); + case StreamKind::ThreadList: +return llvm::make_unique(); } llvm_unreachable("Unhandled stream kind!"); } @@ -323,19 +327,19 @@ mapOptionalHex(IO, "File Date Low", Info.FileDateLow, 0); } -void yaml::MappingTraits::mapping( -IO &IO, ModuleListStream::ParsedModule &M) { - mapRequiredHex(IO, "Base of Image", M.Module.BaseOfImage); - mapRequiredHex(IO, "Size of Image", M.Module.SizeOfImage); - mapOptionalHex(IO, "Checksum", M.Module.Checksum, 0); - IO.mapOptional("Time Date Stamp", M.Module.TimeDateStamp, +void yaml::MappingTraits::mapping( +IO &IO, ModuleListStream::entry_type &M) { + mapRequiredHex(IO, "Base of Image", M.Entry.BaseOfImage); + mapRequiredHex(IO, "Size of Image", M.Entry.SizeOfImage); + mapOptionalHex(IO, "Checksum", M.Entry.Checksum, 0); + IO.mapOptional("Time Date Stamp", M.Entry.TimeDateStamp, support::ulittle32_t(0)); IO.mapRequired("Module Name", M.Name); - IO.mapOptional("Version Info", M.Module.VersionInfo, VSFixedFileInfo()); + IO.mapOptional("Version Info", M.Entry.VersionInfo, VSFixedFileInfo()); IO.mapRequired("CodeView Record", M.CvRecord); IO.mapOptional("Misc Record", M.MiscRecord, yaml::BinaryRef()); - mapOptionalHex(IO, "Reserved0", M.Module.Reserved0, 0); - mapOptionalHex(IO, "Reserved1", M.Module.Reserved1, 0); + mapOptionalHex(IO, "Reserved0", M.Entry.Reserved0, 0); + mapOptionalHex(IO, "Reserved1", M.Entry.Reserved1, 0); } static void streamMapping(yaml::IO &IO, RawContentStream &Stream) { @@ -350,7 +354,7 @@ } static void streamMapping(yaml::IO &IO, ModuleListStream &Stream) { - IO.mapRequired("Modules", Stream.Modules); + IO.mapRequired("Modules", Stream.Entries); } static void streamMapping(yaml::IO &IO, SystemInfoStream &Stream) { @@ -386,6 +390,27 @@ IO.mapOptional("Text", Stream.Text); } +void yaml::MappingContextTraits::mapping( +IO &IO, MemoryDescriptor &Memory, BinaryRef &Content) { + mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange); + IO.mapRequired("Content", Content); +} + +void yaml::MappingTraits::mapping( +IO &IO, ThreadListStream::entry_type &T) { + mapRequiredHex(IO, "Thread Id", T.Entry.ThreadId); + mapOptionalHex(IO, "Suspend Count", T.Entry.SuspendCount, 0); + mapOptionalHex(IO, "Priority Class", T.Entry.PriorityClass, 0); + mapOptionalHex(IO, "Priority", T.Entry.Priority, 0); + mapOptionalHex(IO, "Environment Block", T.Entry.EnvironmentBlock, 0); + IO.mapRequired("Stack", T.Entry.Stack, T.Stack); + IO.mapRequired("Context", T.Context); +} + +static void streamMapping(yaml::IO &IO, ThreadListStream &Stream) { + IO.mapRequired("Threads", Stream.Entries); +} + void yaml
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
labath marked 9 inline comments as done. labath added inline comments. Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:58 +/// streams with similar structure. +template +struct ListStream : public Stream { jhenderson wrote: > KindV and TypeV aren't clear names to me. What does the V stand for? "variable" or "value" or something like that. :) Not a very good name, but I needed to differentiate that from the class member with the same name. However, just I've had an idea of how to organize this better and reduce the number of template parameters (by making these static members of the `EntryT` type). This also avoid the need for inventing names here. Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:70-73 +/// A structure containing all data belonging to a single minidump module. On +/// disk, these are placed at various places in the minidump file and +/// cross-referenced via their offsets, but for ease of use, we group them +/// together in the logical memory view. jhenderson wrote: > I'm not sure how much sense it makes to go into the detail of the minidump > file format versus the memory view here. I also am not convinced by the > repetition of this in the comments below. I've removed the memory vs. file blurb. Comment at: test/tools/obj2yaml/basic-minidump.yaml:47-49 + - Thread Id: 0x5C5D5E5F +Priority Class: 0x60616263 +Environment Block: 0x6465666768696A6B jhenderson wrote: > It would be nice if these were padded so that they all line up. Ditto in the > Stack block below. The microsoft structure definition calls this field just "teb" (for Thread Environment Block), but I've found that too opaque, so I expanded the acronym (sans "thread", because it is obvious we are talking about threads here). I could shorten this further to "environment" (the word "block" probably doesn't add that much value) , or even to "teb" for consistency with microsoft headers. Let me know what you think. Comment at: test/tools/obj2yaml/basic-minidump.yaml:51 +Stack: + Start of Memory Range: 0x6C6D6E6F70717273 + Content: 7475767778797A7B jhenderson wrote: > I don't have a concrete suggestion, but it might be nice to have a shorter > field name than "Start of Memory Range", but that's less of a concern if > that's the actual minidump field name. That's how the field is called in the official microsoft documentation (https://docs.microsoft.com/en-us/windows/desktop/api/minidumpapiset/ns-minidumpapiset-minidump_memory_descriptor), which is probably the closest thing to a "spec" for this thing. It's a bit verbose, and probably "Address" would just suffice here, but otoh it's nice for this to match the official name. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
jhenderson added inline comments. Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:57 +/// instantiations can be used to represent the ModuleList stream and other +/// streams with similar structure. +template with -> with a Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:58 +/// streams with similar structure. +template +struct ListStream : public Stream { KindV and TypeV aren't clear names to me. What does the V stand for? Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:64 - static bool classof(const Stream *S) { -return S->Kind == StreamKind::ModuleList; - } + ListStream(std::vector Entries = {}) + : Stream(KindV, TypeV), Entries(std::move(Entries)) {} `explicit`? Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:70-73 +/// A structure containing all data belonging to a single minidump module. On +/// disk, these are placed at various places in the minidump file and +/// cross-referenced via their offsets, but for ease of use, we group them +/// together in the logical memory view. I'm not sure how much sense it makes to go into the detail of the minidump file format versus the memory view here. I also am not convinced by the repetition of this in the comments below. Comment at: lib/ObjectYAML/MinidumpYAML.cpp:481 + +template +static size_t Same comment as above re. names. Comment at: test/tools/obj2yaml/basic-minidump.yaml:47-49 + - Thread Id: 0x5C5D5E5F +Priority Class: 0x60616263 +Environment Block: 0x6465666768696A6B It would be nice if these were padded so that they all line up. Ditto in the Stack block below. Comment at: test/tools/obj2yaml/basic-minidump.yaml:51 +Stack: + Start of Memory Range: 0x6C6D6E6F70717273 + Content: 7475767778797A7B I don't have a concrete suggestion, but it might be nice to have a shorter field name than "Start of Memory Range", but that's less of a concern if that's the actual minidump field name. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
clayborg added a comment. lgtm Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61423/new/ https://reviews.llvm.org/D61423 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D61423: MinidumpYAML: add support for the ThreadList stream
labath created this revision. labath added reviewers: amccarth, jhenderson, clayborg. Herald added a project: LLVM. The implementation is a pretty straightforward extension of the pattern used for (de)serializing the ModuleList stream. Since there are other streams which use the same format (MemoryList and MemoryList64, at least). I tried to generalize the code a bit so that adding future streams of this type can be done with less code. Repository: rL LLVM https://reviews.llvm.org/D61423 Files: include/llvm/ObjectYAML/MinidumpYAML.h lib/ObjectYAML/MinidumpYAML.cpp test/tools/obj2yaml/basic-minidump.yaml Index: test/tools/obj2yaml/basic-minidump.yaml === --- test/tools/obj2yaml/basic-minidump.yaml +++ test/tools/obj2yaml/basic-minidump.yaml @@ -42,6 +42,15 @@ Size of Image: 0x54555657 Module Name: libb.so CodeView Record: 58595A5B + - Type:ThreadList +Threads: + - Thread Id: 0x5C5D5E5F +Priority Class: 0x60616263 +Environment Block: 0x6465666768696A6B +Stack: + Start of Memory Range: 0x6C6D6E6F70717273 + Content: 7475767778797A7B +Context: 7C7D7E7F80818283 ... # CHECK: --- !minidump @@ -86,4 +95,13 @@ # CHECK-NEXT: Size of Image: 0x54555657 # CHECK-NEXT: Module Name: libb.so # CHECK-NEXT: CodeView Record: 58595A5B +# CHECK-NEXT: - Type:ThreadList +# CHECK-NEXT: Threads: +# CHECK-NEXT: - Thread Id: 0x5C5D5E5F +# CHECK-NEXT: Priority Class: 0x60616263 +# CHECK-NEXT: Environment Block: 0x6465666768696A6B +# CHECK-NEXT: Stack: +# CHECK-NEXT: Start of Memory Range: 0x6C6D6E6F70717273 +# CHECK-NEXT: Content: 7475767778797A7B +# CHECK-NEXT: Context: 7C7D7E7F80818283 # CHECK-NEXT: ... Index: lib/ObjectYAML/MinidumpYAML.cpp === --- lib/ObjectYAML/MinidumpYAML.cpp +++ lib/ObjectYAML/MinidumpYAML.cpp @@ -180,6 +180,8 @@ case StreamType::LinuxProcStat: case StreamType::LinuxProcUptime: return StreamKind::TextContent; + case StreamType::ThreadList: +return StreamKind::ThreadList; default: return StreamKind::RawContent; } @@ -196,6 +198,8 @@ return llvm::make_unique(); case StreamKind::TextContent: return llvm::make_unique(Type); + case StreamKind::ThreadList: +return llvm::make_unique(); } llvm_unreachable("Unhandled stream kind!"); } @@ -323,19 +327,19 @@ mapOptionalHex(IO, "File Date Low", Info.FileDateLow, 0); } -void yaml::MappingTraits::mapping( -IO &IO, ModuleListStream::ParsedModule &M) { - mapRequiredHex(IO, "Base of Image", M.Module.BaseOfImage); - mapRequiredHex(IO, "Size of Image", M.Module.SizeOfImage); - mapOptionalHex(IO, "Checksum", M.Module.Checksum, 0); - IO.mapOptional("Time Date Stamp", M.Module.TimeDateStamp, +void yaml::MappingTraits::mapping( +IO &IO, ModuleListStream::entry_type &M) { + mapRequiredHex(IO, "Base of Image", M.Entry.BaseOfImage); + mapRequiredHex(IO, "Size of Image", M.Entry.SizeOfImage); + mapOptionalHex(IO, "Checksum", M.Entry.Checksum, 0); + IO.mapOptional("Time Date Stamp", M.Entry.TimeDateStamp, support::ulittle32_t(0)); IO.mapRequired("Module Name", M.Name); - IO.mapOptional("Version Info", M.Module.VersionInfo, VSFixedFileInfo()); + IO.mapOptional("Version Info", M.Entry.VersionInfo, VSFixedFileInfo()); IO.mapRequired("CodeView Record", M.CvRecord); IO.mapOptional("Misc Record", M.MiscRecord, yaml::BinaryRef()); - mapOptionalHex(IO, "Reserved0", M.Module.Reserved0, 0); - mapOptionalHex(IO, "Reserved1", M.Module.Reserved1, 0); + mapOptionalHex(IO, "Reserved0", M.Entry.Reserved0, 0); + mapOptionalHex(IO, "Reserved1", M.Entry.Reserved1, 0); } static void streamMapping(yaml::IO &IO, RawContentStream &Stream) { @@ -350,7 +354,7 @@ } static void streamMapping(yaml::IO &IO, ModuleListStream &Stream) { - IO.mapRequired("Modules", Stream.Modules); + IO.mapRequired("Modules", Stream.Entries); } static void streamMapping(yaml::IO &IO, SystemInfoStream &Stream) { @@ -386,6 +390,27 @@ IO.mapOptional("Text", Stream.Text); } +void yaml::MappingContextTraits::mapping( +IO &IO, MemoryDescriptor &Memory, BinaryRef &Content) { + mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange); + IO.mapRequired("Content", Content); +} + +void yaml::MappingTraits::mapping( +IO &IO, ThreadListStream::entry_type &T) { + mapRequiredHex(IO, "Thread Id", T.Entry.ThreadId); + mapOptionalHex(IO, "Suspend Count", T.Entry.SuspendCount, 0); + mapOptionalHex(IO, "Priority Class", T.Entry.PriorityClass, 0); + mapOptionalHex(IO, "Priority", T.Entry.Priority, 0); + mapOptionalHex(IO, "Environment Block", T.Entry.Environmen