mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Last chance attempt to find LOAD/STORE
This commit is contained in:
parent
46e8a54948
commit
72d6b15133
2 changed files with 11 additions and 2 deletions
|
@ -1087,9 +1087,10 @@ void Architecture::parseProcessorConfig(DocumentStorage &store)
|
|||
parseLaneSizes(*iter);
|
||||
}
|
||||
else if (elname == "data_space") {
|
||||
AddrSpace *spc = getSpaceByName(el->getAttributeValue("space"));
|
||||
const string &spaceName( (*iter)->getAttributeValue("space"));
|
||||
AddrSpace *spc = getSpaceByName(spaceName);
|
||||
if (spc == (AddrSpace *)0)
|
||||
throw LowlevelError("Undefined space: "+el->getAttributeValue("space"));
|
||||
throw LowlevelError("Undefined space: "+spaceName);
|
||||
setDefaultDataSpace(spc->getIndex());
|
||||
}
|
||||
else if (elname == "segmented_address") {
|
||||
|
|
|
@ -964,6 +964,14 @@ AddrSpace *ActionConstantPtr::searchForLoadStore(Varnode *vn,PcodeOp *op)
|
|||
}
|
||||
if (op == (PcodeOp *)0) break;
|
||||
}
|
||||
for(list<PcodeOp *>::const_iterator iter=vn->beginDescend();iter!=vn->endDescend();++iter) {
|
||||
op = *iter;
|
||||
OpCode opc = op->code();
|
||||
if (opc == CPUI_LOAD)
|
||||
return Address::getSpaceFromConst(op->getIn(0)->getAddr());
|
||||
else if (opc == CPUI_STORE && op->getIn(1) == vn)
|
||||
return Address::getSpaceFromConst(op->getIn(0)->getAddr());
|
||||
}
|
||||
return (AddrSpace *)0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue