ysyx-workbench/npc/utils/disasm/include/disasm.hpp
xinyangli e828e140cd
Some checks failed
Build abstract machine with nix / build-abstract-machine (push) Successful in 2m41s
Run CTests within npc / npc-test (push) Has been cancelled
feat(sdb): support sdb
2024-04-09 17:03:21 +08:00

17 lines
No EOL
426 B
C++

#ifndef _NPC_UTILS_DISASM_
#define _NPC_UTILS_DISASM_
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInstPrinter.h"
class Disassembler {
llvm::MCDisassembler *gDisassembler = nullptr;
llvm::MCSubtargetInfo *gSTI = nullptr;
llvm::MCInstPrinter *gIP = nullptr;
std::string triple;
public:
Disassembler(std::string);
std::string disassemble(uint64_t pc, uint8_t *code, int nbyte);
};
#endif