2007-01-19 17:25:17 +00:00
|
|
|
//===- llvm/Support/Disassembler.h ------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 19:59:42 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2007-01-19 17:25:17 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the necessary glue to call external disassembler
|
|
|
|
// libraries.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2007-01-23 10:26:08 +00:00
|
|
|
#ifndef LLVM_SYSTEM_DISASSEMBLER_H
|
|
|
|
#define LLVM_SYSTEM_DISASSEMBLER_H
|
2007-01-19 17:25:17 +00:00
|
|
|
|
2009-10-26 01:35:46 +00:00
|
|
|
#include "llvm/System/DataTypes.h"
|
2007-01-19 17:25:17 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace llvm {
|
2007-01-23 10:26:08 +00:00
|
|
|
namespace sys {
|
2007-01-19 17:25:17 +00:00
|
|
|
|
2007-03-06 05:32:48 +00:00
|
|
|
/// This function returns true, if there is possible to use some external
|
|
|
|
/// disassembler library. False otherwise.
|
2009-08-12 22:10:57 +00:00
|
|
|
bool hasDisassembler();
|
2007-03-06 05:32:48 +00:00
|
|
|
|
2007-01-23 10:26:08 +00:00
|
|
|
/// This function provides some "glue" code to call external disassembler
|
|
|
|
/// libraries.
|
|
|
|
std::string disassembleBuffer(uint8_t* start, size_t length, uint64_t pc = 0);
|
2007-01-19 17:25:17 +00:00
|
|
|
|
2007-01-23 10:26:08 +00:00
|
|
|
}
|
2007-01-19 17:25:17 +00:00
|
|
|
}
|
|
|
|
|
2007-01-23 10:26:08 +00:00
|
|
|
#endif // LLVM_SYSTEM_DISASSEMBLER_H
|