IDA SDK

- Main Page
- Header Files
- Classes
- Modules

Functions
Segment comments
Segments

## Detailed Description

Segment comments are rarely used yet.

The user may define a segment comment by pressing ':' while standing on the segment name at the segment start.

The main advantage of segment comments compared to anterior lines (see lines.hpp) is that they are attached to a segment, not to an address and they will move with the start of segment if the segment boundaries change.

You may set segment comments in your LDR module to describe characteristics of a segment in comments.

Repeatable segment comments are not used at all, because I don't know where they should be repeated.

## Functions
char * | get_segment_cmt (const segment_t *s, bool repeatable)
| Get segment comment. More...
void | set_segment_cmt (segment_t *s, const char *cmt, bool repeatable)
| Set segment comment. More...
void | del_segment_cmt (segment_t *s, bool repeatable)
| Delete segment comment. More...
idaman void ida_export | std_gen_segm_footer (ea_t ea)
| Generate segment footer line as a comment line. More...

## Function Documentation

char* get_segment_cmt | ( | const segment_t * | s,
|  | bool | repeatable
| ) |  |
| inline

Get segment comment.

Parameters

  s | pointer to segment structure
  repeatable | 0: get regular comment. 1: get repeatable comment.

Returns
  NULL or segment comment (The caller must qfree() the result)

void set_segment_cmt | ( | segment_t * | s,
|  | const char * | cmt,
|  | bool | repeatable
| ) |  |
| inline

Set segment comment.

Parameters

  s | pointer to segment structure
  cmt | comment string, may be multiline (with ' '). maximal size is 4096 bytes.
  repeatable | 0: set regular comment. 1: set repeatable comment.

void del_segment_cmt | ( | segment_t * | s,
|  | bool | repeatable
| ) |  |
| inline

Delete segment comment.

Parameters

  s | pointer to segment structure
  repeatable | 0: delete regular comment. 1: delete repeatable comment.

idaman void ida_export std_gen_segm_footer | ( | ea_t | ea | ) |

Generate segment footer line as a comment line.

This function may be used in IDP modules to generate segment footer if the target assembler doesn't have 'ends' directive.