CapstoneImpl

Class template that encapsulates an architecture-specific instance of the Capstone dissassembly engine

Note that all architecture-specific instances, like CapstoneX86, instantiate and derive from this one.

Constructors

this
this(Arch arch, ModeFlags modeFlags)

Creates an architecture-specific instance with a given mode of interpretation

Members

Functions

customMnemonic
void customMnemonic(TInstructionId id, string mnem)

Defines a custom mnemonic for a specified instruction id

disasm
TInstruction[] disasm(ubyte[] code, ulong address, size_t count)
Undocumented in source. Be warned that the author may not have intended to support it.
disasmIter
InstructionImplRange!TInstruction disasmIter(ubyte[] code, ulong address)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Capstone

Handle
alias Handle = size_t
Undocumented in source.
handle
Handle handle;
Undocumented in source.
_mode
ModeFlags _mode;
Undocumented in source.
_syntax
Syntax _syntax;
Undocumented in source.
_detail
bool _detail;
Undocumented in source.
_skipData
bool _skipData;
Undocumented in source.
mnemonic
string mnemonic;
Undocumented in source.
callback
Callback callback;
Undocumented in source.
customMnemonics
string[int] customMnemonics;
Undocumented in source.
arch
Arch arch;

The architecture this Capstone instance is set up for

~this
~this()
Undocumented in source.
mode
auto mode [@property getter]

Gets the mode of interpretation

mode
ModeFlags mode [@property setter]

Sets the mode of interpretation

syntax
auto syntax [@property getter]

Gets the disassembly syntax variant

syntax
Syntax syntax [@property setter]

Sets the disassembly syntax variant

detail
auto detail [@property getter]

Indicates whether instructions will be disassembled in detail

detail
bool detail [@property setter]

Sets whether instructions will be disassembled in detail

skipData
auto skipData [@property getter]

Indicates whether SKIPDATA mode of operation is in use

skipData
bool skipData [@property setter]

Sets whether to use SKIPDATA mode of operation

setupSkipdata
void setupSkipdata(string mnemonic, Callback callback)

Customises behaviour in SKIPDATA mode of operation

disasm
const(Instruction)[] disasm(ubyte[] code, ulong address, size_t count)

Disassemble binary code, given the code buffer, start address and number of instructions to be decoded

disasmIter
InstructionRange disasmIter(ubyte[] code, ulong address)

Provides a range to iteratively disassemble binary code - one instruction at a time

Parameters

TInstructionId

The architecture-specific instruction identifier type

TInstruction

The architecture-specific instruction type

Meta