Skip to content

Commit

Permalink
refactor: make FunctionInstructionSinkCodeRelocationSynthesizer::getF…
Browse files Browse the repository at this point in the history
…unctionInstructionSinks() throw CancelledException
  • Loading branch information
boricj committed May 22, 2024
1 parent 33b4101 commit 0bc41dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import ghidra.program.model.symbol.SymbolTable;
import ghidra.program.util.ProgramUtilities;
import ghidra.util.DataConverter;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;

public class MipsCodeRelocationSynthesizer
Expand Down Expand Up @@ -390,7 +391,7 @@ public boolean matches(Instruction instruction, int operandIndex, Reference refe
@Override
public List<FunctionInstructionSink> getFunctionInstructionSinks(Program program,
RelocationTable relocationTable, Function function, TaskMonitor monitor,
MessageLog log) {
MessageLog log) throws CancelledException {
List<FunctionInstructionSink> sinks = new ArrayList<>();
sinks.add(new MIPS_26_InstructionRelocationEmitter(program, relocationTable, function,
monitor, log));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import ghidra.program.model.listing.Function;
import ghidra.program.model.listing.Program;
import ghidra.program.model.relocobj.RelocationTable;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;

public class X86CodeRelocationSynthesizer extends FunctionInstructionSinkCodeRelocationSynthesizer {
Expand Down Expand Up @@ -84,7 +85,7 @@ else if (operandMask.equals(OPMASK_SIB_4BYTES)) {
@Override
public List<FunctionInstructionSink> getFunctionInstructionSinks(Program program,
RelocationTable relocationTable, Function function, TaskMonitor monitor,
MessageLog log) {
MessageLog log) throws CancelledException {
InstructionRelocationEmitter absolute =
new X86InstructionAbsoluteRelocationEmitter(program, relocationTable, function, monitor,
log);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ public void processFunction(Program program, AddressSetView set, Function functi

public abstract List<FunctionInstructionSink> getFunctionInstructionSinks(Program program,
RelocationTable relocationTable, Function function, TaskMonitor monitor,
MessageLog log);
MessageLog log) throws CancelledException;
}

0 comments on commit 0bc41dc

Please sign in to comment.