11.32.1 Debugging Application Processes on UNIX Platforms
The standard UNIX system debugging command is dbx
(1). For complete information about this tool, refer to dbx
(1) in a UNIX system reference manual. If you use the -g
option to compile client processes, you can debug those processes using the procedures described on the dbx
(1) reference page.
To run the dbx
command, enter the following:
dbx client
To execute a client process:
- Set any desired breakpoints in the code.
- Enter the
dbx
command. - At the
dbx
prompt (*
), type therun
subcommand (r
) and any options you want to pass to the client program’smain()
.
The task of debugging server programs is more complicated. Normally a server is started using the tmboot
command, which starts the server on the correct machine with the correct options. When using dbx
, it is necessary to run a server directly rather than through the tmboot
command. To run a server directly, enter the r
(short for run
) subcommand after the prompt displayed by the dbx
command.
The Oracle Tuxedo tmboot(1)
command passes undocumented command-line options to the server’s predefined main()
. To run a server directly, you must pass these options, manually, to the r
subcommand. To find out which options need to be specified, run tmboot
with the -n
and -d 1
options. The -n
option instructs tmboot
not to execute a boot; -d 1
instructs it to display level 1 debugging statements. By default, the -d 1
option returns information about all processes. If you want information about only one process, you can specify your request accordingly with additional options. For more information, refer to the Oracle Tuxedo Command Reference.
The output of tmboot -n -d 1
includes a list of the command-line options passed by tmboot
to the server’s main()
, as shown in the following example:
exec server -g 1 -i 1 -u sfmax -U /tuxdir/appdir/ULOG -m 0 -A
Once you have the list of required command-line options, you are ready to run the server program directly, with the r
subcommand of dbx
(1). The following command line is an example:
*r -g 1 -i 1 -u sfmax -U /tuxdir/appdir/ULOG -m 0 -A
You may not use dbx
(1) to run a server that is already running as part of the configuration. If you try to do so, the server exits gracefully, indicating a duplicate server in the central event log.
Parent topic: Debugging Application Processes