Chapter 3. Debuggers and Debugging Documentation

This chapter discusses the debugging tools available on SGI systems. It contains the following topics:

All documentation mentioned in this chapter is available online or can be ordered. See the SGI Technical Publications Library at for details.


The dbx tool is a source level debugger used to debug programs in C, C++, Fortran, and assembly language. You can use dbx to trace problems in a program at the source code level, rather than at the machine code level. dbx enables you to control a program's execution, symbolically monitoring program control flow, variables, and memory locations. You can also use dbx to trace the logic and flow of control to acquaint yourself with a program written by someone else.

The dbx tool provides a robust command language; using that language, you can perform the following functions:

  • examine core dumps

  • display and change program variables

  • determine variable scope

  • control program execution

  • debug machine language code

  • debug multiprocessed programs

This product is documented in the dbx User's Guide. The dbx Quick Reference Card is also available.

ProDev WorkShop Debugger

The ProDev WorkShop Debugger is a UNIX source-level debugging tool for SGI MIPS systems. It displays program data and execution status in real time; it can be used to debug Ada, C, C++, FORTRAN 77, and Fortran 90 programs.

The Debugger lets you set various types of breakpoints and watchpoints where you can view data (such as variables, expressions, arrays, and so on) You can use the Views menu to inspect the following types of data:

  • Call Stack, to inspect the call stack at the breakpoints.

  • Expression View, to inspect the value of specified expressions.

  • Variable Browser, to inspect the values, types, or addresses of variables.

  • Structure Browser, to inspect data structures.

  • Multiprocess View, to inspect the values of multiple and / or pthreaded processes.

  • Array Browser, to inspect the values of an array variable.

  • Memory View, to inspect the values in specified memory locations.

  • Register View, to inspect registers.

  • Disassembly View, to inspect the disassembled code.

The ProDev WorkShop Debugger also includes Fix+Continue, which gives you the ability to make changes to a program written in C or C++ without having to recompile and link the entire program before continuing to debug the code. With Fix+Continue, you can edit a function, parse the new functions, and continue execution of the program being debugged.

The X/Motif Analyzer in the Debugger provides specific debugging support for X/Motif applications. You can issue X/Motif Analyzer commands graphically from the X/Motif Analyzer subwindow of the Debugger Main Window.

The Debugger is documented in ProDev WorkShop: Debugger User's Guide and the ProDev WorkShop: Debugger User's Guide.