User`s guide

4
Chapter 1: Getting Started With dbx
step executes the next line of the program. If the next line is a
procedure call, step steps down into the procedure. step is described
in “Stepping Using the step Command” on page 79.
next executes the next line; if it is a procedure, next executes it but
does not step down into it. next is described in “Stepping Using the
next Command” on page 79.
cont resumes execution of the program past a breakpoint and does
not stop until it reaches the next breakpoint or the end of the
program. cont is explained in “Continuing Execution After a
Breakpoint” on page 64.
Another tool that you can use to follow the execution of your program is the
trace command (described in “Tracing Program Execution” on page 65).
With it you can examine:
values of variables at specific points in your program or whenever
variables change value
parameters passed to and values returned from functions
line numbers as they are executed
Avoiding Common Pitfalls
You may encounter some problems when you debug a program. Common
problems and their solutions are listed below.
•Ifdbx does not display variables, recompile the program with the g
compiler option. Note that in some cases, this may cause the problem to
go away, or its symptoms to change.
If the debugger’s listing seems confused, try separating the lines of
source code into logical units. The debugger may get confused if more
than one source statement occurs on the same line.
If the debugger’s executable version of the code doesn’t match the
source, recompile the source code. The code displayed in the debugger
is identical to the executable version of the code.
If code appears to be missing, it may be contained in an include file or a
macro. The debugger treats macros as single lines. To debug a macro,
expand the macro in the source code.