IDA C++ SDK 9.2
Loading...
Searching...
No Matches
Color definitions

Here we describe the structure of embedded escape sequences used to implement syntax highlighting. More...

Topics

 Color escape characters
 Initiate/Terminate a color tag.
 Color tags
 Specify a color for a syntax item.
 Color string constants
 These definitions are used with the #COLSTR macro.
 Line prefix colors
 Note: line prefix colors are not used in processor modules.
 Convenience functions
 Higher level convenience functions are defined in ua.hpp.

Typedefs

typedef uchar color_t
 see <lines.hpp>

Detailed Description

Here we describe the structure of embedded escape sequences used to implement syntax highlighting.

The processor module should insert appropriate escape characters into the output lines as necessary.

A typical color sequence looks like this:

#COLOR_ON COLOR_xxx text #COLOR_OFF COLOR_xxx

The first 2 items turn color 'xxx' on, then the text follows, and the color is turned off by two last items. COLOR_INV and COLOR_ADDR does not have the closing COLOR_OFF part.

All non-space symbols must have a color code.

Color sequences may be nested.

Each instruction operand must have the COLOR_OPNDx color. For example: COLOR_OPND1. These color codes are used by IDA to determine the operand boundaries in the listing.

Example 1: lwz r28, FlexCan_rec.MB_ID(r3) With color codes (multiple lines just for the convenience of reading): [ON INSN]lwz[OFF INSN] [ON OPND1][ON REG]r28[OFF REG][OFF OPND1] [ON SYMBOL],[OFF SYMBOL] [ON OPND2][ON DNAME]FlexCan_rec.MB_ID[OFF DNAME] [ON SYMBOL]([OFF SYMBOL][ON REG]r3[OFF REG][ON SYMBOL])[OFF SYMBOL][OFF OPND2]

Example 2: bne loc_A0DA8C With color codes: [ON INSN]bne[OFF INSN] [ON OPND2][ON CODNAME] [ON ADDR]0000000000A0DA8Cloc_A0DA8C[OFF CODNAME][OFF OPND2]

Normally you should not construct the escape sequences manually. Use the helper functions like out_symbol(), out_long() or similar.

Typedef Documentation

◆ color_t

typedef uchar color_t

see <lines.hpp>

color tag - see Color tags