From 8c405f65d2a77cb76d9239e8829594a71ffeb8ac Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Thu, 24 Oct 2019 10:30:24 -0400 Subject: [PATCH] updates for initial mips support --- SConscript | 1 + include/interfaces/STARSTypes.h | 2 ++ src/drivers/idapro/SMPStaticAnalyzer.cpp | 12 +++++------- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/SConscript b/SConscript index 1e8e0dd6..7120b59f 100644 --- a/SConscript +++ b/SConscript @@ -167,6 +167,7 @@ if int(argenv['build_ida']) == 1 or int(argenv['build_ida7']) == 1: Default(idalib) argenv.Depends(idalib, libehp) + installers=installers+idalib if int(argenv['build_irdb']) == 1 or int(argenv['build_irdb_driver']) == 1: diff --git a/include/interfaces/STARSTypes.h b/include/interfaces/STARSTypes.h index a9202a52..0510fbcc 100644 --- a/include/interfaces/STARSTypes.h +++ b/include/interfaces/STARSTypes.h @@ -200,6 +200,8 @@ enum STARS_ProcessorType { ptARM, ptARM64, + ptMIPS, + ptMIPS64, ptX86_64, ptX86_32, ptProcessType_last diff --git a/src/drivers/idapro/SMPStaticAnalyzer.cpp b/src/drivers/idapro/SMPStaticAnalyzer.cpp index 21d8557a..5d6fc8bd 100644 --- a/src/drivers/idapro/SMPStaticAnalyzer.cpp +++ b/src/drivers/idapro/SMPStaticAnalyzer.cpp @@ -311,9 +311,9 @@ int IDAP_init(void) { } #endif // Ensure correct working environment. - if (ph.id != PLFM_386 && ph.id != PLFM_ARM) + if (ph.id != PLFM_386 && ph.id != PLFM_ARM && ph.id != PLFM_MIPS) { - error("Processor must be x86 or ARM."); + error("Processor must be x86, ARM or MIPS."); return PLUGIN_SKIP; } @@ -394,8 +394,9 @@ bool IDAP_run(size_t arg) { } else { global_STARS_program->Set32BitBinary(); - const auto pt = (ph.id == PLFM_386) ? ptX86_32 : - (ph.id == PLFM_ARM) ? ptARM : + const auto pt = (ph.id == PLFM_386) ? ptX86_32 : + (ph.id == PLFM_ARM) ? ptARM : + (ph.id == PLFM_MIPS) ? ptMIPS : throw invalid_argument("Unknown machine type"); global_STARS_program->SetProcessorType(pt); SMP_msg("INFO: 32-bit binary detected.\n"); @@ -1754,6 +1755,3 @@ void SpecialDebugOutput(void) { return; } // end of SpecialDebugOutput() - - - -- GitLab