NET/MASTER Network Control Language (NCL) Programmer's Guide
Displaying Decompiled Source Code
Debugging an NCL Process
106160 Tandem Computers Incorporated 9–33
Displaying Decompiled
Source Code
The DEBUG SOURCE command displays decompiled source code. Comments are not
displayed (they are not compiled and, therefore, not decompiled). A statement that
spans multiple lines in the source code is shown as a single statement. Multiple
statements on a single line in the source code are shown as multiple statements.
The information for each statement includes:
The NCL ID of the NCL process in which the statement occurs
The line number in which the statement starts
The statement number of the statement
The text of the decompiled source statement
The line number in which the statement starts is the number of the line in the TEDIT
source file. Before displaying decompiled source code, you may find it useful to use
the TEDIT RENUMBER command to renumber lines so that the first line in the
original source code is line 1 and subsequent lines numbers are incremented by 1.
Refer to the PS Text Edit and PS Text Format User’s Guide and the PS Text Edit Reference
Manual for more information on TEDIT.
The statement number of the statement is a number allocated by NCL during
compilation. Some core statements that you may consider to be single statements in
the original source code are displayed as multiple statements in the decompiled source
code. For example, the THEN and ELSE keywords in an IF core statement are
regarded as separate statements in the decompiled source code. This allows you to set
a breakpoint on the IF, THEN, or ELSE keyword.
The difference between the different display methods is best illustrated by a series of
examples. Study the DEBUG SOURCE commands and the statements that are
displayed in the following examples, and observe the results.
You can use the DEBUG SOURCE command with the operands ON and OFF. This is
useful when you use the DEBUG STEP command to step through several lines of code
in the same mode without repeating the DEBUG SOURCE command. See the
description of DEBUG STEP, later in this section, where an example of the use of
DEBUG SOURCE ON/OFF is shown.
Note For object-only NCL libraries, DEBUG SOURCE is not available.
Displaying a Single
Statement
When displaying a single statement, you can display:
The statement at which execution is currently suspended
A single statement at the current nesting level
A single statement at the specified nesting level
Section 6, “Procedures and Functions,” discusses the concept of nesting levels in detail.