Merge remote-tracking branch 'origin/GT_2730_emteere' into Ghidra_9.0.3

This commit is contained in:
ghidravore 2019-04-17 18:38:39 -04:00
commit 0ba6e2757c

View File

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