Package ghidra.trace.database.listing
Class DBTraceInstructionsView.InstructionBlockAdder
java.lang.Object
ghidra.trace.database.listing.DBTraceInstructionsView.InstructionBlockAdder
- Enclosing class:
DBTraceInstructionsView
A mechanism for adding a block of instructions
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected InstructionAdd the instructions and return the last one addedprotected InstructiondoAddInstructions(Iterator<Instruction> it, boolean areDelaySlots) Adds the instructions and returns the last instruction addedprotected InstructiondoAdjustExisting(Address address, Instruction protoInstr) protected InstructiondoCreateInstruction(Address address, Instruction protoInstr) Store the given instruction in the databaseprotected InstructiondoExtendPreceding(Address address, Instruction protoInstr) Check the preceding unit and see if it can be extended to "create" the desired oneprotected booleanisSuitable(Instruction candidate, Instruction protoInstr) protected voidtruncateOrDelete(TraceInstruction exists)
-
Field Details
-
count
protected int count
-
-
Method Details
-
truncateOrDelete
-
isSuitable
-
doAdjustExisting
protected Instruction doAdjustExisting(Address address, Instruction protoInstr) throws AddressOverflowException, CancelledException, CodeUnitInsertionException -
doExtendPreceding
protected Instruction doExtendPreceding(Address address, Instruction protoInstr) throws AddressOverflowException, CodeUnitInsertionException Check the preceding unit and see if it can be extended to "create" the desired oneFor overwrite, the caller should first use *
doAdjustExisting(Address, Instruction).- Parameters:
address- the starting address of the instructionprotoInstr- the prototype instruction- Returns:
- the extended instruction, if it was a match
- Throws:
AddressOverflowException- should neverCodeUnitInsertionException- if there's no room to extend the preceding unit
-
doCreateInstruction
Store the given instruction in the database- Parameters:
address- the address of the instructionprotoInstr- the parsed (usually pseudo) instruction- Returns:
- the created instruction
-
doAddInstructions
Adds the instructions and returns the last instruction addedIf it encounters a delay-slotted instruction, it will recurse on the group, iterating in reverse order.
- Parameters:
it- the iterator of instructions to addareDelaySlots- true if the instructions are already reversed from being delay-slotted- Returns:
- the last instruction added
-
doAddInstructions
Add the instructions and return the last one added- Returns:
- the last instruction added
-