Displaying 1 result from an estimated 1 matches for "decodeasmx86_64".
2018 Apr 03
0
Problems using LLVM as a disassembler.
...er to start disassembling
from.
In LLVM 4.0 and above the only value of the PC parameter that works is zero.
Please can someone look into fixing this?
Kind Regards
James
P.S. Example code below:
TripleName = "x86_64-pc-linux-gnu";
// Get the target.
std::string Error;
DecodeAsmX86_64::TheTarget =
llvm::TargetRegistry::lookupTarget(TripleName, Error);
if (!TheTarget)
return 1;
...
// Set up disassembler.
DisAsm = TheTarget->createMCDisassembler(*STI, *Ctx);
if (!DisAsm)
return 1;
...
// S = DisAsm->getInstruction(*Inst, Size, Bytes_A, PC,
//...