IDAPython 8.4
Loading...
Searching...
No Matches
vdui_t Class Reference

Proxy of C++ vdui_t class.

Inheritance diagram for vdui_t:

Public Member Functions

 __init__ (self, *args, **kwargs)
 
"bool" visible (self, *args)
 visible(self) -> bool Is the pseudocode window visible? if not, it might be invisible or destroyed
 
"bool" valid (self, *args)
 valid(self) -> bool Does the pseudocode window contain valid code? It can become invalid if the function type gets changed in IDA.
 
"bool" locked (self, *args)
 locked(self) -> bool 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.
 
"void" set_visible (self, *args)
 set_visible(self, v)
 
"void" set_valid (self, *args)
 set_valid(self, v)
 
"bool" set_locked (self, *args)
 set_locked(self, v) -> bool
 
"void" refresh_view (self, *args)
 refresh_view(self, redo_mba) Refresh pseudocode window.
 
"void" refresh_ctext (self, *args)
 refresh_ctext(self, activate=True) Refresh pseudocode window.
 
"void" switch_to (self, *args)
 switch_to(self, f, activate) Display the specified pseudocode.
 
"bool" in_ctree (self, *args)
 in_ctree(self) -> bool Is the current item a statement?
 
"cnumber_t *" get_number (self, *args)
 get_number(self) -> cnumber_t Get current number.
 
"int" get_current_label (self, *args)
 get_current_label(self) -> int Get current label.
 
"void" clear (self, *args)
 clear(self) Clear the pseudocode window.
 
"bool" refresh_cpos (self, *args)
 refresh_cpos(self, idv) -> bool Refresh the current position.
 
"bool" get_current_item (self, *args)
 get_current_item(self, idv) -> bool Get current item.
 
"bool" ui_rename_lvar (self, *args)
 ui_rename_lvar(self, v) -> bool Rename local variable.
 
"bool" rename_lvar (self, *args)
 rename_lvar(self, v, name, is_user_name) -> bool Rename local variable.
 
"bool" ui_set_call_type (self, *args)
 ui_set_call_type(self, e) -> bool Set type of a function call This function displays a dialog box and allows the user to change the type of a function call
 
"bool" ui_set_lvar_type (self, *args)
 ui_set_lvar_type(self, v) -> bool Set local variable type.
 
"bool" set_lvar_type (self, *args)
 set_lvar_type(self, v, type) -> bool Set local variable type.
 
"bool" set_noptr_lvar (self, *args)
 set_noptr_lvar(self, v) -> bool 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'
 
"bool" ui_edit_lvar_cmt (self, *args)
 ui_edit_lvar_cmt(self, v) -> bool Set local variable comment.
 
"bool" set_lvar_cmt (self, *args)
 set_lvar_cmt(self, v, cmt) -> bool Set local variable comment.
 
"bool" ui_map_lvar (self, *args)
 ui_map_lvar(self, v) -> bool Map a local variable to another.
 
"bool" ui_unmap_lvar (self, *args)
 ui_unmap_lvar(self, v) -> bool Unmap a local variable.
 
"bool" map_lvar (self, *args)
 map_lvar(self, frm, to) -> bool Map a local variable to another.
 
"bool" set_strmem_type (self, *args)
 set_strmem_type(self, sptr, mptr) -> bool Set structure field type.
 
"bool" set_udm_type (self, *args)
 set_udm_type(self, udt_type, udm_idx) -> bool Set structure field type.
 
"bool" rename_strmem (self, *args)
 rename_strmem(self, sptr, mptr) -> bool Rename structure field.
 
"bool" rename_udm (self, *args)
 rename_udm(self, udt_type, udm_idx) -> bool Rename structure field.
 
"bool" set_global_type (self, *args)
 set_global_type(self, ea) -> bool Set global item type.
 
"bool" rename_global (self, *args)
 rename_global(self, ea) -> bool Rename global item.
 
"bool" rename_label (self, *args)
 rename_label(self, label) -> bool Rename a label.
 
"bool" jump_enter (self, *args)
 jump_enter(self, idv, omflags) -> bool Process the Enter key.
 
"bool" ctree_to_disasm (self, *args)
 ctree_to_disasm(self) -> bool Jump to disassembly.
 
"cmt_type_t" calc_cmt_type (self, *args)
 calc_cmt_type(self, lnnum, cmttype) -> cmt_type_t Check if the specified line can have a comment.
 
"bool" edit_cmt (self, *args)
 edit_cmt(self, loc) -> bool Edit an indented comment.
 
"bool" edit_func_cmt (self, *args)
 edit_func_cmt(self) -> bool Edit a function comment.
 
"bool" del_orphan_cmts (self, *args)
 del_orphan_cmts(self) -> bool Delete all orphan comments.
 
"bool" set_num_radix (self, *args)
 set_num_radix(self, base) -> bool Change number base.
 
"bool" set_num_enum (self, *args)
 set_num_enum(self) -> bool Convert number to symbolic constant.
 
"bool" set_num_stroff (self, *args)
 set_num_stroff(self) -> bool Convert number to structure field offset.
 
"bool" invert_sign (self, *args)
 invert_sign(self) -> bool Negate a number.
 
"bool" invert_bits (self, *args)
 invert_bits(self) -> bool Bitwise negate a number.
 
"bool" collapse_item (self, *args)
 collapse_item(self, hide) -> bool Collapse/uncollapse item.
 
"bool" collapse_lvars (self, *args)
 collapse_lvars(self, hide) -> bool Collapse/uncollapse local variable declarations.
 
"bool" split_item (self, *args)
 split_item(self, split) -> bool Split/unsplit item.
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 flags = property(_ida_hexrays.vdui_t_flags_get, _ida_hexrays.vdui_t_flags_set, doc=)
 
 view_idx = property(_ida_hexrays.vdui_t_view_idx_get, _ida_hexrays.vdui_t_view_idx_set, doc=)
 
 ct = property(_ida_hexrays.vdui_t_ct_get, _ida_hexrays.vdui_t_ct_set, doc=)
 
 toplevel = property(_ida_hexrays.vdui_t_toplevel_get, _ida_hexrays.vdui_t_toplevel_set, doc=)
 
 mba = property(_ida_hexrays.vdui_t_mba_get, _ida_hexrays.vdui_t_mba_set, doc=)
 
 cfunc = property(_ida_hexrays.vdui_t_cfunc_get, _ida_hexrays.vdui_t_cfunc_set, doc=)
 
 last_code = property(_ida_hexrays.vdui_t_last_code_get, _ida_hexrays.vdui_t_last_code_set, doc=)
 
 cpos = property(_ida_hexrays.vdui_t_cpos_get, _ida_hexrays.vdui_t_cpos_set, doc=)
 
 head = property(_ida_hexrays.vdui_t_head_get, _ida_hexrays.vdui_t_head_set, doc=)
 
 item = property(_ida_hexrays.vdui_t_item_get, _ida_hexrays.vdui_t_item_set, doc=)
 
 tail = property(_ida_hexrays.vdui_t_tail_get, _ida_hexrays.vdui_t_tail_set, doc=)
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Member Function Documentation

◆ calc_cmt_type()

"cmt_type_t" calc_cmt_type ( self,
* args )

Due to the coordinate system for comments: (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.

Parameters
lnnum(C++: size_t) line number (0 based)
cmttype(C++: cmt_type_t) comment types to check
Returns
: possible comment types

◆ clear()

"void" clear ( self,
* args )

It deletes the current function and microcode.

◆ collapse_item()

"bool" collapse_item ( self,
* args )

This function collapses the current item.

Parameters
hide(C++: bool)
Returns
: false if failed.

◆ collapse_lvars()

"bool" collapse_lvars ( self,
* args )
Parameters
hide(C++: bool)
Returns
: false if failed.

◆ ctree_to_disasm()

"bool" ctree_to_disasm ( self,
* args )

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,
* args )

Delete all orphan comments and refresh the screen.

Returns
: true

◆ edit_cmt()

"bool" edit_cmt ( self,
* args )

This function displays a dialog box and allows the user to edit the comment for the specified ctree location.

Parameters
loc(C++: const treeloc_t &) comment location
Returns
: false if failed or cancelled

◆ edit_func_cmt()

"bool" edit_func_cmt ( self,
* args )

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,
* args )

This function refreshes the cpos, item, tail fields.

Parameters
idv(C++: input_device_t) keyboard or mouse
See also
: cfunc_t.get_line_item()
Returns
: false if failed

◆ get_current_label()

"int" get_current_label ( self,
* args )

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,
* args )

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,
* args )
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,
* args )

This function inverts all bits of the current number.

Returns
: false if failed.

◆ invert_sign()

"bool" invert_sign ( self,
* args )

This function negates the current number.

Returns
: false if failed.

◆ jump_enter()

"bool" jump_enter ( self,
* args )

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.

Parameters
idv(C++: input_device_t) what cursor must be used, the keyboard or the mouse
omflags(C++: int) OM_NEWWIN: new pseudocode window will open, 0: reuse the existing window
Returns
: false if failed

◆ locked()

"bool" locked ( self,
* args )
Return values
trueThe window is locked and may have stale info

◆ map_lvar()

"bool" map_lvar ( self,
* args )

This function permanently maps one lvar to another. All occurrences of the mapped variable are replaced by the new variable

Parameters
from(C++: lvar_t *) the variable being mapped
to(C++: lvar_t *) the variable to map to. if nullptr, unmaps the variable
Returns
: false if failed

◆ refresh_cpos()

"bool" refresh_cpos ( self,
* args )

This function refreshes the cpos field.

Parameters
idv(C++: input_device_t) keyboard or mouse
Returns
: false if failed

◆ refresh_ctext()

"void" refresh_ctext ( self,
* args )

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.

See also
: refresh_view(), refresh_func_ctext()
Parameters
activate(C++: bool)

◆ refresh_view()

"void" refresh_view ( self,
* args )

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.

Parameters
redo_mba(C++: bool) true means to redecompile the current function false means to rebuild ctree without regenerating microcode
See also
: refresh_ctext()

◆ rename_global()

"bool" rename_global ( self,
* args )

This function displays a dialog box and allows the user to rename a global item (data or function).

Parameters
ea(C++: ea_t) address of the global item
Returns
: false if failed or cancelled

◆ rename_label()

"bool" rename_label ( self,
* args )

This function displays a dialog box and allows the user to rename a statement label.

Parameters
label(C++: int) label number
Returns
: false if failed or cancelled

◆ rename_lvar()

"bool" rename_lvar ( self,
* args )

This function permanently renames a local variable.

Parameters
v(C++: lvar_t *) pointer to local variable
name(C++: const char *) new variable name
is_user_name(C++: bool) use true to save the new name into the database. use false to delete the saved name.
See also
: rename_lvar()
Returns
: false if failed

◆ rename_strmem()

"bool" rename_strmem ( self,
* args )

This function displays a dialog box and allows the user to rename a structure field.

Parameters
sptr(C++: struc_t *) pointer to structure
mptr(C++: member_t *) pointer to structure member OBSOLETE FUNCTION, do not use!
Returns
: false if failed or cancelled

◆ rename_udm()

"bool" rename_udm ( self,
* args )

This function displays a dialog box and allows the user to rename a structure field.

Parameters
udt_type(C++: tinfo_t &) structure/union type
udm_idx(C++: int) index of the structure/union member
Returns
: false if failed or cancelled

◆ set_global_type()

"bool" set_global_type ( self,
* args )

This function displays a dialog box and allows the user to change the type of a global item (data or function).

Parameters
ea(C++: ea_t) address of the global item
Returns
: false if failed or cancelled

◆ set_locked()

"bool" set_locked ( self,
* args )
Parameters
vbool

◆ set_lvar_cmt()

"bool" set_lvar_cmt ( self,
* args )

This function permanently sets a variable comment.

Parameters
v(C++: lvar_t *) pointer to local variable
cmt(C++: const char *) new comment
Returns
: false if failed

◆ set_lvar_type()

"bool" set_lvar_type ( self,
* args )

This function permanently sets a local variable type and clears NOPTR flag if it was set before by function 'set_noptr_lvar'

Parameters
v(C++: lvar_t *) pointer to local variable
type(C++: const tinfo_t &) new variable type
Returns
: false if failed

◆ set_noptr_lvar()

"bool" set_noptr_lvar ( self,
* args )
Parameters
v(C++: lvar_t *) pointer to local variable
Returns
: false if failed

◆ set_num_enum()

"bool" set_num_enum ( self,
* args )

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,
* args )

This function changes the current number representation.

Parameters
base(C++: int) number radix (10 or 16) 0 means a character constant
Returns
: false if failed

◆ set_num_stroff()

"bool" set_num_stroff ( self,
* args )

Currently not implemented.

Returns
: false if failed or cancelled

◆ set_strmem_type()

"bool" set_strmem_type ( self,
* args )

This function displays a dialog box and allows the user to change the type of a structure field.

Parameters
sptr(C++: struc_t *) pointer to structure
mptr(C++: member_t *) pointer to structure member OBSOLETE FUNCTION, do not use!
Returns
: false if failed or cancelled

◆ set_udm_type()

"bool" set_udm_type ( self,
* args )

This function displays a dialog box and allows the user to change the type of a structure field.

Parameters
udt_type(C++: tinfo_t &) structure/union type
udm_idx(C++: int) index of the structure/union member
Returns
: false if failed or cancelled

◆ set_valid()

"void" set_valid ( self,
* args )
Parameters
vbool

◆ set_visible()

"void" set_visible ( self,
* args )
Parameters
vbool

◆ split_item()

"bool" split_item ( self,
* args )

This function splits the current assignment expression.

Parameters
split(C++: bool)
Returns
: false if failed.

◆ switch_to()

"void" switch_to ( self,
* args )

This function replaces the pseudocode window contents with the specified cfunc_t.

Parameters
f(C++: cfuncptr_t) pointer to the function to display.
activate(C++: bool) should the pseudocode window get focus?

◆ ui_edit_lvar_cmt()

"bool" ui_edit_lvar_cmt ( self,
* args )

This function displays a dialog box and allows the user to edit the comment of a local variable.

Parameters
v(C++: lvar_t *) pointer to local variable
Returns
: false if failed or cancelled

◆ ui_map_lvar()

"bool" ui_map_lvar ( self,
* args )

This function displays a variable list and allows the user to select mapping.

Parameters
v(C++: lvar_t *) pointer to local variable
Returns
: false if failed or cancelled

◆ ui_rename_lvar()

"bool" ui_rename_lvar ( self,
* args )

This function displays a dialog box and allows the user to rename a local variable.

Parameters
v(C++: lvar_t *) pointer to local variable
Returns
: false if failed or cancelled

◆ ui_set_call_type()

"bool" ui_set_call_type ( self,
* args )
Parameters
e(C++: const cexpr_t *) pointer to call expression
Returns
: false if failed or cancelled

◆ ui_set_lvar_type()

"bool" ui_set_lvar_type ( self,
* args )

This function displays a dialog box and allows the user to change the type of a local variable.

Parameters
v(C++: lvar_t *) pointer to local variable
Returns
: false if failed or cancelled

◆ ui_unmap_lvar()

"bool" ui_unmap_lvar ( self,
* args )

This function displays list of variables mapped to the specified variable and allows the user to select a variable to unmap.

Parameters
v(C++: lvar_t *) pointer to local variable
Returns
: false if failed or cancelled

◆ valid()

"bool" valid ( self,
* args )

◆ visible()

"bool" visible ( self,
* args )

Property Documentation

◆ cfunc

cfunc = property(_ida_hexrays.vdui_t_cfunc_get, _ida_hexrays.vdui_t_cfunc_set, doc=)
static

◆ cpos

cpos = property(_ida_hexrays.vdui_t_cpos_get, _ida_hexrays.vdui_t_cpos_set, doc=)
static

◆ ct

ct = property(_ida_hexrays.vdui_t_ct_get, _ida_hexrays.vdui_t_ct_set, doc=)
static

◆ flags

flags = property(_ida_hexrays.vdui_t_flags_get, _ida_hexrays.vdui_t_flags_set, doc=)
static

◆ head

head = property(_ida_hexrays.vdui_t_head_get, _ida_hexrays.vdui_t_head_set, doc=)
static

◆ item

item = property(_ida_hexrays.vdui_t_item_get, _ida_hexrays.vdui_t_item_set, doc=)
static

◆ last_code

last_code = property(_ida_hexrays.vdui_t_last_code_get, _ida_hexrays.vdui_t_last_code_set, doc=)
static

◆ mba

mba = property(_ida_hexrays.vdui_t_mba_get, _ida_hexrays.vdui_t_mba_set, doc=)
static

◆ tail

tail = property(_ida_hexrays.vdui_t_tail_get, _ida_hexrays.vdui_t_tail_set, doc=)
static

◆ thisown

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

◆ toplevel

toplevel = property(_ida_hexrays.vdui_t_toplevel_get, _ida_hexrays.vdui_t_toplevel_set, doc=)
static

◆ view_idx

view_idx = property(_ida_hexrays.vdui_t_view_idx_get, _ida_hexrays.vdui_t_view_idx_set, doc=)
static

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