Skip to content

Graph

Graph (Alt+6) draws the selected function as a graph. Pick a function first. The toggle at the top switches between two graphs: Blocks and Calls.

The Graph tab in Blocks mode, showing a function's basic blocks with their instructions and the branches between them

Blocks shows the function’s basic blocks, each with its instructions, and the branches between them. The entry block is outlined in the theme’s accent color.

Edge colorMeaning
GreenThe branch is taken.
RedThe branch is not taken.
GreyAn unconditional jump, or a fall-through.

The legend in the toolbar repeats these: taken, not taken and jump or fall-through.

Click an instruction to select it. Double-click an instruction to open it in Assembly.

Calls shows the functions that call the selected function above it, and the functions it calls below it, two calls deep in each direction. The graph includes up to 120 functions.

The Graph tab in Calls mode, with callers above the selected function and callees below it
  • Click a function to move the graph to it. It becomes the selected function.
  • Imported functions, such as calls into a DLL, are drawn with a dashed border and labelled imported. They have no code in the program, so you can’t open them.
  • Drag the background to pan.
  • Use the mouse wheel, or the − and + buttons, to zoom. The toolbar shows the zoom level.
  • Select Fit to view to fit the whole graph in the window.

Opcodex draws up to 2,000 blocks per function and up to 300 instructions per block. When a function or call graph is bigger than that, a note says This graph is large; only part of it is shown. Use Assembly or Code to read the rest.

The same data is available as function.graph and function.callgraph. The call graph operation can follow up to 3 calls in each direction and return up to 300 functions. See the CLI reference.

Continue with Debugger.