GT-2730_emteere Fix for languages lacking a setting for the PC register

in the .pspec file
This commit is contained in:
emteere 2019-04-17 13:24:52 -04:00
parent 38edad78f1
commit 8d1e589ac7

View File

@ -679,8 +679,11 @@ public class CreateThunkFunctionCmd extends BackgroundCommand {
flowType.equals(RefType.CALL_TERMINATOR)) && !flowType.isConditional()) {
// program counter should be assumed to be used
// assume PC is used when considering registers that have been set
Register PC = program.getLanguage().getProgramCounter();
if (PC != null) {
usedRegisters.add(new Varnode(PC.getAddress(), PC.getMinimumByteSize()));
}
setRegisters.removeAll(usedRegisters);
// check that the setRegisters are all hidden, meaning don't care.