Ghidra is a software reverse engineering (SRE) framework
Merge remote-tracking branch 'origin/patch'
Ryan Kurtz4ff113f92c7f
diff --cc Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.hhindex 980c5ff135,af8e2bac3a..3397f986a8--- a/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.hh+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.hh@@@ -516,7 -511,8 +516,8 @@@ publicJumpTable *linkJumpTable(PcodeOp *op); ///< Link jump-table with a given BRANCHINDJumpTable *findJumpTable(const PcodeOp *op) const; ///< Find a jump-table associated with a given BRANCHINDJumpTable *installJumpTable(const Address &addr); ///< Install a new jump-table for the given Address+ JumpTable *recoverJumpTable(Funcdata &partial,PcodeOp *op,FlowInfo *flow,int4 &failuremode);+ bool earlyJumpTableFail(PcodeOp *op); ///< Try to determine, early, if jump-table analysis will fail- JumpTable *recoverJumpTable(PcodeOp *op,FlowInfo *flow,int4 &failuremode);int4 numJumpTables(void) const { return jumpvec.size(); } ///< Get the number of jump-tables for \b this functionJumpTable *getJumpTable(int4 i) { return jumpvec[i]; } ///< Get the i-th jump-tablevoid removeJumpTable(JumpTable *jt); ///< Remove/delete the given jump-tablediff --cc Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.ccindex 2ddda563fc,ac083b6381..98e0852517--- a/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.cc+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.cc@@@ -576,8 -654,10 +653,10 @@@ JumpTable *Funcdata::recoverJumpTable(Fif ((flags & jumptablerecovery_dont)!=0)return (JumpTable *)0; // Explicitly told not to recover jumptables+ if (earlyJumpTableFail(op))+ return (JumpTable *)0;JumpTable trialjt(glb);- failuremode = stageJumpTable(&trialjt,op,flow);+ failuremode = stageJumpTable(partial,&trialjt,op,flow);if (failuremode != 0)return (JumpTable *)0;// if (trialjt.is_twostage())