Graph view
In the graph view, the current function is represented as a collection of nodes linked together with edges. Nodes represent basic blocks and edges represent code cross-references between them.
Only code items are visible in the graph view, data items are hidden. To display them, switch to text mode by pressing Space. The graph view is available for the instructions belonging to functions. IDA automatically switches to text mode if the current item cannot be displayed in graph mode. It also displays a warning, which we recommend to hide away as soon as you become familiar with the concept.
The Space key can be used to toggle between the graph and text views.
Please select one of the following topic to learn more about graphs:
The current node
There are two concepts: the current node and the selected nodes. The node with the keyboard cursor is considered as the current node. If the user clicks on the graph background, the keyboard cursor will disappear and there will be no current node. In the absence of the current node, IDA uses the last valid address for the user commands (like rename and similar commands). For example, if the user invokes the 'rename' command by pressing N and if there is no current node, IDA will still display the 'rename' dialog box for the last valid address.
Clicking on the node title will make the clicked node the current one. The keyboard cursor will be moved to the clicked node. Any selection of the disassembly text will be cancelled upon switching the current node.
The default color for the title of the current node is dark gray.
In addition to the obvious method of clicking with the mouse left-button to select the current node, IDA supports many other methods:
Clicking with the mouse on the node text (disassembly listing) has the usual meaning: IDA will move the keyboard cursor to the clicked location. It is also possible to select the disassembly listing within one node.
Selections in graphs
Many graph operations are applied to the selected nodes. The current node is considered to be part of the node selection for all operations.
The graph nodes can be selected using the mouse. To select many nodes at once, press and hold the Ctrl key during the mouse operation. The Alt key removes nodes from the current selection.
Internally, IDA keeps track of the selected nodes and edge layout points. Edge layout points are the points where edges are bent. If the current selection is moved in the graph, the selected edge layout points are moved too.
The default color for the title of the selected nodes is light gray. Other node titles are displayed with white color.
See also proximity view.
Customizing graph layout
Each node has a title bar with title buttons. The title bar can be used to displace the node. Displacing nodes or edges creates a custom layout. The custom layouts are automatically saved in the database. If there is a custom layout for the function, IDA never destroys it without your explicit permission. This behavior has its drawbacks: when the nodes are resized (because of added comments, for example), the old layout will be retained and the nodes could overlap. In this case, the user can ask IDA to redo the layout or manually move the overlapping nodes. To avoid displacing nodes inadvertently, turn on the lock graph layout option.
The user can also click on the edge layout points (edge bending points) and drag them. If two edge layout points are too close, one of them will be deleted. To create new edge layout points, use Shift-DoubleClick on the edge.
Zooming graphs
The graph can be zoomed in and out. There are several ways of zooming the graph:
There are two options linked to the graph zooming:
The zoom level is never greater than 1000% and less than 1%. IDA remembers the current zoom level for each location in the navigation history.
See also proximity view.
Scrolling graphs
The user can pan (shift) the graph by clicking with the left mouse button on the graph background and dragging it. In the rare case when there is no graph background visible on the screen, the Shift-click can be used to move the graph. This can happen on very high zoom levels, when the current node occupies the whole window.
The mouse wheel scrolls the graph vertically. If the Alt key is pressed, it will scroll the graph horizontally.
The Page Up and Page Down keys scroll the graph vertically. The keyboard arrows can scroll the graph if they reach the node border and cannot jump to another node in the specified direction.
Scrolling the graph does not change the keyboard cursor position. As soon as the graph is refreshed on the screen, IDA will scroll the graph so that the keyboard cursor becomes visible.
See also proximity view.
Graph node groups
Any number of nodes can be collapsed into a single synthetic node. Such a synthetic node contains a user-provided text instead of normal disassembly listing. The 'group' command is available from the right-click menu if there are selected nodes.
Even a single node can be used to create a group. This feature can be used to collapse huge nodes into something manageable or to hide a group that consists of one node.
After creating a group, IDA automatically refreshes the graph layout. If a custom layout was present, it is not applied to the reduced graph. However, the existing custom layout is not destroyed and will be re-used as soon as the user switches to the full graph by deleting the group or uncollapsing it.
The node groups can be nested: synthetic nodes can be used to create other groups. This feature allows reducing the graph into a single node. Each node can belong to only one group at a time.
Groups can be uncollapsed to display the original node content. The node frames of the current uncollapsed group (the one with the mouse pointer) are displayed with a special color. The default group frame color is yellow. This way, the existing uncollapsed groups can be visualized by hovering the mouse over the graph nodes.
There are also commands to collapse and uncollapse all groups in the graph. They are available from the right click menu.
To edit the contents of synthetic nodes, use the 'set node text' button on the node title. The 'rename' command can be used too.
IDA automatically remembers the graph groups and their state for each function.
Graph overview window
IDA has a small graph overview window. It displays the whole graph in the zoom out form and gives the user an idea about which part of the graph is visualized on the main window.
Clicking on the graph overview window visualizes different parts of the graph in the main window. It is also possible to click and drag the focus frame - the main window will be refreshed accordingly.
The graph overview window is visible only in the graph view node. As soon as another non-modal window gets focus, the graph overview is closed. It automatically opens when a graph view is activated.
The graph overview is displayed by default. To hide it, right click on the main toolbar background and select Navigation, Graph overview menu item.
The graph overview window can be resized to accommodate really huge graphs.
Graph colors
Graph edges can have several colors. In graph view:
And, in proximity view:
IDA highlights the current mouse items. If the mouse is hovered over an edge, it is highlighted. If the mouse is hovered over a node, all adjacent edges are highlighted. To turn off the highlighting, specify the 'current edge' color as an undefined custom color.
The 'highlighted edge' and 'foreign node' colors are not used yet.
See also proximity view.
Graph options
Use graph view by default
Enable graph animation
Draw node shadows
Auto fit graph into window
Fit window max zoom level 100%
Re-layout graph if nodes overlap
Re-layout graph upon screen refresh
Truncate at the right margin
Lock graph layout
PROXIMITY VIEW
Show data references
Hide library functions
Unlimited children recursion
Recurse into library functions
Max parents recursion
Max children recursion
Max nodes per level
See also: right margin
Various graph hints
The following actions can improve the speed of graph drawing:
Printing the graph: the 'print' command is available at the graph toolbar. The graph toolbar is visible by default but if you have saved a custom desktop configuration in the past, it will not be visible. To set it on, check the View, Toolbars, Graph view menu item.
Working with huge graphs: do not forget about the node groups and use them to make the graph simpler.
Last updated