IDAPython 9.0
Loading...
Searching...
No Matches
outctx_base_t Class Reference
Inheritance diagram for outctx_base_t:
outctx_t

Public Member Functions

 __init__ (self, *args, **kwargs)
 
bool only_main_line (self)
 
bool multiline (self)
 
bool force_code (self)
 
bool stack_view (self)
 
bool display_voids (self)
 
None set_gen_xrefs (self, bool on=True)
 
None set_gen_cmt (self, bool on=True)
 
None clr_gen_label (self)
 
None set_gen_label (self)
 
None set_gen_demangled_label (self)
 
None set_comment_addr (self, ida_idaapi.ea_t ea)
 
None set_dlbind_opnd (self)
 
bool print_label_now (self)
 
int forbid_annotations (self)
 
None restore_ctxflags (self, int saved_flags)
 
'size_t' out_printf (self, str format)
 
'flags64_t' out_value (self, 'op_t' x, int outf=0)
 
None out_symbol (self, 'char' c)
 
None out_chars (self, 'char' c, int n)
 
None out_spaces (self, 'ssize_t' len)
 
None out_line (self, str str, 'color_t' color=0)
 
None out_keyword (self, str str)
 
None out_register (self, str str)
 
None out_lvar (self, str name, int width=-1)
 
None out_tagon (self, 'color_t' tag)
 
None out_tagoff (self, 'color_t' tag)
 
None out_addr_tag (self, ida_idaapi.ea_t ea)
 
None out_colored_register_line (self, str str)
 
None out_char (self, 'char' c)
 
None out_btoa (self, int Word, 'char' radix=0)
 
None out_long (self, int v, 'char' radix)
 
bool out_name_expr (self, *args)
 
None close_comment (self)
 
bool flush_outbuf (self, int indent=-1)
 
bool flush_buf (self, str buf, int indent=-1)
 
int term_outctx (self, str prefix=None)
 
bool gen_printf (self, int indent, str format)
 
bool gen_empty_line (self)
 
bool gen_border_line (self, bool solid=False)
 
bool gen_cmt_line (self, str format)
 
bool gen_collapsed_line (self, str format)
 
bool gen_block_cmt (self, str cmt, 'color_t' color)
 
None setup_outctx (self, str prefix, int makeline_flags)
 
'ssize_t' retrieve_cmt (self)
 
'ssize_t' retrieve_name (self, str arg2, 'color_t *' arg3)
 
bool gen_xref_lines (self)
 
None init_lines_array (self, 'qstrvec_t *' answers, int maxsize)
 
'ssize_t' get_stkvar (self, 'op_t' x, int v, 'sval_t *' vv, 'int *' is_sp_based, 'tinfo_t' _frame)
 
None gen_empty_line_without_annotations (self)
 
'flags64_t' getF (self)
 

Static Public Attributes

str insn_ea
 
str outbuf
 
str F32
 
str default_lnnum
 

Properties

 thisown
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Reimplemented in outctx_t.

Member Function Documentation

◆ close_comment()

None close_comment ( self)

◆ clr_gen_label()

None clr_gen_label ( self)

◆ display_voids()

bool display_voids ( self)

◆ flush_buf()

bool flush_buf ( self,
str buf,
int indent = -1 )
Append contents of 'buf' to the line array. Behaves like flush_outbuf but accepts an arbitrary buffer 

◆ flush_outbuf()

bool flush_outbuf ( self,
int indent = -1 )
------------------------------------------------------------------------- Functions to populate the output line array (lnar) Move the contents of the output buffer to the line array (outbuf->lnar) The kernel augments the outbuf contents with additional text like the line prefix, user-defined comments, xrefs, etc at this call. 

◆ forbid_annotations()

int forbid_annotations ( self)

◆ force_code()

bool force_code ( self)

◆ gen_block_cmt()

bool gen_block_cmt ( self,
str cmt,
'color_t' color )
Generate big non-indented comment lines. 

@param cmt: comment text. may contain \\n characters to denote new lines. should not contain comment character (;)
@param color: color of comment text (one of Color tags)
@returns overflow, lnar_maxsize has been reached

◆ gen_border_line()

bool gen_border_line ( self,
bool solid = False )
Generate thin border line. This function does nothing if generation of border lines is disabled. 

@param solid: generate solid border line (with =), otherwise with -
@returns overflow, lnar_maxsize has been reached

◆ gen_cmt_line()

bool gen_cmt_line ( self,
str format )
Generate one non-indented comment line, colored with COLOR_AUTOCMT. 

@param format: printf() style format line. The resulting comment line should not include comment character (;)
@returns overflow, lnar_maxsize has been reached

◆ gen_collapsed_line()

bool gen_collapsed_line ( self,
str format )
Generate one non-indented comment line, colored with COLOR_COLLAPSED. 

@param format: printf() style format line. The resulting comment line should not include comment character (;)
@returns overflow, lnar_maxsize has been reached

◆ gen_empty_line()

bool gen_empty_line ( self)
Generate empty line. This function does nothing if generation of empty lines is disabled. 

@returns overflow, lnar_maxsize has been reached

◆ gen_empty_line_without_annotations()

None gen_empty_line_without_annotations ( self)

◆ gen_printf()

bool gen_printf ( self,
int indent,
str format )
printf-like function to add lines to the line array. 

@param indent: indention of the line. if indent == -1, the kernel will indent the line at idainfo::indent. if indent < 0, -indent will be used for indention. The first line printed with indent < 0 is considered as the most important line at the current address. Usually it is the line with the instruction itself. This line will be displayed in the cross-reference lists and other places. If you need to output an additional line before the main line then pass DEFAULT_INDENT instead of -1. The kernel will know that your line is not the most important one.
@param format: printf style colored line to generate
@returns overflow, lnar_maxsize has been reached

◆ gen_xref_lines()

bool gen_xref_lines ( self)

Reimplemented in outctx_t.

◆ get_stkvar()

'ssize_t' get_stkvar ( self,
'op_t' x,
int v,
'sval_t *' vv,
'int *' is_sp_based,
'tinfo_t' _frame )

◆ getF()

'flags64_t' getF ( self)

◆ init_lines_array()

None init_lines_array ( self,
'qstrvec_t *' answers,
int maxsize )

◆ multiline()

bool multiline ( self)

◆ only_main_line()

bool only_main_line ( self)

◆ out_addr_tag()

None out_addr_tag ( self,
ida_idaapi.ea_t ea )
Output "address" escape sequence.

◆ out_btoa()

None out_btoa ( self,
int Word,
'char' radix = 0 )
Output a number with the specified base (binary, octal, decimal, hex) The number is output without color codes. see also out_long() 

Reimplemented in outctx_t.

◆ out_char()

None out_char ( self,
'char' c )
Output one character. The character is output without color codes. see also out_symbol() 

◆ out_chars()

None out_chars ( self,
'char' c,
int n )
Append a character multiple times.

◆ out_colored_register_line()

None out_colored_register_line ( self,
str str )
Output a colored line with register names in it. The register names will be substituted by user-defined names (regvar_t) Please note that out_tagoff tries to make substitutions too (when called with COLOR_REG) 

◆ out_keyword()

None out_keyword ( self,
str str )
Output a string with COLOR_KEYWORD color.

◆ out_line()

None out_line ( self,
str str,
'color_t' color = 0 )
Output a string with the specified color.

◆ out_long()

None out_long ( self,
int v,
'char' radix )
Output a number with appropriate color. Low level function. Use out_value() if you can. if 'suspop' is set then this function uses COLOR_VOIDOP instead of COLOR_NUMBER. 'suspop' is initialized:
* in out_one_operand()
* in ..\\ida\\gl.cpp (before calling processor_t::d_out())



@param v: value to output
@param radix: base (2,8,10,16)

◆ out_lvar()

None out_lvar ( self,
str name,
int width = -1 )
Output local variable name with COLOR_LOCNAME color.

◆ out_name_expr()

bool out_name_expr ( self,
* args )
Output a name expression. 

@param x: instruction operand referencing the name expression
@param ea: address to convert to name expression
@param off: the value of name expression. this parameter is used only to check that the name expression will have the wanted value. You may pass BADADDR for this parameter but I discourage it because it prohibits checks.
@returns true if the name expression has been produced

◆ out_printf()

'size_t' out_printf ( self,
str format )
------------------------------------------------------------------------- Functions to append text to the current output buffer (outbuf) Append a formatted string to the output string. 

@returns the number of characters appended

◆ out_register()

None out_register ( self,
str str )
Output a character with COLOR_REG color.

◆ out_spaces()

None out_spaces ( self,
'ssize_t' len )
Appends spaces to outbuf until its tag_strlen becomes 'len'.

◆ out_symbol()

None out_symbol ( self,
'char' c )
Output a character with COLOR_SYMBOL color.

◆ out_tagoff()

None out_tagoff ( self,
'color_t' tag )
Output "turn color off" escape sequence.

◆ out_tagon()

None out_tagon ( self,
'color_t' tag )
Output "turn color on" escape sequence.

◆ out_value()

'flags64_t' out_value ( self,
'op_t' x,
int outf = 0 )
Output immediate value. Try to use this function to output all constants of instruction operands. This function outputs a number from x.addr or x.value in the form determined by F. It outputs colored text. 

@param x: value to output
@param outf: Output value flags
@returns flags of the output value, otherwise:
@retval -1: if printed a number with COLOR_ERROR
@retval 0: if printed a nice number or character or segment or enum

◆ print_label_now()

bool print_label_now ( self)

◆ restore_ctxflags()

None restore_ctxflags ( self,
int saved_flags )

◆ retrieve_cmt()

'ssize_t' retrieve_cmt ( self)

Reimplemented in outctx_t.

◆ retrieve_name()

'ssize_t' retrieve_name ( self,
str arg2,
'color_t *' arg3 )

Reimplemented in outctx_t.

◆ set_comment_addr()

None set_comment_addr ( self,
ida_idaapi.ea_t ea )

◆ set_dlbind_opnd()

None set_dlbind_opnd ( self)

◆ set_gen_cmt()

None set_gen_cmt ( self,
bool on = True )

◆ set_gen_demangled_label()

None set_gen_demangled_label ( self)

◆ set_gen_label()

None set_gen_label ( self)

◆ set_gen_xrefs()

None set_gen_xrefs ( self,
bool on = True )

◆ setup_outctx()

None setup_outctx ( self,
str prefix,
int makeline_flags )
Initialization; normally used only by the kernel.

Reimplemented in outctx_t.

◆ stack_view()

bool stack_view ( self)

◆ term_outctx()

int term_outctx ( self,
str prefix = None )
Finalize the output context. 

@returns the number of generated lines.

Reimplemented in outctx_t.

Member Data Documentation

◆ default_lnnum

str default_lnnum
static
Initial value:
= property(_ida_ua.outctx_base_t_default_lnnum_get,
_ida_ua.outctx_base_t_default_lnnum_set)

◆ F32

str F32
static
Initial value:
= property(_ida_ua.outctx_base_t_F32_get, _ida_ua.
outctx_base_t_F32_set)

◆ insn_ea

str insn_ea
static
Initial value:
= property(_ida_ua.outctx_base_t_insn_ea_get, _ida_ua.
outctx_base_t_insn_ea_set)

◆ outbuf

str outbuf
static
Initial value:
= property(_ida_ua.outctx_base_t_outbuf_get, _ida_ua.
outctx_base_t_outbuf_set)

Property Documentation

◆ thisown

thisown
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

The documentation for this class was generated from the following file: