IDA SDK

- Main Page
- Header Files
- Classes
- Modules

Functions
Segment classes and types
Segments

## Detailed Description

See Segment types.

## Functions
idaman ssize_t ida_export | get_segm_class (const segment_t *s, char *buf, size_t bufsize)
| Get segment class. More...
idaman int ida_export | set_segm_class (segment_t *s, const char *sclass)
| Set segment class. More...
idaman uchar ida_export | segtype (ea_t ea)
| Get segment type. More...

## Function Documentation

idaman ssize_t ida_export get_segm_class | ( | const segment_t * | s,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |

Get segment class.

Segment class is arbitrary text (max 8 characters).

Parameters

  s | pointer to segment
  buf | output buffer. can not be NULL.
  bufsize | output buffersize

Returns
  size of segment class (-1 if s==NULL or bufsize<=0)

idaman int ida_export set_segm_class | ( | segment_t * | s,
|  | const char * | sclass
| ) |  |

Set segment class.

Parameters

  s | pointer to segment (may be NULL)
  sclass | segment class (may be NULL). If segment type is SEG_NORM and segment class is one of predefined names, then segment type is changed to: "CODE" -> SEG_CODE "DATA" -> SEG_DATA "STACK" -> SEG_BSS "BSS" -> SEG_BSS if "UNK" then segment type is reset to SEG_NORM.

Return values

  1 | ok, name is good and segment is renamed
  0 | failure, name is NULL or bad or segment is NULL

idaman uchar ida_export segtype | ( | ea_t | ea | ) |

Get segment type.

Parameters

  ea | any linear address within the segment

Returns
  Segment types, SEG_UNDF if no segment found at 'ea'