mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
New consume logic for sub-function input parameters
This commit is contained in:
parent
0d641458ce
commit
e073773a27
4 changed files with 53 additions and 13 deletions
|
@ -238,6 +238,10 @@ bool SubvariableFlow::tryCallPull(PcodeOp *op,ReplaceVarnode *rvn,int4 slot)
|
|||
|
||||
{
|
||||
if (slot == 0) return false;
|
||||
if (!aggressive) {
|
||||
if ((rvn->vn->getConsume()&~rvn->mask)!=0) // If there's something outside the mask being consumed
|
||||
return false; // Don't truncate
|
||||
}
|
||||
FuncCallSpecs *fc = fd->getCallSpecs(op);
|
||||
if (fc == (FuncCallSpecs *)0) return false;
|
||||
if (fc->isInputActive()) return false; // Don't trim while in the middle of figuring out params
|
||||
|
@ -549,7 +553,6 @@ bool SubvariableFlow::traceForward(ReplaceVarnode *rvn)
|
|||
break;
|
||||
case CPUI_CALL:
|
||||
case CPUI_CALLIND:
|
||||
if (!aggressive) return false;
|
||||
if (!tryCallPull(op,rvn,slot)) return false;
|
||||
hcount += 1; // Dealt with this descendant
|
||||
break;
|
||||
|
@ -828,7 +831,6 @@ bool SubvariableFlow::traceForwardSext(ReplaceVarnode *rvn)
|
|||
break;
|
||||
case CPUI_CALL:
|
||||
case CPUI_CALLIND:
|
||||
if (!aggressive) return false;
|
||||
if (!tryCallPull(op,rvn,slot)) return false;
|
||||
hcount += 1; // Dealt with this descendant
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue