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

Public Member Functions

 __init__ (self, *args, **kwargs)
 
bool visible (self)
 
bool valid (self)
 
bool locked (self)
 
None set_visible (self, bool v)
 
None set_valid (self, bool v)
 
bool set_locked (self, bool v)
 
None refresh_view (self, bool redo_mba)
 
None refresh_ctext (self, bool activate=True)
 
None switch_to (self, 'cfuncptr_t' f, bool activate)
 
bool in_ctree (self)
 
'cnumber_t *' get_number (self)
 
int get_current_label (self)
 
None clear (self)
 
bool refresh_cpos (self, 'input_device_t' idv)
 
bool get_current_item (self, 'input_device_t' idv)
 
bool ui_rename_lvar (self, 'lvar_t' v)
 
bool rename_lvar (self, 'lvar_t' v, str name, bool is_user_name)
 
bool ui_set_call_type (self, 'cexpr_t' e)
 
bool ui_set_lvar_type (self, 'lvar_t' v)
 
bool set_lvar_type (self, 'lvar_t' v, 'tinfo_t' type)
 
bool set_noptr_lvar (self, 'lvar_t' v)
 
bool ui_edit_lvar_cmt (self, 'lvar_t' v)
 
bool set_lvar_cmt (self, 'lvar_t' v, str cmt)
 
bool ui_map_lvar (self, 'lvar_t' v)
 
bool ui_unmap_lvar (self, 'lvar_t' v)
 
bool map_lvar (self, 'lvar_t' frm, 'lvar_t' to)
 
bool set_udm_type (self, 'tinfo_t' udt_type, int udm_idx)
 
bool rename_udm (self, 'tinfo_t' udt_type, int udm_idx)
 
bool set_global_type (self, ida_idaapi.ea_t ea)
 
bool rename_global (self, ida_idaapi.ea_t ea)
 
bool rename_label (self, int label)
 
bool jump_enter (self, 'input_device_t' idv, int omflags)
 
bool ctree_to_disasm (self)
 
'cmt_type_t' calc_cmt_type (self, 'size_t' lnnum, 'cmt_type_t' cmttype)
 
bool edit_cmt (self, 'treeloc_t' loc)
 
bool edit_func_cmt (self)
 
bool del_orphan_cmts (self)
 
bool set_num_radix (self, int base)
 
bool set_num_enum (self)
 
bool set_num_stroff (self)
 
bool invert_sign (self)
 
bool invert_bits (self)
 
bool collapse_item (self, bool hide)
 
bool collapse_lvars (self, bool hide)
 
bool split_item (self, bool split)
 

Static Public Attributes

str flags
 
str view_idx
 
str ct
 
str toplevel
 
str mba
 
str cfunc
 
str last_code
 
str cpos
 
str head = property(_ida_hexrays.vdui_t_head_get)
 
str item = property(_ida_hexrays.vdui_t_item_get)
 
str tail = property(_ida_hexrays.vdui_t_tail_get)
 

Properties

 thisown
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Member Function Documentation

◆ calc_cmt_type()

'cmt_type_t' calc_cmt_type ( self,
'size_t' lnnum,
'cmt_type_t' cmttype )
Check if the specified line can have a comment. Due to the coordinate system for comments: ([https://www.hex-rays.com/blog/coordinate-system-for-hex-rays](https://www.hex-rays.com/blog/coordinate-system-for-hex-rays)) some function lines cannot have comments. This function checks if a comment can be attached to the specified line. 

@param lnnum: line number (0 based)
@param cmttype: comment types to check
@returns possible comment types

◆ clear()

None clear ( self)
Clear the pseudocode window. It deletes the current function and microcode. 

◆ collapse_item()

bool collapse_item ( self,
bool hide )
Collapse/uncollapse item. This function collapses the current item. 

@returns false if failed.

◆ collapse_lvars()

bool collapse_lvars ( self,
bool hide )
Collapse/uncollapse local variable declarations. 

@returns false if failed.

◆ ctree_to_disasm()

bool ctree_to_disasm ( self)
Jump to disassembly. This function jumps to the address in the disassembly window which corresponds to the current item. The current item is determined based on the current keyboard cursor position. 

@returns false if failed

◆ del_orphan_cmts()

bool del_orphan_cmts ( self)
Delete all orphan comments. Delete all orphan comments and refresh the screen. 

@returns true

◆ edit_cmt()

bool edit_cmt ( self,
'treeloc_t' loc )
Edit an indented comment. This function displays a dialog box and allows the user to edit the comment for the specified ctree location. 

@param loc: comment location
@returns false if failed or cancelled

◆ edit_func_cmt()

bool edit_func_cmt ( self)
Edit a function comment. This function displays a dialog box and allows the user to edit the function comment. 

@returns false if failed or cancelled

◆ get_current_item()

bool get_current_item ( self,
'input_device_t' idv )
Get current item. This function refreshes the cpos, item, tail fields. 

@param idv: keyboard or mouse
@returns false if failed

◆ get_current_label()

int get_current_label ( self)
Get current label. If there is a label under the cursor, return its number. 

@returns -1 if there is no label under the cursor. prereq: get_current_item() has been called

◆ get_number()

'cnumber_t *' get_number ( self)
Get current number. If the current item is a number, return pointer to it. 

@returns nullptr if the current item is not a number This function returns non-null for the cases of a 'switch' statement Also, if the current item is a casted number, then this function will succeed.

◆ in_ctree()

bool in_ctree ( self)
Is the current item a statement?

@returns false if the cursor is in the local variable/type declaration area
true if the cursor is in the statement area

◆ invert_bits()

bool invert_bits ( self)
Bitwise negate a number. This function inverts all bits of the current number. 

@returns false if failed.

◆ invert_sign()

bool invert_sign ( self)
Negate a number. This function negates the current number. 

@returns false if failed.

◆ jump_enter()

bool jump_enter ( self,
'input_device_t' idv,
int omflags )
Process the Enter key. This function jumps to the definition of the item under the cursor. If the current item is a function, it will be decompiled. If the current item is a global data, its disassemly text will be displayed. 

@param idv: what cursor must be used, the keyboard or the mouse
@param omflags: OM_NEWWIN: new pseudocode window will open, 0: reuse the existing window
@returns false if failed

◆ locked()

bool locked ( self)
Does the pseudocode window contain valid code? We lock windows before modifying them, to avoid recursion due to the events generated by the IDA kernel. 

@retval true: The window is locked and may have stale info

◆ map_lvar()

bool map_lvar ( self,
'lvar_t' frm,
'lvar_t' to )
Map a local variable to another. This function permanently maps one lvar to another. All occurrences of the mapped variable are replaced by the new variable 

@param to: the variable to map to. if nullptr, unmaps the variable
@returns false if failed

◆ refresh_cpos()

bool refresh_cpos ( self,
'input_device_t' idv )
Refresh the current position. This function refreshes the cpos field. 

@param idv: keyboard or mouse
@returns false if failed

◆ refresh_ctext()

None refresh_ctext ( self,
bool activate = True )
Refresh pseudocode window. This function refreshes the pseudocode window by regenerating its text from cfunc_t. Instead of this function use refresh_func_ctext(), which refreshes all pseudocode windows for the function. 

◆ refresh_view()

None refresh_view ( self,
bool redo_mba )
Refresh pseudocode window. This is the highest level refresh function. It causes the most profound refresh possible and can lead to redecompilation of the current function. Please consider using refresh_ctext() if you need a more superficial refresh. 

@param redo_mba: true means to redecompile the current function
false means to rebuild ctree without regenerating microcode

◆ rename_global()

bool rename_global ( self,
ida_idaapi.ea_t ea )
Rename global item. This function displays a dialog box and allows the user to rename a global item (data or function). 

@param ea: address of the global item
@returns false if failed or cancelled

◆ rename_label()

bool rename_label ( self,
int label )
Rename a label. This function displays a dialog box and allows the user to rename a statement label. 

@param label: label number
@returns false if failed or cancelled

◆ rename_lvar()

bool rename_lvar ( self,
'lvar_t' v,
str name,
bool is_user_name )
Rename local variable. This function permanently renames a local variable. 

@param v: pointer to local variable
@param name: new variable name
@param is_user_name: use true to save the new name into the database. use false to delete the saved name.
@returns false if failed

◆ rename_udm()

bool rename_udm ( self,
'tinfo_t' udt_type,
int udm_idx )
Rename structure field. This function displays a dialog box and allows the user to rename a structure field. 

@param udt_type: structure/union type
@param udm_idx: index of the structure/union member
@returns false if failed or cancelled

◆ set_global_type()

bool set_global_type ( self,
ida_idaapi.ea_t ea )
Set global item type. This function displays a dialog box and allows the user to change the type of a global item (data or function). 

@param ea: address of the global item
@returns false if failed or cancelled

◆ set_locked()

bool set_locked ( self,
bool v )

◆ set_lvar_cmt()

bool set_lvar_cmt ( self,
'lvar_t' v,
str cmt )
Set local variable comment. This function permanently sets a variable comment. 

@param v: pointer to local variable
@param cmt: new comment
@returns false if failed

◆ set_lvar_type()

bool set_lvar_type ( self,
'lvar_t' v,
'tinfo_t' type )
Set local variable type. This function permanently sets a local variable type and clears NOPTR flag if it was set before by function 'set_noptr_lvar' 

@param v: pointer to local variable
@param type: new variable type
@returns false if failed

◆ set_noptr_lvar()

bool set_noptr_lvar ( self,
'lvar_t' v )
Inform that local variable should have a non-pointer type This function permanently sets a corresponding variable flag (NOPTR) and removes type if it was set before by function 'set_lvar_type' 

@param v: pointer to local variable
@returns false if failed

◆ set_num_enum()

bool set_num_enum ( self)
Convert number to symbolic constant. This function displays a dialog box and allows the user to select a symbolic constant to represent the number. 

@returns false if failed or cancelled

◆ set_num_radix()

bool set_num_radix ( self,
int base )
Change number base. This function changes the current number representation. 

@param base: number radix (10 or 16)
0 means a character constant
@returns false if failed

◆ set_num_stroff()

bool set_num_stroff ( self)
Convert number to structure field offset. Currently not implemented. 

@returns false if failed or cancelled

◆ set_udm_type()

bool set_udm_type ( self,
'tinfo_t' udt_type,
int udm_idx )
Set structure field type. This function displays a dialog box and allows the user to change the type of a structure field. 

@param udt_type: structure/union type
@param udm_idx: index of the structure/union member
@returns false if failed or cancelled

◆ set_valid()

None set_valid ( self,
bool v )

◆ set_visible()

None set_visible ( self,
bool v )

◆ split_item()

bool split_item ( self,
bool split )
Split/unsplit item. This function splits the current assignment expression. 

@returns false if failed.

◆ switch_to()

None switch_to ( self,
'cfuncptr_t' f,
bool activate )
Display the specified pseudocode. This function replaces the pseudocode window contents with the specified cfunc_t. 

@param f: pointer to the function to display.
@param activate: should the pseudocode window get focus?

◆ ui_edit_lvar_cmt()

bool ui_edit_lvar_cmt ( self,
'lvar_t' v )
Set local variable comment. This function displays a dialog box and allows the user to edit the comment of a local variable. 

@param v: pointer to local variable
@returns false if failed or cancelled

◆ ui_map_lvar()

bool ui_map_lvar ( self,
'lvar_t' v )
Map a local variable to another. This function displays a variable list and allows the user to select mapping. 

@param v: pointer to local variable
@returns false if failed or cancelled

◆ ui_rename_lvar()

bool ui_rename_lvar ( self,
'lvar_t' v )
Rename local variable. This function displays a dialog box and allows the user to rename a local variable. 

@param v: pointer to local variable
@returns false if failed or cancelled

◆ ui_set_call_type()

bool ui_set_call_type ( self,
'cexpr_t' e )
Set type of a function call This function displays a dialog box and allows the user to change the type of a function call 

@param e: pointer to call expression
@returns false if failed or cancelled

◆ ui_set_lvar_type()

bool ui_set_lvar_type ( self,
'lvar_t' v )
Set local variable type. This function displays a dialog box and allows the user to change the type of a local variable. 

@param v: pointer to local variable
@returns false if failed or cancelled

◆ ui_unmap_lvar()

bool ui_unmap_lvar ( self,
'lvar_t' v )
Unmap a local variable. This function displays list of variables mapped to the specified variable and allows the user to select a variable to unmap. 

@param v: pointer to local variable
@returns false if failed or cancelled

◆ valid()

bool valid ( self)
Does the pseudocode window contain valid code? It can become invalid if the function type gets changed in IDA. 

◆ visible()

bool visible ( self)
Is the pseudocode window visible? if not, it might be invisible or destroyed 

Member Data Documentation

◆ cfunc

str cfunc
static
Initial value:
= property(_ida_hexrays.vdui_t_cfunc_get,
_ida_hexrays.vdui_t_cfunc_set)

◆ cpos

str cpos
static
Initial value:
= property(_ida_hexrays.vdui_t_cpos_get,
_ida_hexrays.vdui_t_cpos_set)

◆ ct

str ct
static
Initial value:
= property(_ida_hexrays.vdui_t_ct_get, _ida_hexrays.
vdui_t_ct_set)

◆ flags

str flags
static
Initial value:
= property(_ida_hexrays.vdui_t_flags_get, _ida_hexrays.
vdui_t_flags_set)

◆ head

str head = property(_ida_hexrays.vdui_t_head_get)
static

◆ item

str item = property(_ida_hexrays.vdui_t_item_get)
static

◆ last_code

str last_code
static
Initial value:
= property(_ida_hexrays.vdui_t_last_code_get,
_ida_hexrays.vdui_t_last_code_set)

◆ mba

str mba
static
Initial value:
= property(_ida_hexrays.vdui_t_mba_get, _ida_hexrays.
vdui_t_mba_set)

◆ tail

str tail = property(_ida_hexrays.vdui_t_tail_get)
static

◆ toplevel

str toplevel
static
Initial value:
= property(_ida_hexrays.vdui_t_toplevel_get,
_ida_hexrays.vdui_t_toplevel_set)

◆ view_idx

str view_idx
static
Initial value:
= property(_ida_hexrays.vdui_t_view_idx_get,
_ida_hexrays.vdui_t_view_idx_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: