Class
PlatformInstructionBase
public class PlatformInstructionBase<InsType: InstructionType, GroupType: RawRepresentable>: Instruction where GroupType.RawValue == UInt8
Base class for platform-specific instructions without registers.
Parameters
| Name | Type | Description |
|---|---|---|
| InsType | type of enumeration used to represent instructions in this architecture. |
|
| GroupType | type of enumeration used to represent instruction groups in this architecture. |
Relationships
Superclass
InstructionBase class for all disassembled instructions.
Properties
instruction
var instruction: InsType
The identifier for this instruction.
This is the instruction mnemonic, represented in an architecture-specific enumeration.
instructionType
var instructionType: InstructionType.Type
The type for instructions used in this architecture.
This is an enumeration with values corresponding to instruction mnemonics.
The same as the InsType generic parameter.
groups
var groups: [GroupType]
List of architecture-specific groups the instruction belongs to.
The list will be empty in any of these cases:
-
detail mode is off
-
capstone is built in diet mode
-
instruction groups are not implemented for this architecture See
baseGroupsfor architecture-agnostic groups.
Methods
isIn(group:)
public func isIn(group: GroupType) -> Bool
Check if an instruction belong to a particular group.
This API is only valid when detail mode is on (it's off by default). When in 'diet' mode, this API is irrelevant because engine does not store groups.
Parameters
| Name | Type | Description |
|---|---|---|
| group | GroupType |
group to check. |
Returns
true if the instruction belongs to this group, false otherwise.