From 89196804a55ba438fd96ae5c558c7d0f04a3b18d Mon Sep 17 00:00:00 2001 From: Clark Coleman <clc@zephyr-software.com> Date: Thu, 22 Apr 2021 21:34:19 -0400 Subject: [PATCH] Changes to handle IDA Pro 7.5 interface change. --- src/drivers/idapro/SMPStaticAnalyzer.cpp | 4 ++-- src/interfaces/idapro/STARSIDAInstruction.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/drivers/idapro/SMPStaticAnalyzer.cpp b/src/drivers/idapro/SMPStaticAnalyzer.cpp index 258279fa..f86d0224 100644 --- a/src/drivers/idapro/SMPStaticAnalyzer.cpp +++ b/src/drivers/idapro/SMPStaticAnalyzer.cpp @@ -41,7 +41,7 @@ #include <ctime> #include <interfaces/idapro/all.h> -#if 0 +#if 0 // should all be in interfaces/idapro/all.h #include <pro.h> #include <ida.hpp> #include <idp.hpp> @@ -663,7 +663,7 @@ bool IDAP_run(size_t arg) { return true; #endif } - catch (const std::bad_alloc &) { + catch (std::bad_alloc) { SMP_msg("FATAL ERROR: Memory exhausted.\n"); if (nullptr != InfoAnnotFile) { SMP_fprintf(InfoAnnotFile, " 8000000 2 ERROR MEMORYEXHAUSTED\n"); diff --git a/src/interfaces/idapro/STARSIDAInstruction.cpp b/src/interfaces/idapro/STARSIDAInstruction.cpp index 0d55709e..6413893d 100644 --- a/src/interfaces/idapro/STARSIDAInstruction.cpp +++ b/src/interfaces/idapro/STARSIDAInstruction.cpp @@ -101,7 +101,7 @@ bool STARS_IDA_Instruction_t::STARS_GetCmd(void) { this->STARSfeatures = cmd.get_canon_feature(); #else insn_t NewInsn; - InstrLen = decode_insn(&NewInsn, m_id.GetIDWithinFile()); + InstrLen = ::decode_insn(&NewInsn, m_id.GetIDWithinFile()); // Copy cmd fields to member STARScmd. this->STARScmd.itype = NewInsn.itype; this->STARScmd.size = NewInsn.size; @@ -110,7 +110,11 @@ bool STARS_IDA_Instruction_t::STARS_GetCmd(void) { this->STARScmd.insnpref = NewInsn.insnpref; this->STARScmd.flags = NewInsn.flags; // Get the canonical features into member STARSfeatures. +#if (IDA_SDK_VERSION < 750) this->STARSfeatures = NewInsn.get_canon_feature(); +#else + this->STARSfeatures = NewInsn.get_canon_feature(PH); +#endif #endif -- GitLab