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

Segment comments are rarely used yet. More...

Functions

idaman DEPRECATED ssize_t ida_export get_segment_cmt (qstring *buf, const segment_t *s, bool repeatable)
 Get segment comment.
idaman ssize_t ida_export get_segment_cmt_by_ea (qstring *buf, ea_t ea, bool repeatable)
 Get segment comment by address.
idaman DEPRECATED void ida_export set_segment_cmt (const segment_t *s, const char *cmt, bool repeatable)
 Set segment comment.
idaman void ida_export set_segment_cmt_by_ea (ea_t ea, const char *cmt, bool repeatable)
 Set segment comment by address.
idaman DEPRECATED void ida_export std_out_segm_footer (struct outctx_t &ctx, segment_t *seg)
 Generate segment footer line as a comment line.
idaman void ida_export std_out_segment_footer (struct outctx_t &ctx, ea_t seg_ea)
 Generate segment footer line as a comment line by address.

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.

Function Documentation

◆ get_segment_cmt()

idaman DEPRECATED ssize_t ida_export get_segment_cmt ( qstring * buf,
const segment_t * s,
bool repeatable )

Get segment comment.

Deprecated
Use segment_info_t::get_cmt_reg() or segment_info_t::get_cmt_rpt() or get_segment_cmt_by_ea().
Parameters
bufbuffer for the comment
spointer to segment structure
repeatable0: get regular comment. 1: get repeatable comment.
Returns
size of comment or -1

◆ get_segment_cmt_by_ea()

idaman ssize_t ida_export get_segment_cmt_by_ea ( qstring * buf,
ea_t ea,
bool repeatable )

Get segment comment by address.

Parameters
bufbuffer for the comment
eaany address within the segment
repeatable0: get regular comment. 1: get repeatable comment.
Returns
size of comment or -1 if no segment at ea

◆ set_segment_cmt()

idaman DEPRECATED void ida_export set_segment_cmt ( const segment_t * s,
const char * cmt,
bool repeatable )

Set segment comment.

Deprecated
Use segment_info_t::set_cmt_reg() or segment_info_t::set_cmt_rpt() and set_segment_info() or set_segment_cmt_by_ea().
Parameters
spointer to segment structure
cmtcomment string, may be multiline (with '
'). maximal size is 4096 bytes. Use empty str ("") to delete comment
repeatable0: set regular comment. 1: set repeatable comment.

◆ set_segment_cmt_by_ea()

idaman void ida_export set_segment_cmt_by_ea ( ea_t ea,
const char * cmt,
bool repeatable )

Set segment comment by address.

Parameters
eaany address within the segment
cmtcomment string, may be multiline (with '
'). maximal size is 4096 bytes. Use empty str ("") to delete comment
repeatable0: set regular comment. 1: set repeatable comment.

◆ std_out_segm_footer()

idaman DEPRECATED void ida_export std_out_segm_footer ( struct outctx_t & ctx,
segment_t * seg )

Generate segment footer line as a comment line.

Deprecated
Use std_out_segment_footer() for safer access. This function may be used in IDP modules to generate segment footer if the target assembler doesn't have 'ends' directive.

◆ std_out_segment_footer()

idaman void ida_export std_out_segment_footer ( struct outctx_t & ctx,
ea_t seg_ea )

Generate segment footer line as a comment line by address.

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

Parameters
ctxoutput context
seg_eaany address within the segment