This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add YAML traits for ArchSpec and ProcessInstanceInfo
ClosedPublic

Authored by JDevlieghere on Mar 11 2020, 9:45 AM.

Details

Summary

Add YAML traits for ArchSpec and ProcessInstanceInfo so they can be serialized for the reproducers.

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 11 2020, 9:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2020, 9:45 AM
labath accepted this revision.Mar 12 2020, 3:19 AM

Looks good. The mapping vs sequence traits thingy is not that important, but since we do have the "dump" command, it may be worthwhile to spent a bit of time implementing a slightly more complicated traits class so that the yaml output looks nicer. (Another reason against wrapping standard containters in custom XXXList classes)

lldb/source/Utility/ProcessInfo.cpp
348–351

Maybe define this as a SequenceTraits<ProcessInstanceInfoList>? I believe you could implement the required functions by simply forwarding them to SequenceTraits<std::vector<ProcessInstanceInfo>>::whatever

This revision is now accepted and ready to land.Mar 12 2020, 3:19 AM
This revision was automatically updated to reflect the committed changes.