This tutorial uses a simplified and somewhat artificial simulation of the dbx debugger. The source code for this C++ program is available in the sample applications zip file on the Oracle Developer Studio 12.5 downloads web page at http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html.
After accepting the license and downloading, you can extract the zip file in a directory of your choice.
If you have not already done so, download the sample applications zip file, and unpack the file in a location of your choice. The debug_tutorial application is located in the Debugger subdirectory of the OracleDeveloperStudio12.5-Samples directory.
Build the program.
$ make CC -g -c main.cc CC -g -c interp.cc CC -g -c cmd.cc CC -g -c debugger.cc CC -g -c cmds.cc CC -g main.o interp.o cmd.o debugger.o cmds.o -o a.out
The program is made up of the following modules:
|
Run the program and try a few dbx commands.
$ a.out > display var will display 'var' > stop in X > run running ... stopped in X var = { a = '100' b = '101' c = '<error>' d = '102' e = '103' f = '104' } > quit Goodby $