IDA C++ SDK 9.2
|
Used to represent overlayed memory banks. More...
Functions | |
idaman bool ida_export | add_segment_translation (ea_t segstart, ea_t mappedseg) |
Add segment translation. | |
idaman bool ida_export | set_segment_translations (ea_t segstart, const eavec_t &transmap) |
Set new translation list. | |
idaman void ida_export | del_segment_translations (ea_t segstart) |
Delete the translation list. | |
idaman ssize_t ida_export | get_segment_translations (eavec_t *transmap, ea_t segstart) |
Get segment translation list. |
Used to represent overlayed memory banks.
Segment translations are used to redirect access to overlayed segments so that the correct overlay is accessed. Each segment has its own translation list. For example, suppose we have four segments:
A 1000-2000 B 1000-2000 C 2000-3000 D 2000-3000
A and B occupy the same virtual addresses. The same with C and D. Segment A works with segment C, segment B works with segment D.
So all references from A to 2000-3000 should go to C. For this we add translation C for segment A. The same with B,D: add translation D for segment B. Also, we need to specify the correct segment to be accessed from C, thus we add translation A for segment C. And we add translation B for segment D.
After this, all references to virtual addresses 2000-3000 made from A go to segment C (even if segment A would be large and occupy 1000-3000) So, we need the following translations:
A: C B: D C: A D: B
With translations, the segments may reside at any linear addresses, all references will pass through the translation mechanism and go to the correct segment.
Segment translation works only for code segments (see map_code_ea())
Add segment translation.
segstart | start address of the segment to add translation to |
mappedseg | start address of the overlayed segment |
1 | ok |
0 | too many translations or bad segstart |
Set new translation list.
segstart | start address of the segment to add translation to |
transmap | vector of segment start addresses for the translation list. If transmap is empty, the translation list is deleted. |
1 | ok |
0 | too many translations or bad segstart |
Delete the translation list.
segstart | start address of the segment to delete translation list |
Get segment translation list.
transmap | vector of segment start addresses for the translation list |
segstart | start address of the segment to get information about |