IDA SDK
|
Helper class for processor modules to build macro instructions. More...
#include <ua.hpp>
Public Member Functions | |
virtual bool idaapi | build_macro (insn_t *insn, bool may_go_forward)=0 |
Try to extend the instruction. More... | |
Address translation | |
The following functions can be used by processor modules to map addresses from one region to another. They are especially useful for microprocessors that map the same memory region to multiple address ranges or use memory bank switching. The user can use the following techniques to desribe address translations:
| |
bool | construct_macro (insn_t *insn, bool enable) |
Construct a macro instruction. More... | |
Public Attributes | |
size_t | reserved = 0 |
Helper class for processor modules to build macro instructions.
|
inline |
Construct a macro instruction.
This function may be called from ana() to generate a macro instruction.
The real work is done by the 'build_macro()' virtual function. It must be defined by the processor module.
construct_macro() modifies the database using the info provided by build_macro(). It verifies if the instruction can really be created (for example, that other items do not hinder), may plan to reanalyze the macro, etc. If the macro instructions are disabled by the user, construct_macro() will destroy the macro instruction. Note: if INSN_MODMAC is not set in insn.flags, the database will not be modified.
insn | the instruction to modify into a macro |
enable | enable macro generation |
true | the macro instruction is generated in 'insn' |
false | did not create a macro |
|
pure virtual |
Try to extend the instruction.
insn | Instruction to modify, usually the first instruction of the macro |
may_go_forward | Is it ok to consider the next instruction for the macro? This argument may be false, for example, if there is a cross reference to the end of INSN. In this case creating a macro is not desired. However, it may still be useful to perform minor tweaks to the instruction using the information about the surrounding instructions. |