Package ghidra.pcode.struct
Annotation Interface StructuredSleigh.Param
- Enclosing class:
StructuredSleigh
Declare a parameter of the p-code userop
This is attached to parameters of methods annotated with StructuredSleigh.StructuredUserop
, providing
the type and name of the parameter. The Java type of the parameter must be StructuredSleigh.Var
. For
example:
@StructuredUserop public void twice(@Param(name = "p0", type = "void *") Var p0) { _result(p0.mul(2)); }
-
Required Element Summary
-
Optional Element Summary
-
Element Details
-
type
String typeThe data type path for the type of the parameter. SeeStructuredSleigh.type(String)
. -
name
String nameThe name of the parameter in the output Sleigh codeIf the variable is referenced via
StructuredSleigh.s(String)
orStructuredSleigh.e(String)
, then is it necessary to specify the name used in the Sleigh code. Otherwise, the name is typically derived from the Java parameter name, which Java platforms are not required to preserve. If the variable is referenced only by its handle, then the name will be consistent and unique in the generated Sleigh code. When diagnosing Structured Sleigh compilation issues, it may be desirable to specify the variable name, regardless.- Default:
""
-