DEBUGGER(1)
NAME
debugger − OpenWindows interface for the dbx source-level debugger
SYNOPSIS
debugger [ −C ] [ −I dir ] [ −kbd ] [ −Wfsdb ] [ execfile [ corefile | processID ] ]
DESCRIPTION
debugger is a source-level debugger for ANSI C, C++, Pascal, and FORTRAN programs (Pascal and FORTRAN not available with x86). debugger is a standard tool that runs within the OpenWindows environment (Version 3.0 and later). It accepts the same commands as dbx, but provides a convenient, graphical user interface.
You can use the mouse to set breakpoints, examine the values of variables, control execution, browse source files, and so on. debugger has separate panes for viewing source code, entering commands, monitoring expressions, setting properties and other uses.
execfile is an executable file produced by any Sun compiler (or a combination of them) with the −g flag specified to produce symbol information in the executable file. IMPORTANT: every stage of the compilation process, including the linking phase, must include the −g option. If no execfile is specified, you can use the debug command to specify the program to be debugged. The executable file contains a symbol table which includes the names of all the source files translated by the compiler to create it. These files are available for perusal while you are using the debugger.
If a corefile argument is specified in the command line, you can use the debugger to examine the state of the program when it faulted.
Giving a processID instead of a corefile halts that running process and allows you to start debugging that program. Detaching the debugger from the process allows that process to continue to execute.
During startup, debugger searches for .dbxrc first. If .dbxrc is not found, the debugger prints a warning message and searches for .dbxinit. The search order is: current directory (./.dbxrc), then home directory ($home ./.dbxrc).
Runtime Checking (RTC) is a fully integrated feature of the debugger; it uses the full capabilities of the debugger including setting breakpoints and examining variables. With RTC, you can automatically detect runtime errors in an application during the development phase. Compiling with the −g flag provides source line number correlation in the error messages. RTC can check programs compiled with the optimization −O flag. You do not have to recompile, relink, or modify the makefile to use RTC.
For proper operation, RTC requires dynamic linking with libc, use of the standard libc malloc/free/realloc, and does not support attachment to a running process.
To use RTC, start debugger with the −C option or set the environment variable SW_RTC prior to starting the debugger. To include the −C option when you start the debugger from the manager, you must add the option to the command line in the Tool Properties window. To bring up the Tool Properties window, select the debugger icon and choose Selected Tool from the Properties menu in the manager window. Leaks checking is supported: access Checking is not.
(Solaris 2.x)
The Collector is a pop-up window in debugger that is a graphical user interface tool for collecting performance data on a target application. The data is contained in buckets called samples. A collection of samples is called an experiment. The collected performance data can be viewed in the displays of the Analyzer, which is a graphical data analysis tool. See Performance Tuning an Application for details on using the Collector and the Analyzer tools.
(Solaris 2.x)
The Visual Data Inspector allows you to examine program variables including complex structures and to monitor values during program execution. See Debugging a Program for details on using the data inspector.
The Stack Inspector performs operations on the stack and dynamically updates the stack when you visit another process or thread. See Debugging a Program for details on using the stack inspector.
(Solaris 2.x)
The Process/Thread Inspector allows you to find information about threads. debugger recognizes a multithreaded program and automatically enables debugger multithreaded features. See Debugging a Program for details on using the process inspector.
OPTIONS
−C Enables Runtime Checking to be activated but does not turn checking on.
−I dir Add the directory dir to the list of directories that are searched when looking for a source file. Normally debugger looks for source files in the current directory and then in the directory where execfile is located. The directory search path can also be set with the use command. Multiple −I options may be given.
−kbd Debugs a program that sets the keyboard into up/down translation mode. This flag is necessary if you are debugging a program that uses up/down encoding.
−Wfsdb
OpenWindows only. Debug program on the same server on which you are displaying it. Active grabs are disabled when you press a key, move the pointer, or perform a server action. Passive grabs are disabled when you press a mouse button. Include this option with the run command.
USAGE
Refer to dbx(1) for a summary of dbx commands, or to Debugging a Program for more complete information on using debugger.
Refer to Debugging a Program for detailed information on Runtime Checking.
Refer to dbx(1) for a summary of Collector commands, or Performance Tuning an Application for more complete information on using the Collector.
FILES
core default core file
.dbxrc local dbx initialization file
$home/.dbxrc user’s initialization file
.dbxinit local dbx alternate (obsolete) initialization file
$home/.dbxinit user’s dbx alternate (obsolete) initialization file
SEE ALSO
dbx(1), dbxinit(4), dbxrc(4), and Debugging a Program
SunOS 3.0.1 — Last change: 28 Feb 1995