Package ghidra.program.model.lang
Interface InjectPayload
-
- All Known Implementing Classes:
InjectPayloadCallfixup
,InjectPayloadCallother
,InjectPayloadSleigh
public interface InjectPayload
InjectPayload
encapsulates a semantic (p-code) override which can be injected into analyses that work with p-code (Decompiler, SymbolicPropagator) The payload typically replaces either a subroutine call or a userop
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InjectPayload.InjectParameter
-
Field Summary
Fields Modifier and Type Field Description static int
CALLFIXUP_TYPE
static int
CALLMECHANISM_TYPE
static int
CALLOTHERFIXUP_TYPE
static int
EXECUTABLEPCODE_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InjectPayload.InjectParameter[]
getInput()
java.lang.String
getName()
InjectPayload.InjectParameter[]
getOutput()
int
getParamShift()
PcodeOp[]
getPcode(Program program, InjectContext con)
A convenience function wrapping the inject method, to produce the final set of PcodeOp objects in an arrayjava.lang.String
getSource()
int
getType()
void
inject(InjectContext context, PcodeEmit emit)
Given a context, send the p-code payload to the emitterboolean
isFallThru()
-
-
-
Field Detail
-
CALLFIXUP_TYPE
static final int CALLFIXUP_TYPE
- See Also:
- Constant Field Values
-
CALLOTHERFIXUP_TYPE
static final int CALLOTHERFIXUP_TYPE
- See Also:
- Constant Field Values
-
CALLMECHANISM_TYPE
static final int CALLMECHANISM_TYPE
- See Also:
- Constant Field Values
-
EXECUTABLEPCODE_TYPE
static final int EXECUTABLEPCODE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- formal name for this injection
-
getType
int getType()
- Returns:
- the type of this injection: CALLFIXUP_TYPE, CALLMECHANISM_TYPE, etc.
-
getSource
java.lang.String getSource()
- Returns:
- a String describing the source of this payload
-
getParamShift
int getParamShift()
- Returns:
- number of parameters from the original call which should be truncated
-
getInput
InjectPayload.InjectParameter[] getInput()
- Returns:
- array of any input parameters for this inject
-
getOutput
InjectPayload.InjectParameter[] getOutput()
- Returns:
- array of any output parameters for this inject
-
inject
void inject(InjectContext context, PcodeEmit emit)
Given a context, send the p-code payload to the emitter- Parameters:
context
- is the context for injectionemit
- is the object accumulating the final p-code
-
getPcode
PcodeOp[] getPcode(Program program, InjectContext con)
A convenience function wrapping the inject method, to produce the final set of PcodeOp objects in an array- Parameters:
program
- is the Program for which injection is happeningcon
- is the context for injection- Returns:
- the array of PcodeOps
-
isFallThru
boolean isFallThru()
- Returns:
- true if the injected p-code falls thru
-
-