Merge remote-tracking branch 'origin/GT-3125' into Ghidra_9.1

This commit is contained in:
Ryan Kurtz 2019-09-12 13:40:58 -04:00
commit c1ae0d6971

View file

@ -2151,11 +2151,11 @@ void ActionNameVars::makeRec(ProtoParameter *param,Varnode *vn,map<HighVariable
PcodeOp *castop = vn->getDef(); PcodeOp *castop = vn->getDef();
if (castop->code() == CPUI_CAST) { if (castop->code() == CPUI_CAST) {
vn = castop->getIn(0); vn = castop->getIn(0);
ct = (Datatype *)0; // Indicate that this is a less prefered name ct = (Datatype *)0; // Indicate that this is a less preferred name
} }
} }
HighVariable *high = vn->getHigh(); HighVariable *high = vn->getHigh();
if (!high->isMark()) return; // Not one of the if (!high->isMark()) return; // Not one of the variables needing a name
map<HighVariable *,OpRecommend>::iterator iter = recmap.find(high); map<HighVariable *,OpRecommend>::iterator iter = recmap.find(high);
if (iter != recmap.end()) { // We have seen this varnode before if (iter != recmap.end()) { // We have seen this varnode before
@ -2192,6 +2192,7 @@ void ActionNameVars::lookForFuncParamNames(Funcdata &data,const vector<Varnode *
for(uint4 i=0;i<varlist.size();++i) { // Mark all the varnodes that can accept a name from a parameter for(uint4 i=0;i<varlist.size();++i) { // Mark all the varnodes that can accept a name from a parameter
Varnode *vn = varlist[i]; Varnode *vn = varlist[i];
if (vn->isFree()) continue; if (vn->isFree()) continue;
if (vn->isInput()) continue; // Don't override unaffected or input naming strategy
Symbol *sym = vn->getHigh()->getSymbol(); Symbol *sym = vn->getHigh()->getSymbol();
if (sym == (Symbol *)0) continue; if (sym == (Symbol *)0) continue;
if (!sym->isNameUndefined()) continue; if (!sym->isNameUndefined()) continue;