INTRODUCING THE HP-UX SYMBOLIC DEBUGGER, CDB What is a debugger? It's a special program that is used to find and understand run-time errors (bugs) in other programs. It allows you to run a buggy program under close control, pausing it, setting breakpoints, examining and changing its memory, etc. For interpreted languages like BASIC, the debugger is built into the human interface. For compiled languages, such as C, HP FORTRAN, and Pascal on HP-UX, it is a separate program. What is a symbolic debugger? It's a debugger which "knows" the symbols (procedure and variable names) used in the source code which was compiled to make the program. You can ask for data values by name, not by address, in the same way they are referenced in the source code. It may also "know" the source lines of the program, so you can refer to program locations by procedure name and line number, not by address. Why is cdb a good symbolic debugger? It has a rich feature set, much more than just the basics a symbolic debugger might offer. It is multi-lingual, supporting C, HP FORTRAN, and Pascal (invoked as cdb, fdb, or pdb). It has a good understanding of the data types used by the three languages, and has an almost complete expression handler built in. You can dump complete data structures easily. There are a variety of display formats for looking at things in different ways. You can call procedures from the debugger command line, and you can declare and use local (debugger) variables. It "knows" your source code and even helps you search for patterns. It has a powerful capability called "assertions" for tracking down hard-to-locate bugs. You can store a command list with a breakpoint or assertion. The debugger supports record and playback of commands, and recording of all debugger output. Like most interactive HP-UX programs, it provides a "shell escape", so you can call other HP-UX programs without leaving the debugger. There is an on-line quick reference guide built in, too.