From ee75c7746c4cdbe637459dce2f98acdd05d40997 Mon Sep 17 00:00:00 2001 From: jdh8d <jdh8d@git.zephyr-software.com> Date: Wed, 29 Jun 2011 16:03:31 +0000 Subject: [PATCH] Bug fix and addition to print out that there is no function for some instructions --- SMPInstr.cpp | 6 ++++++ SMPProgram.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/SMPInstr.cpp b/SMPInstr.cpp index d18ce18d..2c091e48 100644 --- a/SMPInstr.cpp +++ b/SMPInstr.cpp @@ -2752,6 +2752,12 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE } #endif + /* if we have no block, we're not part of a function */ + if(GetBlock()==NULL) + /* and so we should print that we belong to no function */ + qfprintf(AnnotFile, "%10x %6d INSTR BELONGTO 0 %s\n", GetAddr(), this->SMPcmd.size, GetDisasm()); + + // Emit appropriate optimization annotations. bool SDTInstrumentation = false; switch (OptType) { diff --git a/SMPProgram.cpp b/SMPProgram.cpp index ce6a1439..42801385 100644 --- a/SMPProgram.cpp +++ b/SMPProgram.cpp @@ -88,7 +88,7 @@ ea_t HighestCodeAddress; // using an index register? bool MDIsIndexedAccess(ea_t InstAddr, ea_t GlobalAddr) { #if IDA_SDK_VERSION < 600 - int InstrLen = ua_anao(InstAddr); + int InstrLen = ua_ana0(InstAddr); #else int InstLen = decode_insn(InstAddr); #endif -- GitLab