86#define SCOLOR_OFF "\2"
87#define SCOLOR_ESC "\3"
88#define SCOLOR_INV "\4"
162#define COLOR_ADDR_SIZE (sizeof(ea_t)*2)
167#define SCOLOR_DEFAULT "\x01"
168#define SCOLOR_REGCMT "\x02"
169#define SCOLOR_RPTCMT "\x03"
170#define SCOLOR_AUTOCMT "\x04"
171#define SCOLOR_INSN "\x05"
172#define SCOLOR_DATNAME "\x06"
173#define SCOLOR_DNAME "\x07"
174#define SCOLOR_DEMNAME "\x08"
175#define SCOLOR_SYMBOL "\x09"
176#define SCOLOR_CHAR "\x0A"
177#define SCOLOR_STRING "\x0B"
178#define SCOLOR_NUMBER "\x0C"
179#define SCOLOR_VOIDOP "\x0D"
180#define SCOLOR_CREF "\x0E"
181#define SCOLOR_DREF "\x0F"
182#define SCOLOR_CREFTAIL "\x10"
183#define SCOLOR_DREFTAIL "\x11"
184#define SCOLOR_ERROR "\x12"
185#define SCOLOR_PREFIX "\x13"
186#define SCOLOR_BINPREF "\x14"
187#define SCOLOR_EXTRA "\x15"
188#define SCOLOR_ALTOP "\x16"
189#define SCOLOR_HIDNAME "\x17"
190#define SCOLOR_LIBNAME "\x18"
191#define SCOLOR_LOCNAME "\x19"
192#define SCOLOR_CODNAME "\x1A"
193#define SCOLOR_ASMDIR "\x1B"
194#define SCOLOR_MACRO "\x1C"
195#define SCOLOR_DSTR "\x1D"
196#define SCOLOR_DCHAR "\x1E"
197#define SCOLOR_DNUM "\x1F"
198#define SCOLOR_KEYWORD "\x20"
199#define SCOLOR_REG "\x21"
200#define SCOLOR_IMPNAME "\x22"
201#define SCOLOR_SEGNAME "\x23"
202#define SCOLOR_UNKNAME "\x24"
203#define SCOLOR_CNAME "\x25"
204#define SCOLOR_UNAME "\x26"
205#define SCOLOR_COLLAPSED "\x27"
206#define SCOLOR_ADDR "\x28"
213#define COLOR_DEFAULT 0x01
214#define COLOR_SELECTED 0x02
215#define COLOR_LIBFUNC 0x03
216#define COLOR_REGFUNC 0x04
217#define COLOR_CODE 0x05
218#define COLOR_DATA 0x06
219#define COLOR_UNKNOWN 0x07
220#define COLOR_EXTERN 0x08
221#define COLOR_CURITEM 0x09
222#define COLOR_CURLINE 0x0A
223#define COLOR_HIDLINE 0x0B
224#define COLOR_LUMFUNC 0x0C
225#define COLOR_BG_MAX 0x0D
227#define PALETTE_SIZE (COLOR_FG_MAX+COLOR_BG_MAX)
234#define COLSTR(str,tag) SCOLOR_ON tag str SCOLOR_OFF tag
259idaman THREAD_SAFE
const char *ida_export
tag_advance(
const char *line,
int cnt);
277idaman THREAD_SAFE
const char *ida_export
tag_skipcode(
const char *line);
412 const class insn_t &insn,
415 const char *line) = 0;
497idaman
int ida_export generate_disassembly(
504#define GDISMF_AS_STACK (1 << 0)
505#define GDISMF_ADDR_TAG (1 << 1)
506#define GDISMF_REMOVE_TAGS (1 << 2)
507#define GDISMF_UNHIDE (1 << 3)
513idaman
bool ida_export generate_disasm_line(
517#define GENDSM_FORCE_CODE (1 << 0)
519#define GENDSM_MULTI_LINE (1 << 1)
521#define GENDSM_REMOVE_TAGS (1 << 2)
522#define GENDSM_UNHIDE (1 << 3)
526idaman
int ida_export get_last_pfxlen();
533idaman
const char *ida_export closing_comment();
540const int E_PREV = 1000;
541const int E_NEXT = 2000;
543idaman
int ida_export get_first_free_extra_cmtidx(
ea_t ea,
int start);
544idaman
bool ida_export update_extra_cmt(
ea_t ea,
int what,
const char *str);
545idaman
bool ida_export del_extra_cmt(
ea_t ea,
int what);
547idaman
void ida_export delete_extra_cmts(
ea_t ea,
int what);
549idaman
ea_t ida_export align_down_to_stack(
ea_t newea);
550idaman
ea_t ida_export align_up_to_stack(
ea_t ea1,
ea_t ea2=BADADDR);
565 virtual ~encoder_t() {}
566 virtual bool idaapi get_bom(
bytevec_t *out)
const = 0;
572 virtual bool idaapi encode(
qstring *s)
const = 0;
576 AS_PRINTF(3, 4) virtual
bool idaapi print(FILE *out, const
char *
format, ...) const = 0;
581 virtual
bool idaapi requires_binary_mode() const = 0;
592idaman encoder_t *ida_export create_encoding_helper(
594 encoder_t::notify_recerr_t nr=encoder_t::nr_once);
598typedef
int idaapi html_header_cb_t(FILE *fp);
599typedef
int idaapi html_footer_cb_t(FILE *fp);
600typedef
int idaapi html_line_cb_t(
605#define gen_outline_t html_line_cb_t
bool empty(void) const
Does the qstring have 0 non-null elements?
Definition pro.h:3168
iterator begin(void)
Get a pointer to the beginning of the qstring.
Definition pro.h:3177
const qchar * c_str(void) const
Convert the qstring to a char *.
Definition pro.h:3170
const color_t COLOR_OPND4
Instruction operand 4.
Definition lines.hpp:150
const color_t COLOR_MACRO
Macro.
Definition lines.hpp:126
const color_t COLOR_OPND2
Instruction operand 2.
Definition lines.hpp:148
const color_t COLOR_AUTOCMT
Automatic comment.
Definition lines.hpp:102
const color_t COLOR_CODNAME
Dummy code name.
Definition lines.hpp:124
const color_t COLOR_DNAME
Regular Data Name.
Definition lines.hpp:105
const color_t COLOR_RESERVED1
This tag is reserved for internal IDA use.
Definition lines.hpp:157
const color_t COLOR_REGCMT
Regular comment.
Definition lines.hpp:100
const color_t COLOR_DEMNAME
Demangled Name.
Definition lines.hpp:106
const color_t COLOR_IMPNAME
Imported name.
Definition lines.hpp:132
const color_t COLOR_NUMBER
Numeric constant in instruction.
Definition lines.hpp:110
const color_t COLOR_FG_MAX
Max color number.
Definition lines.hpp:138
const color_t COLOR_BINPREF
Binary line prefix bytes.
Definition lines.hpp:118
const color_t COLOR_RPTCMT
Repeatable comment (comment defined somewhere else)
Definition lines.hpp:101
const color_t COLOR_COLLAPSED
Collapsed line.
Definition lines.hpp:137
const color_t COLOR_DATNAME
Dummy Data Name.
Definition lines.hpp:104
const color_t COLOR_OPND3
Instruction operand 3.
Definition lines.hpp:149
const color_t COLOR_CREFTAIL
Code reference to tail byte.
Definition lines.hpp:114
const color_t COLOR_ASMDIR
Assembler directive.
Definition lines.hpp:125
const color_t COLOR_REG
Register name.
Definition lines.hpp:131
const color_t COLOR_KEYWORD
Keywords.
Definition lines.hpp:130
const color_t COLOR_UNKNAME
Dummy unknown name.
Definition lines.hpp:134
const color_t COLOR_STRING
String constant in instruction.
Definition lines.hpp:109
const color_t COLOR_LIBNAME
Library function name.
Definition lines.hpp:122
const color_t COLOR_EXTRA
Extra line.
Definition lines.hpp:119
const color_t COLOR_OPND8
Instruction operand 8.
Definition lines.hpp:154
const color_t COLOR_CHAR
Char constant in instruction.
Definition lines.hpp:108
const color_t COLOR_PREFIX
Line prefix.
Definition lines.hpp:117
const color_t COLOR_LOCNAME
Local variable name.
Definition lines.hpp:123
const color_t COLOR_VOIDOP
Void operand.
Definition lines.hpp:111
const color_t COLOR_DREF
Data reference.
Definition lines.hpp:113
const color_t COLOR_SEGNAME
Segment name.
Definition lines.hpp:133
const color_t COLOR_DSTR
String constant in data directive.
Definition lines.hpp:127
const color_t COLOR_DCHAR
Char constant in data directive.
Definition lines.hpp:128
const color_t COLOR_OPND7
Instruction operand 7.
Definition lines.hpp:153
const color_t COLOR_OPND6
Instruction operand 6.
Definition lines.hpp:152
const color_t COLOR_CREF
Code reference.
Definition lines.hpp:112
const color_t COLOR_HIDNAME
Hidden name.
Definition lines.hpp:121
const color_t COLOR_CNAME
Regular code name.
Definition lines.hpp:135
const color_t COLOR_ALTOP
Alternative operand.
Definition lines.hpp:120
const color_t COLOR_UNAME
Regular unknown name.
Definition lines.hpp:136
const color_t COLOR_DREFTAIL
Data reference to tail byte.
Definition lines.hpp:115
const color_t COLOR_ADDR
Hidden address marks.
Definition lines.hpp:142
const color_t COLOR_OPND1
Instruction operand 1.
Definition lines.hpp:147
const color_t COLOR_DEFAULT
Default.
Definition lines.hpp:99
const color_t COLOR_OPND5
Instruction operand 5.
Definition lines.hpp:151
const color_t COLOR_SYMBOL
Punctuation.
Definition lines.hpp:107
const color_t COLOR_INSN
Instruction.
Definition lines.hpp:103
const color_t COLOR_ERROR
Error or problem.
Definition lines.hpp:116
const color_t COLOR_DNUM
Numeric constant in data directive.
Definition lines.hpp:129
const color_t COLOR_LUMINA
Lumina-related, only for the navigation band.
Definition lines.hpp:158
idaman THREAD_SAFE ssize_t ida_export tag_strlen(const char *line)
Calculate length of a colored string This function computes the length in unicode codepoints of a lin...
idaman THREAD_SAFE ssize_t ida_export tag_remove(qstring *buf, const char *str, int init_level=0)
Remove color escape sequences from a string.
idaman THREAD_SAFE void ida_export tag_addr(qstring *buf, ea_t ea, bool ins=false)
Insert an address mark into a string.
idaman THREAD_SAFE const char *ida_export tag_skipcode(const char *line)
Skip one color code.
idaman THREAD_SAFE const char *ida_export tag_advance(const char *line, int cnt)
Move pointer to a 'line' to 'cnt' positions right.
idaman THREAD_SAFE const char *ida_export tag_skipcodes(const char *line)
Move the pointer past all color codes.
uchar color_t
see <lines.hpp>
Definition kernwin.hpp:26
THREAD_SAFE bool requires_color_esc(char c)
Is the given char a color escape character?
Definition lines.hpp:91
idaman THREAD_SAFE va_list va
See qsscanf()
Definition err.h:21
idaman THREAD_SAFE const char * format
Definition fpro.h:78
idaman THREAD_SAFE AS_PRINTF(1, 0) void ida_export vqperror(const char *format
Print error message to stderr (analog of perror)
Contains the inf structure definition and some functions common to the whole IDA project.
ea_t inf_get_min_ea()
Definition ida.hpp:794
bool ok
Definition kernwin.hpp:7006
bool const char va_start(va, format)
idaman const char *ida_export get_sourcefile(ea_t ea, range_t *bounds=nullptr)
Get name of source file occupying the given address.
idaman AS_PRINTF(3, 0) bool ida_export vadd_extra_line(ea_t ea
See higher level functions below.
idaman int vel_flags
Definition lines.hpp:431
idaman bool ida_export add_sourcefile(ea_t ea1, ea_t ea2, const char *filename)
Mark a range of address as belonging to a source file.
bool isprev
Definition lines.hpp:445
idaman color_t ida_export calc_prefix_color(ea_t ea)
Get prefix color for line at 'ea'.
idaman bool ida_export install_user_defined_prefix(size_t prefix_len, struct user_defined_prefix_t *udp, const void *owner)
User-defined line-prefixes are displayed just after the autogenerated line prefixes in the disassembl...
idaman bgcolor_t ida_export calc_bg_color(ea_t ea)
Get background color for line at 'ea'.
idaman bool ida_export del_sourcefile(ea_t ea)
Delete information about the source file.
int bool
Definition pro.h:329
uint32 bgcolor_t
background color in RGB
Definition pro.h:5012
uint64 ea_t
Definition pro.h:421
struct bytevec_tag bytevec_t
Definition pro.h:4665
unsigned char uchar
unsigned 8 bit value
Definition pro.h:337
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:381
_qstring< char > qstring
regular string
Definition pro.h:3694
qvector< qstring > qstrvec_t
vector of strings
Definition pro.h:3697
Base class for an range.
Definition range.hpp:35
Class to generate user-defined prefixes in the disassembly listing.
Definition lines.hpp:382
virtual idaapi ~user_defined_prefix_t()
Destroying a user-defined prefix object uninstalls it.
Definition lines.hpp:390
virtual void idaapi get_user_defined_prefix(qstring *vout, ea_t ea, const class insn_t &insn, int lnnum, int indent, const char *line)=0
This callback must be overridden by the derived class.
user_defined_prefix_t(size_t prefix_len, const void *owner)
Creating a user-defined prefix object installs it.
Definition lines.hpp:384