mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-28 22:00:30 +00:00
832d563044
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 llvm-svn: 356753
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
//===--- yaml2obj.h - -------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
/// \file
|
|
/// Common declarations for yaml2obj
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef LLVM_TOOLS_YAML2OBJ_YAML2OBJ_H
|
|
#define LLVM_TOOLS_YAML2OBJ_YAML2OBJ_H
|
|
|
|
namespace llvm {
|
|
class raw_ostream;
|
|
|
|
namespace COFFYAML {
|
|
struct Object;
|
|
}
|
|
|
|
namespace ELFYAML {
|
|
struct Object;
|
|
}
|
|
|
|
namespace MinidumpYAML {
|
|
struct Object;
|
|
}
|
|
|
|
namespace WasmYAML {
|
|
struct Object;
|
|
}
|
|
|
|
namespace yaml {
|
|
class Input;
|
|
struct YamlObjectFile;
|
|
}
|
|
}
|
|
|
|
int yaml2coff(llvm::COFFYAML::Object &Doc, llvm::raw_ostream &Out);
|
|
int yaml2elf(llvm::ELFYAML::Object &Doc, llvm::raw_ostream &Out);
|
|
int yaml2macho(llvm::yaml::YamlObjectFile &Doc, llvm::raw_ostream &Out);
|
|
int yaml2minidump(llvm::MinidumpYAML::Object &Doc, llvm::raw_ostream &Out);
|
|
int yaml2wasm(llvm::WasmYAML::Object &Doc, llvm::raw_ostream &Out);
|
|
|
|
#endif
|