Package ghidra.pcode.exec
Class AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>
java.lang.Object
ghidra.pcode.exec.AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>
- Type Parameters:
T
- the type of data processed by the userop
- All Implemented Interfaces:
PcodeUseropLibrary.PcodeUseropDefinition<T>
- Direct Known Subclasses:
AnnotatedPcodeUseropLibrary.FixedArgsAnnotatedPcodeUseropDefinition
,AnnotatedPcodeUseropLibrary.VariadicAnnotatedPcodeUseropDefinition
- Enclosing class:
AnnotatedPcodeUseropLibrary<T>
protected abstract static class AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>
extends Object
implements PcodeUseropLibrary.PcodeUseropDefinition<T>
A wrapped, annotated Java method, exported as a userop definition
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAnnotatedPcodeUseropDefinition
(AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition
<T> create
(AnnotatedPcodeUseropLibrary.PcodeUserop annot, AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method) void
execute
(PcodeExecutor<T> executor, PcodeUseropLibrary<T> library, Varnode outVar, List<Varnode> inVars) Invoke/execute the userop.getName()
Get the name of the userop.protected void
protected void
protected abstract void
placeInputs
(PcodeExecutor<T> executor, List<Object> args, List<Varnode> inVars) protected abstract void
processNonAnnotatedParameter
(Type declClsOpType, Type opType, int i, Parameter p) protected void
validateInputs
(List<Varnode> inVars) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.pcode.exec.PcodeUseropLibrary.PcodeUseropDefinition
getInputCount
-
Field Details
-
method
-
-
Constructor Details
-
AnnotatedPcodeUseropDefinition
public AnnotatedPcodeUseropDefinition(AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method)
-
-
Method Details
-
create
protected static <T> AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T> create(AnnotatedPcodeUseropLibrary.PcodeUserop annot, AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method) -
getName
Description copied from interface:PcodeUseropLibrary.PcodeUseropDefinition
Get the name of the userop.This is the symbol assigned to the userop when compiling new Sleigh code. It cannot conflict with existing userops (except those declared, but not defined, by the executor's language) or other symbols of the executor's language. If this userop is to be used generically across many languages, choose an unlikely name. Conventionally, these start with two underscores
__
.- Specified by:
getName
in interfacePcodeUseropLibrary.PcodeUseropDefinition<T>
- Returns:
- the name of the userop
-
execute
public void execute(PcodeExecutor<T> executor, PcodeUseropLibrary<T> library, Varnode outVar, List<Varnode> inVars) Description copied from interface:PcodeUseropLibrary.PcodeUseropDefinition
Invoke/execute the userop.- Specified by:
execute
in interfacePcodeUseropLibrary.PcodeUseropDefinition<T>
- Parameters:
executor
- the executor invoking this userop.library
- the complete library for this execution. Note the library may have been composed from more than the one defining this userop.outVar
- if invoked as an rval, the destination varnode for the userop's output. Otherwise,null
.inVars
- the input varnodes as ordered in the source.- See Also:
-
initStarting
protected void initStarting() -
processNonAnnotatedParameter
-
initFinished
protected void initFinished() -
validateInputs
- Throws:
PcodeExecutionException
-
placeInputs
-