]> granicus.if.org Git - llvm/commit
[ObjectYAML] Add basic minidump generation support
authorPavel Labath <pavel@labath.sk>
Fri, 22 Mar 2019 14:47:26 +0000 (14:47 +0000)
committerPavel Labath <pavel@labath.sk>
Fri, 22 Mar 2019 14:47:26 +0000 (14:47 +0000)
commit2385b8e661e9e1b479f2aaf7525cf307cd6c7af0
tree28d985c31bff0820247b048286fa119046c4a7b4
parentf0344750f209becb1e408dfbd9d776a1951d5da7
[ObjectYAML] Add basic minidump generation support

Summary:
This patch adds the ability to read a yaml form of a minidump file and
write it out as binary. Apart from the minidump header and the stream
directory, only three basic stream kinds are supported:
- Text: This kind is used for streams which contain textual data. This
  is typically the contents of a /proc file on linux (e.g.
  /proc/PID/maps). In this case, we just put the raw stream contents
  into the yaml.
- SystemInfo: This stream contains various bits of information about the
  host system in binary form. We expose the data in a structured form.
- Raw: This kind is used as a fallback when we don't have any special
  knowledge about the stream. In this case, we just print the stream
  contents in hex.

For this code to be really useful, more stream kinds will need to be
added (particularly for things like lists of memory regions and loaded
modules). However, these can be added incrementally.

Reviewers: jhenderson, zturner, clayborg, aprantl

Subscribers: mgorny, lemo, llvm-commits, lldb-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59482

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356753 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/llvm/ObjectYAML/MinidumpYAML.h [new file with mode: 0644]
include/llvm/ObjectYAML/ObjectYAML.h
lib/ObjectYAML/CMakeLists.txt
lib/ObjectYAML/MinidumpYAML.cpp [new file with mode: 0644]
lib/ObjectYAML/ObjectYAML.cpp
test/tools/yaml2obj/minidump-raw-stream-small-size.yaml [new file with mode: 0644]
test/tools/yaml2obj/minidump-systeminfo-other-long.yaml [new file with mode: 0644]
test/tools/yaml2obj/minidump-systeminfo-other-not-hex.yaml [new file with mode: 0644]
test/tools/yaml2obj/minidump-systeminfo-other-short.yaml [new file with mode: 0644]
test/tools/yaml2obj/minidump-systeminfo-x86-long.yaml [new file with mode: 0644]
test/tools/yaml2obj/minidump-systeminfo-x86-short.yaml [new file with mode: 0644]
tools/yaml2obj/CMakeLists.txt
tools/yaml2obj/yaml2minidump.cpp [new file with mode: 0644]
tools/yaml2obj/yaml2obj.cpp
tools/yaml2obj/yaml2obj.h
unittests/ObjectYAML/CMakeLists.txt
unittests/ObjectYAML/MinidumpYAMLTest.cpp [new file with mode: 0644]