2013-06-06 03:56:47 +08:00
|
|
|
//===--- yaml2obj.h - -------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// 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
|
2013-06-06 03:56:47 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// \file
|
2018-05-01 23:54:18 +08:00
|
|
|
/// Common declarations for yaml2obj
|
2013-06-06 03:56:47 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_TOOLS_YAML2OBJ_YAML2OBJ_H
|
|
|
|
#define LLVM_TOOLS_YAML2OBJ_YAML2OBJ_H
|
2013-06-06 03:56:47 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
2014-05-31 12:51:07 +08:00
|
|
|
class raw_ostream;
|
2016-06-28 03:53:53 +08:00
|
|
|
|
|
|
|
namespace COFFYAML {
|
|
|
|
struct Object;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ELFYAML {
|
|
|
|
struct Object;
|
|
|
|
}
|
|
|
|
|
[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
llvm-svn: 356753
2019-03-22 22:47:26 +08:00
|
|
|
namespace MinidumpYAML {
|
|
|
|
struct Object;
|
|
|
|
}
|
|
|
|
|
2017-03-31 03:44:09 +08:00
|
|
|
namespace WasmYAML {
|
|
|
|
struct Object;
|
|
|
|
}
|
|
|
|
|
2014-05-31 12:51:07 +08:00
|
|
|
namespace yaml {
|
|
|
|
class Input;
|
2016-06-28 03:53:53 +08:00
|
|
|
struct YamlObjectFile;
|
2013-06-06 03:56:47 +08:00
|
|
|
}
|
2014-05-31 12:51:07 +08:00
|
|
|
}
|
2016-06-28 03:53:53 +08:00
|
|
|
|
|
|
|
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);
|
[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
llvm-svn: 356753
2019-03-22 22:47:26 +08:00
|
|
|
int yaml2minidump(llvm::MinidumpYAML::Object &Doc, llvm::raw_ostream &Out);
|
2017-03-31 03:44:09 +08:00
|
|
|
int yaml2wasm(llvm::WasmYAML::Object &Doc, llvm::raw_ostream &Out);
|
2013-06-06 03:56:47 +08:00
|
|
|
|
|
|
|
#endif
|