IDA C++ SDK 9.2
Loading...
Searching...
No Matches
Segment addressing

Functions

idaman DEPRECATED ea_t ida_export get_segm_para (const segment_t *s)
 Get segment base paragraph.
idaman ea_t ida_export get_segment_para (ea_t ea)
 Get segment base paragraph by address.
idaman DEPRECATED ea_t ida_export get_segm_base (const segment_t *s)
 Get segment base linear address.
idaman ea_t ida_export get_segment_base (ea_t ea)
 Get segment base linear address by address.
idaman DEPRECATED bool ida_export set_segm_addressing (segment_t *s, size_t bitness)
 Change segment addressing mode (16, 32, 64 bits).
idaman bool ida_export set_segment_addressing (ea_t ea, size_t bitness)
 Change segment addressing mode (16, 32, 64 bits) by address.
idaman bool ida_export is_same_segment (ea_t ea1, ea_t ea2)
 Check two addresses belong to one segment.

Detailed Description

Function Documentation

◆ get_segm_para()

idaman DEPRECATED ea_t ida_export get_segm_para ( const segment_t * s)

Get segment base paragraph.

Deprecated
Use segment_info_t::para() or get_segment_para() for safer access. Segment base paragraph may be converted to segment base linear address using to_ea() function. In fact, to_ea(get_segm_para(s), 0) == get_segm_base(s).
Parameters
spointer to segment
Returns
0 if s == nullptr, the segment base paragraph

◆ get_segment_para()

idaman ea_t ida_export get_segment_para ( ea_t ea)

Get segment base paragraph by address.

Segment base paragraph may be converted to segment base linear address using to_ea() function.

Parameters
eaany linear address within the segment
Returns
0 if no segment at ea, otherwise the segment base paragraph

◆ get_segm_base()

idaman DEPRECATED ea_t ida_export get_segm_base ( const segment_t * s)

Get segment base linear address.

Deprecated
Use segment_info_t::base() or get_segment_base() for safer access. Segment base linear address is used to calculate virtual addresses. The virtual address of the first byte of the segment will be (start address of segment - segment base linear address)
Parameters
spointer to segment
Returns
0 if s == nullptr, otherwise segment base linear address

◆ get_segment_base()

idaman ea_t ida_export get_segment_base ( ea_t ea)

Get segment base linear address by address.

Segment base linear address is used to calculate virtual addresses. The virtual address of the first byte of the segment will be (start address of segment - segment base linear address)

Parameters
eaany linear address within the segment
Returns
0 if no segment at ea, otherwise segment base linear address

◆ set_segm_addressing()

idaman DEPRECATED bool ida_export set_segm_addressing ( segment_t * s,
size_t bitness )

Change segment addressing mode (16, 32, 64 bits).

You must use this function to change segment addressing, never change the 'bitness' field directly. This function will delete all instructions, comments and names in the segment

Deprecated
Use segment_info_t::set_bitness() and set_segment_info() or set_segment_addressing().
Parameters
spointer to segment
bitnessnew addressing mode of segment
  • 2: 64-bit segment
  • 1: 32-bit segment
  • 0: 16-bit segment
Returns
success

◆ set_segment_addressing()

idaman bool ida_export set_segment_addressing ( ea_t ea,
size_t bitness )

Change segment addressing mode (16, 32, 64 bits) by address.

You must use this function to change segment addressing, never change the 'bitness' field directly. This function will delete all instructions, comments and names in the segment

Parameters
eaany address within the segment
bitnessnew addressing mode of segment
  • 2: 64-bit segment
  • 1: 32-bit segment
  • 0: 16-bit segment
Returns
success

◆ is_same_segment()

idaman bool ida_export is_same_segment ( ea_t ea1,
ea_t ea2 )

Check two addresses belong to one segment.

Parameters
ea1linear address
ea2linear address
Returns
true if two addresses belong to one segment or they both are not belong to any segment