DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
sdb: symbolic debugger

A controlled environment for program testing

After entering sdb, breakpoints can be set at certain lines in the source program. The program is then started with an sdb command. Execution of the program proceeds as normal until it is about to execute one of the lines at which a breakpoint has been set. The program stops and sdb reports the breakpoint where the program stopped. sdb commands may be used to display the trace of function calls and the values of variables. If the user is satisfied that the program is working correctly to this point, some breakpoints can be deleted and others set; then program execution may be continued from the point where it stopped.

A useful alternative to setting breakpoints is single-stepping. The sdb program can be requested to execute the next line of the program and then stop. This feature is especially useful for testing new programs, so they can be verified on a statement-by-statement basis. If an attempt is made to single-step through a function that has not been compiled with the -g option, execution proceeds until a statement in a function compiled with the -g option is reached. It is also possible to have the program execute one machine-level instruction at a time. This is particularly useful when the program has not been compiled with the -g option.


Next topic: Setting and deleting breakpoints
Previous topic: Changing the current line in the source file

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003