mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Performing ActionSetCasts much later
This commit is contained in:
parent
5fbbef38ac
commit
cbbfc9ca18
2 changed files with 16 additions and 3 deletions
|
@ -4651,12 +4651,12 @@ void universal_action(Architecture *conf)
|
||||||
act->addAction( new ActionHideShadow("merge") );
|
act->addAction( new ActionHideShadow("merge") );
|
||||||
act->addAction( new ActionCopyMarker("merge") );
|
act->addAction( new ActionCopyMarker("merge") );
|
||||||
act->addAction( new ActionOutputPrototype("localrecovery") );
|
act->addAction( new ActionOutputPrototype("localrecovery") );
|
||||||
act->addAction( new ActionSetCasts("casts") );
|
|
||||||
act->addAction( new ActionInputPrototype("fixateproto") );
|
act->addAction( new ActionInputPrototype("fixateproto") );
|
||||||
act->addAction( new ActionRestructureHigh("localrecovery") );
|
act->addAction( new ActionRestructureHigh("localrecovery") );
|
||||||
act->addAction( new ActionMapGlobals("fixateglobals") );
|
act->addAction( new ActionMapGlobals("fixateglobals") );
|
||||||
act->addAction( new ActionDynamicSymbols("dynamic") );
|
act->addAction( new ActionDynamicSymbols("dynamic") );
|
||||||
act->addAction( new ActionNameVars("merge") );
|
act->addAction( new ActionNameVars("merge") );
|
||||||
|
act->addAction( new ActionSetCasts("casts") );
|
||||||
act->addAction( new ActionFinalStructure("blockrecovery") );
|
act->addAction( new ActionFinalStructure("blockrecovery") );
|
||||||
act->addAction( new ActionPrototypeWarnings("protorecovery") );
|
act->addAction( new ActionPrototypeWarnings("protorecovery") );
|
||||||
act->addAction( new ActionStop("base") );
|
act->addAction( new ActionStop("base") );
|
||||||
|
|
|
@ -666,8 +666,21 @@ void AliasChecker::gatherAdditiveBase(Varnode *startvn,vector<AddBase> &addbase)
|
||||||
vnqueue.push_back(AddBase(subvn,indexvn));
|
vnqueue.push_back(AddBase(subvn,indexvn));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CPUI_INT_ADD:
|
|
||||||
case CPUI_INT_SUB:
|
case CPUI_INT_SUB:
|
||||||
|
if (vn == op->getIn(1)) { // Subtracting the pointer
|
||||||
|
nonadduse = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
othervn = op->getIn(1);
|
||||||
|
if (!othervn->isConstant())
|
||||||
|
indexvn = othervn;
|
||||||
|
subvn = op->getOut();
|
||||||
|
if (!subvn->isMark()) {
|
||||||
|
subvn->setMark();
|
||||||
|
vnqueue.push_back(AddBase(subvn,indexvn));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CPUI_INT_ADD:
|
||||||
case CPUI_PTRADD:
|
case CPUI_PTRADD:
|
||||||
othervn = op->getIn(1); // Check if something else is being added in besides a constant
|
othervn = op->getIn(1); // Check if something else is being added in besides a constant
|
||||||
if (othervn == vn)
|
if (othervn == vn)
|
||||||
|
@ -820,7 +833,7 @@ void MapState::reconcileDatatypes(void)
|
||||||
Datatype *curDatatype = curHint->type;
|
Datatype *curDatatype = curHint->type;
|
||||||
if (curDatatype->typeOrder(*startDatatype) < 0) // Take the most specific variant of data-type
|
if (curDatatype->typeOrder(*startDatatype) < 0) // Take the most specific variant of data-type
|
||||||
startDatatype = curDatatype;
|
startDatatype = curDatatype;
|
||||||
if (curHint->compare(*startHint) != 0)
|
if (curHint->compare(*newList.back()) != 0)
|
||||||
newList.push_back(curHint); // Keep the current hint if it is otherwise different
|
newList.push_back(curHint); // Keep the current hint if it is otherwise different
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue