|
IDA C++ SDK 9.2
|
Topics | |
| Move segment result codes | |
| Return values for move_segm() add rebase_program() | |
| Move segment flags | |
| Passed as 'flags' parameter to move_segm() and rebase_program() | |
| Change segment status result codes | |
| Return values for change_segment_status() | |
| Snapshot types | |
| Specifies which segments should be included in the snapshot. | |
Functions | |
| idaman bool ida_export | set_segm_end (ea_t ea, ea_t newend, int flags) |
| Set segment end address. | |
| idaman bool ida_export | set_segm_start (ea_t ea, ea_t newstart, int flags) |
| Set segment start address. | |
| idaman bool ida_export | move_segm_start (ea_t ea, ea_t newstart, int mode) |
| Move segment start. | |
| idaman const char *ida_export | move_segm_strerror (move_segm_code_t code) |
| Return string describing error MOVE_SEGM_... code. | |
| idaman DEPRECATED move_segm_code_t ida_export | move_segm (segment_t *s, ea_t to, int flags=0) |
| This function moves all information to the new address. | |
| idaman move_segm_code_t ida_export | move_segment (ea_t seg_ea, ea_t to, int flags=0) |
| Move segment to a new address. | |
| idaman move_segm_code_t ida_export | rebase_program (adiff_t delta, int flags) |
| Rebase the whole program by 'delta' bytes. | |
| idaman DEPRECATED int ida_export | change_segment_status (segment_t *s, bool is_deb_segm) |
| Convert a debugger segment to a regular segment and vice versa. | |
| idaman int ida_export | change_segment_status_by_ea (ea_t ea, bool is_deb_segm) |
| Convert a debugger segment to a regular segment and vice versa by address. | |
| idaman bool ida_export | take_memory_snapshot (int type) |
| Take a memory snapshot of the running process. | |
| idaman bool ida_export | is_miniidb () |
| Is the database a miniidb created by the debugger? | |
| idaman DEPRECATED bool ida_export | set_segm_base (segment_t *s, ea_t newbase) |
| Internal function. | |
| idaman bool ida_export | set_segment_base_ea (ea_t seg_ea, ea_t newbase) |
| Set segment base. | |
Set segment end address.
The next segment is shrinked to allow expansion of the specified segment. The kernel might even delete the next segment if necessary. The kernel will ask the user for a permission to destroy instructions or data going out of segment scope if such instructions exist.
| ea | any address belonging to the segment |
| newend | new end address of the segment |
| flags | Segment modification flags |
| 1 | ok |
| 0 | failed, a warning message is displayed |
Set segment start address.
The previous segment is trimmed to allow expansion of the specified segment. The kernel might even delete the previous segment if necessary. The kernel will ask the user for a permission to destroy instructions or data going out of segment scope if such instructions exist.
| ea | any address belonging to the segment |
| newstart | new start address of the segment note that segment start address should be higher than segment base linear address. |
| flags | Segment modification flags |
| 1 | ok |
| 0 | failed, a warning message is displayed |
Move segment start.
The main difference between this function and set_segm_start() is that this function may expand the previous segment while set_segm_start() never does it. So, this function allows to change bounds of two segments simultaneously. If the previous segment and the specified segment have the same addressing mode and segment base, then instructions and data are not destroyed - they simply move from one segment to another. Otherwise all instructions/data which migrate from one segment to another are destroyed.
| ea | any address belonging to the segment |
| newstart | new start address of the segment note that segment start address should be higher than segment base linear address. |
| mode | policy for destroying defined items
|
| 1 | ok |
| 0 | failed, a warning message is displayed |
| idaman const char *ida_export move_segm_strerror | ( | move_segm_code_t | code | ) |
Return string describing error MOVE_SEGM_... code.
| idaman DEPRECATED move_segm_code_t ida_export move_segm | ( | segment_t * | s, |
| ea_t | to, | ||
| int | flags = 0 ) |
This function moves all information to the new address.
| s | segment to move |
| to | new segment start address |
| flags | Move segment flags |
| idaman move_segm_code_t ida_export move_segment | ( | ea_t | seg_ea, |
| ea_t | to, | ||
| int | flags = 0 ) |
Move segment to a new address.
It fixes up address sensitive information in the kernel. The total effect is equal to reloading the segment to the target address. For the file format dependent address sensitive information, loader_t::move_segm is called. Also IDB notification event idb_event::segm_moved is called.
| seg_ea | any address within the segment to move |
| to | new segment start address |
| flags | Move segment flags |
| idaman move_segm_code_t ida_export rebase_program | ( | adiff_t | delta, |
| int | flags ) |
Rebase the whole program by 'delta' bytes.
| delta | number of bytes to move the program |
| flags | Move segment flags it is recommended to use #MSF_FIXONCE so that the loader takes care of global variables it stored in the database |
Convert a debugger segment to a regular segment and vice versa.
| s | segment to modify |
| is_deb_segm | new status of the segment |
Convert a debugger segment to a regular segment and vice versa by address.
When converting debug->regular, the memory contents will be copied to the database.
| ea | any address within the segment |
| is_deb_segm | new status of the segment |
Take a memory snapshot of the running process.
| type | specifies which snapshot we want (see SNAP_ Snapshot types) |
| idaman bool ida_export is_miniidb | ( | ) |
Is the database a miniidb created by the debugger?
Internal function.