1 //===- llvm/Support/Disassembler.h ------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file implements the necessary glue to call external disassembler 11 // libraries. 12 // 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_SYSTEM_DISASSEMBLER_H 16 #define LLVM_SYSTEM_DISASSEMBLER_H 17 18 #include "llvm/Support/DataTypes.h" 19 #include <string> 20 21 namespace llvm { 22 namespace sys { 23 24 /// This function returns true, if there is possible to use some external 25 /// disassembler library. False otherwise. 26 bool hasDisassembler(); 27 28 /// This function provides some "glue" code to call external disassembler 29 /// libraries. 30 std::string disassembleBuffer(uint8_t* start, size_t length, uint64_t pc = 0); 31 32 } 33 } 34 35 #endif // LLVM_SYSTEM_DISASSEMBLER_H 36