mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/GP-1163_RealModeReferences' into patch
This commit is contained in:
commit
0e81327c46
11 changed files with 31 additions and 24 deletions
|
@ -1363,8 +1363,8 @@ Address SegmentedResolver::resolve(uintb val,int4 sz,const Address &point,uintb
|
|||
uintb base = glb->context->getTrackedValue(segop->getResolve(),point);
|
||||
fullEncoding = (base << 8 * innersz) + (val & calc_mask(innersz));
|
||||
vector<uintb> seginput;
|
||||
seginput.push_back(val);
|
||||
seginput.push_back(base);
|
||||
seginput.push_back(val);
|
||||
val = segop->execute(seginput);
|
||||
return Address(spc,AddrSpace::addressToByte(val,spc->getWordSize()));
|
||||
}
|
||||
|
@ -1375,8 +1375,8 @@ Address SegmentedResolver::resolve(uintb val,int4 sz,const Address &point,uintb
|
|||
uintb base = (val >> 8*innersz) & calc_mask(outersz);
|
||||
val = val & calc_mask(innersz);
|
||||
vector<uintb> seginput;
|
||||
seginput.push_back(val);
|
||||
seginput.push_back(base);
|
||||
seginput.push_back(val);
|
||||
val = segop->execute(seginput);
|
||||
return Address(spc,AddrSpace::addressToByte(val,spc->getWordSize()));
|
||||
}
|
||||
|
|
|
@ -644,12 +644,12 @@ int4 ActionSegmentize::apply(Funcdata &data)
|
|||
}
|
||||
|
||||
if (segdef->getNumVariableTerms()==1)
|
||||
bindlist[1] = data.newConstant(4,0);
|
||||
bindlist[0] = data.newConstant(4,0);
|
||||
// Redefine the op as a segmentop
|
||||
data.opSetOpcode(segroot,CPUI_SEGMENTOP);
|
||||
data.opSetInput(segroot,data.newVarnodeSpace(spc),0);
|
||||
data.opSetInput(segroot,bindlist[1],1);
|
||||
data.opSetInput(segroot,bindlist[0],2);
|
||||
data.opSetInput(segroot,bindlist[0],1);
|
||||
data.opSetInput(segroot,bindlist[1],2);
|
||||
for(int4 j=segroot->numInput()-1;j>2;--j) // Remove anything else
|
||||
data.opRemoveInput(segroot,j);
|
||||
count += 1;
|
||||
|
|
|
@ -127,8 +127,8 @@ void EmulatePcodeOp::executeSegmentOp(void)
|
|||
uintb in1 = getVarnodeValue(currentOp->getIn(1));
|
||||
uintb in2 = getVarnodeValue(currentOp->getIn(2));
|
||||
vector<uintb> bindlist;
|
||||
bindlist.push_back(in2);
|
||||
bindlist.push_back(in1);
|
||||
bindlist.push_back(in2);
|
||||
uintb res = segdef->execute(bindlist);
|
||||
setVarnodeValue(currentOp->getOut(), res);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ void connect_to_console(Funcdata *fd)
|
|||
if (remote == (RemoteSocket *)0) {
|
||||
remote = new RemoteSocket();
|
||||
if (remote->open("/tmp/ghidrasocket")) {
|
||||
ghidra_dcp = new IfaceStatus("[ghidradbg]> ",*remote->getInputStream(),*remote->getOutputStream());
|
||||
ghidra_dcp = new IfaceTerm("[ghidradbg]> ",*remote->getInputStream(),*remote->getOutputStream());
|
||||
IfaceCapability::registerAllCommands(ghidra_dcp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7489,8 +7489,8 @@ int4 RuleSegment::applyOp(PcodeOp *op,Funcdata &data)
|
|||
|
||||
if (vn1->isConstant() && vn2->isConstant()) {
|
||||
vector<uintb> bindlist;
|
||||
bindlist.push_back(vn2->getOffset());
|
||||
bindlist.push_back(vn1->getOffset());
|
||||
bindlist.push_back(vn2->getOffset());
|
||||
uintb val = segdef->execute(bindlist);
|
||||
data.opRemoveInput(op,2);
|
||||
data.opRemoveInput(op,1);
|
||||
|
|
|
@ -143,13 +143,13 @@ bool SegmentOp::unify(Funcdata &data,PcodeOp *op,
|
|||
innervn = op->getIn(2);
|
||||
if (basevn->isConstant())
|
||||
basevn = data.newConstant(baseinsize,basevn->getOffset());
|
||||
bindlist[1] = basevn;
|
||||
bindlist[0] = basevn;
|
||||
}
|
||||
else
|
||||
bindlist[1] = (Varnode *)0;
|
||||
bindlist[0] = (Varnode *)0;
|
||||
if (innervn->isConstant())
|
||||
innervn = data.newConstant(innerinsize,innervn->getOffset());
|
||||
bindlist[0] = innervn;
|
||||
bindlist[1] = innervn;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue