From: Christoph Egger Date: Sun, 7 Dec 2014 16:52:34 +0000 (+0100) Subject: Correctly handle the case where we do not have Instruction Analysis X-Git-Tag: v0.1~158 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=8c6f5533d4124e09d864ca5db2140acbd4a12777;p=frida%2Ffrida.git Correctly handle the case where we do not have Instruction Analysis --- diff --git a/src/disassembler/llvm/LLVMDisassembler.cxx b/src/disassembler/llvm/LLVMDisassembler.cxx index c2b0527..8837239 100644 --- a/src/disassembler/llvm/LLVMDisassembler.cxx +++ b/src/disassembler/llvm/LLVMDisassembler.cxx @@ -92,8 +92,11 @@ LLVMDisassembler::LLVMDisassembler(const std::string& filename) RelInfo.release(); Symzer.release(); - MIA.reset(target->createMCInstrAnalysis(MII.get())); + if (!MIA) { + LOG4CXX_ERROR(logger, "no instruction analysis for target " << tripleName); + return; + } int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); IP.reset(target->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));