mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-21 19:42:14 +00:00
GT-2730_emteere Fix for languages lacking a setting for the PC register
in the .pspec file
This commit is contained in:
parent
38edad78f1
commit
8d1e589ac7
@ -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();
|
||||
usedRegisters.add(new Varnode(PC.getAddress(), PC.getMinimumByteSize()));
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user