2012-06-20 02:02:35 +08:00
|
|
|
//===------ utils/obj2yaml.hpp - obj2yaml conversion tool -------*- 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
|
2012-06-20 02:02:35 +08:00
|
|
|
//
|
|
|
|
// This file declares some helper routines, and also the format-specific
|
|
|
|
// writers. To add a new format, add the declaration here, and, in a separate
|
|
|
|
// source file, implement it.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
|
|
|
|
#define LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
|
2012-06-20 02:02:35 +08:00
|
|
|
|
2014-05-07 13:18:51 +08:00
|
|
|
#include "llvm/Object/COFF.h"
|
2019-04-02 19:58:37 +08:00
|
|
|
#include "llvm/Object/Minidump.h"
|
2017-03-31 03:44:09 +08:00
|
|
|
#include "llvm/Object/Wasm.h"
|
[XCOFF] Add functionality for parsing AIX XCOFF object file headers
Summary:
1. Add functionality for parsing AIX XCOFF object files headers.
2. Only support 32-bit AIX XCOFF object files in this patch.
3. Print out the AIX XCOFF object file header in YAML format.
Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk
Reviewed By: sfertile, hubert.reinterpretcast
Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59419
Patch by Digger Lin
llvm-svn: 357663
2019-04-04 08:53:21 +08:00
|
|
|
#include "llvm/Object/XCOFFObjectFile.h"
|
2012-12-04 18:37:14 +08:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
2014-06-13 01:38:55 +08:00
|
|
|
#include <system_error>
|
2012-06-20 02:02:35 +08:00
|
|
|
|
2014-06-12 22:11:22 +08:00
|
|
|
std::error_code coff2yaml(llvm::raw_ostream &Out,
|
|
|
|
const llvm::object::COFFObjectFile &Obj);
|
|
|
|
std::error_code elf2yaml(llvm::raw_ostream &Out,
|
|
|
|
const llvm::object::ObjectFile &Obj);
|
2016-05-12 06:07:45 +08:00
|
|
|
std::error_code macho2yaml(llvm::raw_ostream &Out,
|
2016-06-25 04:42:28 +08:00
|
|
|
const llvm::object::Binary &Obj);
|
2019-04-02 19:58:37 +08:00
|
|
|
llvm::Error minidump2yaml(llvm::raw_ostream &Out,
|
|
|
|
const llvm::object::MinidumpFile &Obj);
|
[XCOFF] Add functionality for parsing AIX XCOFF object file headers
Summary:
1. Add functionality for parsing AIX XCOFF object files headers.
2. Only support 32-bit AIX XCOFF object files in this patch.
3. Print out the AIX XCOFF object file header in YAML format.
Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk
Reviewed By: sfertile, hubert.reinterpretcast
Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59419
Patch by Digger Lin
llvm-svn: 357663
2019-04-04 08:53:21 +08:00
|
|
|
std::error_code xcoff2yaml(llvm::raw_ostream &Out,
|
|
|
|
const llvm::object::XCOFFObjectFile &Obj);
|
2017-03-31 03:44:09 +08:00
|
|
|
std::error_code wasm2yaml(llvm::raw_ostream &Out,
|
|
|
|
const llvm::object::WasmObjectFile &Obj);
|
2012-06-20 02:02:35 +08:00
|
|
|
|
2016-12-08 05:47:28 +08:00
|
|
|
// Forward decls for dwarf2yaml
|
|
|
|
namespace llvm {
|
2017-07-20 06:27:28 +08:00
|
|
|
class DWARFContext;
|
2016-12-08 05:47:28 +08:00
|
|
|
namespace DWARFYAML {
|
2016-12-09 01:46:57 +08:00
|
|
|
struct Data;
|
2016-12-08 05:47:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-20 06:27:28 +08:00
|
|
|
std::error_code dwarf2yaml(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y);
|
2016-12-08 05:47:28 +08:00
|
|
|
|
2012-06-20 02:02:35 +08:00
|
|
|
#endif
|