Package ghidra.pcode.exec
Interface PcodeUseropLibrary.PcodeUseropDefinition<T>
- Type Parameters:
T
- the type of parameter accepted (and possibly returned) by the userop.
- All Known Implementing Classes:
AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition
,AnnotatedPcodeUseropLibrary.FixedArgsAnnotatedPcodeUseropDefinition
,AnnotatedPcodeUseropLibrary.VariadicAnnotatedPcodeUseropDefinition
,EmuSyscallLibrary.SyscallPcodeUseropDefinition
,SleighPcodeUseropDefinition
- Enclosing interface:
PcodeUseropLibrary<T>
public static interface PcodeUseropLibrary.PcodeUseropDefinition<T>
The definition of a p-code userop.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(PcodeExecutor<T> executor, PcodeUseropLibrary<T> library, Varnode outVar, List<Varnode> inVars) Invoke/execute the userop.int
Get the number of input operands acccepted by the userop.getName()
Get the name of the userop.
-
Method Details
-
getName
String getName()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
__
.- Returns:
- the name of the userop
-
getInputCount
int getInputCount()Get the number of input operands acccepted by the userop.- Returns:
- the count or -1 if the userop is variadic
-
execute
void execute(PcodeExecutor<T> executor, PcodeUseropLibrary<T> library, Varnode outVar, List<Varnode> inVars) Invoke/execute the userop.- 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:
-