mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
757534705d
1 changed files with 16 additions and 0 deletions
|
@ -606,6 +606,7 @@ public class SleighInstructionPrototype implements InstructionPrototype {
|
||||||
VarnodeTpl vn = rec.op.getInput()[0];
|
VarnodeTpl vn = rec.op.getInput()[0];
|
||||||
AddressSpace spc = vn.getSpace().fixSpace(walker);
|
AddressSpace spc = vn.getSpace().fixSpace(walker);
|
||||||
Address addr = spc.getTruncatedAddress(vn.getOffset().fix(walker), false);
|
Address addr = spc.getTruncatedAddress(vn.getOffset().fix(walker), false);
|
||||||
|
addr = handleOverlayAddress(context, addr);
|
||||||
SleighParserContext crosscontext =
|
SleighParserContext crosscontext =
|
||||||
(SleighParserContext) context.getParserContext(addr);
|
(SleighParserContext) context.getParserContext(addr);
|
||||||
int newsecnum = (int) rec.op.getInput()[1].getOffset().getReal();
|
int newsecnum = (int) rec.op.getInput()[1].getOffset().getReal();
|
||||||
|
@ -620,6 +621,15 @@ public class SleighInstructionPrototype implements InstructionPrototype {
|
||||||
return curflags;
|
return curflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Address handleOverlayAddress(InstructionContext context, Address addr) {
|
||||||
|
AddressSpace addressSpace = context.getAddress().getAddressSpace();
|
||||||
|
if (addressSpace.isOverlaySpace()) {
|
||||||
|
OverlayAddressSpace ospace = (OverlayAddressSpace) addressSpace;
|
||||||
|
addr = ospace.getOverlayAddress(addr);
|
||||||
|
}
|
||||||
|
return addr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gather all the flow records (perhaps across multiple InstructionPrototypes via crossbuilds)
|
* Gather all the flow records (perhaps across multiple InstructionPrototypes via crossbuilds)
|
||||||
* and convert to Addresses
|
* and convert to Addresses
|
||||||
|
@ -653,6 +663,7 @@ public class SleighInstructionPrototype implements InstructionPrototype {
|
||||||
VarnodeTpl vn = rec.op.getInput()[0];
|
VarnodeTpl vn = rec.op.getInput()[0];
|
||||||
AddressSpace spc = vn.getSpace().fixSpace(walker);
|
AddressSpace spc = vn.getSpace().fixSpace(walker);
|
||||||
Address addr = spc.getTruncatedAddress(vn.getOffset().fix(walker), false);
|
Address addr = spc.getTruncatedAddress(vn.getOffset().fix(walker), false);
|
||||||
|
addr = handleOverlayAddress(context, addr);
|
||||||
SleighParserContext crosscontext =
|
SleighParserContext crosscontext =
|
||||||
(SleighParserContext) context.getParserContext(addr);
|
(SleighParserContext) context.getParserContext(addr);
|
||||||
int newsecnum = (int) rec.op.getInput()[1].getOffset().getReal();
|
int newsecnum = (int) rec.op.getInput()[1].getOffset().getReal();
|
||||||
|
@ -1544,6 +1555,11 @@ public class SleighInstructionPrototype implements InstructionPrototype {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Address newaddr = hand.space.getTruncatedAddress(hand.offset_offset, false);
|
Address newaddr = hand.space.getTruncatedAddress(hand.offset_offset, false);
|
||||||
|
|
||||||
|
// if we are in an address space, translate it
|
||||||
|
if (curSpace.isOverlaySpace()) {
|
||||||
|
newaddr = curSpace.getOverlayAddress(newaddr);
|
||||||
|
}
|
||||||
return newaddr;
|
return newaddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue