wrap_idaview

summary: programmatically manipulate disassembly and graph widgets

description:

This is an example illustrating how to manipulate an existing IDA-provided view (and thus possibly its graph), in Python.

keywords: idaview, graph

see_also: custom_graph_with_actions, sync_two_graphs

level: advanced

Attributes

viewName

w

worker

Classes

Worker

A class that represents a thread of control.

MyIDAViewWrapper

Deprecated. Use View_Hooks instead.

Module Contents

class wrap_idaview.Worker(w)

Bases: threading.Thread

A class that represents a thread of control.

This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass.

w
log(msg)
req_SetCurrentRendererType(switch_to)
req_SetNodeInfo(node, info, flags)
req_DelNodesInfos(*nodes)
run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class wrap_idaview.MyIDAViewWrapper(viewName)

Bases: ida_kernwin.IDAViewWrapper

Deprecated. Use View_Hooks instead.

Because the lifecycle of an IDAView is not trivial to track (e.g., a user might close, then re-open the same disassembly view), this wrapper doesn’t bring anything superior to the View_Hooks: quite the contrary, as the latter is much more generic (and better maps IDA’s internal model.)

printPrevFrame()
OnViewKeydown(key, state)
OnViewClick(x, y, state)
OnViewDblclick(x, y, state)
OnViewSwitched(rt)
OnViewMouseOver(x, y, state, over_type, over_data)
wrap_idaview.viewName = 'IDA View-A'
wrap_idaview.w
wrap_idaview.worker