HLASM Toolkit Feature User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The interaction between source code and the control flow graph

HLASM Toolkit Feature User's Guide
GC26-8710-10

When you click on a node in the control flow graph (and thus select the node), ASMPUT highlights the corresponding lines of code in the source code listing. When you click on a line of code in the source code listing, ASMPUT selects the corresponding node in the control flow graph.

This means you can work between the control flow graph and the source code listing, to better understand your program.

To gain the most benefit from this, size and position the Main and Control Flow Graph windows so that both appear on your screen at the same time (preferably with no overlap).

Figure 1 shows the Control Flow Graph window at the left of the screen, and the Main window at the right of the screen. The second node in the control flow graph is the selected node. The highlighted code in the source area is the code that corresponds to this node.
Figure 1. Displaying the control flow graph window and main window side-by-side
Displaying the control flow graph window and main window side-by-side

If you select a node on the control flow graph, then the relevant source code is always highlighted. However, if you click on a line in the source code, the corresponding node may not be in the current control flow graph. In this case, the highlight may move unexpectedly, not settling on the lines you clicked. To overcome this, if you want to select a node by clicking on a line of source code, make sure that you are showing a control flow graph of all programs, expanded to all layers.

If you click on a selected node, and thus unselect it, then the highlighting disappears from the source code listing.

Highlighting source code from the control flow graph
  1. Right click a node. The related code is highlighted in cyan in the source code listing, and the listing is scrolled so that the highlighted text is in the middle of the source code area.

If you click a three-dimensional node, the highlighting is only for the lines that correspond to the top two-dimensional node currently collapsed into the three-dimensional node.

If you click a node, and the code for the node was in a set of hidden expanded lines, then the lines are shown while the node is selected, but hidden after the node is deselected.

Selecting a node from the source code
  1. Click a line of source code. The related node is selected, and the code that corresponds to the top node is highlighted in cyan.

If the node is three-dimensional, the highlighted lines do not necessarily include the line you clicked. Instead, they are the lines that correspond to the top two-dimensional node if the three-dimensional node was expanded to its fullest. There is a guaranteed correspondence only if the node is two-dimensional.

See also Working with the control flow graph

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014