mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Hit all RETURN input parameters
This commit is contained in:
parent
c511845cea
commit
f71dc17292
1 changed files with 4 additions and 2 deletions
|
@ -3388,6 +3388,8 @@ void ActionDeadCode::markConsumedParameters(FuncCallSpecs *fc,vector<Varnode *>
|
||||||
uintb ActionDeadCode::gatherConsumedReturn(Funcdata &data)
|
uintb ActionDeadCode::gatherConsumedReturn(Funcdata &data)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
if (data.getFuncProto().isOutputLocked() || data.getActiveOutput() != (ParamActive *)0)
|
||||||
|
return ~((uintb)0);
|
||||||
list<PcodeOp *>::const_iterator iter,enditer;
|
list<PcodeOp *>::const_iterator iter,enditer;
|
||||||
enditer = data.endOp(CPUI_RETURN);
|
enditer = data.endOp(CPUI_RETURN);
|
||||||
uintb consumeVal = 0;
|
uintb consumeVal = 0;
|
||||||
|
@ -3455,8 +3457,8 @@ int4 ActionDeadCode::apply(Funcdata &data)
|
||||||
else if (!op->isAssignment()) {
|
else if (!op->isAssignment()) {
|
||||||
if (op->code() == CPUI_RETURN) {
|
if (op->code() == CPUI_RETURN) {
|
||||||
pushConsumed(~((uintb)0),op->getIn(0),worklist);
|
pushConsumed(~((uintb)0),op->getIn(0),worklist);
|
||||||
if (op->numInput() > 1)
|
for(i=1;i<op->numInput();++i)
|
||||||
pushConsumed(returnConsume,op->getIn(1),worklist);
|
pushConsumed(returnConsume,op->getIn(i),worklist);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for(i=0;i<op->numInput();++i)
|
for(i=0;i<op->numInput();++i)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue