Represents a single disassembled instruction.
More...
Inherits BinNavi::APIHelpers::ApiObject< INaviInstruction >.
List of all members.
Detailed Description
An Instruction object represents a single instruction of a disassembled module.
Member Function Documentation
Adds an object that is notified about changes in the instruction.
- Parameters:
-
| listener | The listener object that is notified about changes in the instruction. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the listener argument is null. |
| IllegalStateException | Thrown if the listener object is already listening on the instruction. |
| static Instruction BinNavi.API.disassembly.Instruction.create |
( |
final Module |
module, |
|
|
final Address |
address, |
|
|
final String |
mnemonic, |
|
|
final List< Operand > |
operands, |
|
|
final byte[] |
data, |
|
|
final String |
architecture | |
|
) |
| | [static] |
Creates a new instruction which is part of this module. The new instruction is immediately stored in the database.
- Parameters:
-
| module | The module the instruction belongs to. |
| address | The address of the instruction. |
| mnemonic | The mnemonic of the instruction. |
| operands | The operands that belong to the instruction. |
| data | The binary data of the instruction. |
| architecture | The architecture of the instruction. |
- Returns:
- The created instruction object.
| Address BinNavi.API.disassembly.Instruction.getAddress |
( |
|
) |
|
Returns the address of the instruction.
- Returns:
- The address of the instruction.
| String BinNavi.API.disassembly.Instruction.getArchitecture |
( |
|
) |
|
Returns the architecture of the instruction.
- Returns:
- The architecture of the instruction.
| String BinNavi.API.disassembly.Instruction.getComment |
( |
|
) |
|
Returns the comment of the instruction. This comment is the string that is displayed in views as the global instruction comment of the instruction.
- Returns:
- The comment of the instruction.
| byte [] BinNavi.API.disassembly.Instruction.getData |
( |
|
) |
|
Returns the original bytes of the instruction.
- Returns:
- The original bytes of the instruction.
| String BinNavi.API.disassembly.Instruction.getMnemonic |
( |
|
) |
|
Returns the mnemonic of the instruction.
- Returns:
- The mnemonic of the instruction.
| List<Operand> BinNavi.API.disassembly.Instruction.getOperands |
( |
|
) |
|
Returns the operands of the instruction.
- Returns:
- The operands of the instruction.
Converts the instruction to REIL code.
Using this function over manual translation via ReilTranslator has the advantage that REIL translation results are automatically cached. Subsequent uses of this function requires no additional re-translation of the instruction provided that nothing relevant (like added/removed code nodes) changed.
- Returns:
- The REIL representation of the instruction.
- Exceptions:
-
| InternalTranslationException | Thrown if the REIL translation failed. |
Removes a listener object from the instruction.
- Parameters:
-
| listener | The listener object to remove from the instruction. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the listener argument is null. |
| IllegalStateException | Thrown if the listener object was not listening on the instruction. |
Changes the comment of the instruction. This comment is the string that is displayed in views as the global instruction comment of the instruction.
- Parameters:
-
| comment | The new comment of the instruction. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the comment argument is null. |
| CouldntSaveDataException | Thrown if the comment could not be changed. |
| String BinNavi.API.disassembly.Instruction.toString |
( |
|
) |
|
Returns the string representation of the instruction.
- Returns:
- The string representation of the instruction.