About This Guide

This guide explains how to use the source level debugger, dbx. You can use dbx to debug programs in C, C++, Fortran, and assembly language.

What This Guide Contains

This guide describes the features of dbx and provides simple examples of how to use dbx to debug programs. Specifically, this guide includes:

Chapter 1, "Getting Started With dbx," introduces some basic dbx commands and offers some tips about how to approach a debugging session.

Chapter 2, "Running dbx," explains how to run dbx and perform basic dbx control functions.

Chapter 3, "Examining Source Files," explains how to examine source files under dbx.

Chapter 4, "Controlling dbx," describes features of dbx that affect its operation while debugging a program.

Chapter 5, "Examining and Changing Data," describes how to examine and change data in your program while running it under dbx.

Chapter 6, "Controlling Program Execution," describes how to use the dbx commands that control execution of your program.

Chapter 7, "Debugging Machine Language Code," explains how to debug machine language code.

Chapter 8, "Multiple Process Debugging," explains multiprocess debugging procedures.

Appendix A, "dbx Commands," lists and describes all dbx commands.

Appendix B, "Predefined Aliases," lists and describes all predefined dbx aliases.

Appendix C, "Predefined dbx Variables," lists and describes all predefined dbx variables.

What You Should Know Before Reading This Guide

This manual is written for programmers, and assumes that you are familiar with general debugging techniques.

Suggestions for Further Reading

This dbx User's Guide is part of the IRIS Developer Option (IDO), which provides the software and documentation that you can use to write applications for Silicon Graphics platforms. A few IDO online and printed manuals that may be of interest to you are listed below.

Programming on Silicon Graphics Systems:An Overview provides information about the IRIX programming environment and tools available for application programming. Topics covered include IRIX operating system, compilers, user interface and developer tools, and application libraries.

Compiling and Performance Tuning Guide describes the compiler system and programming tools and interfaces, and explains how to improve program performance.

Topics in IRIX Programming presents information about internationalizing an application, working with fonts, file and record locking, and inter-process communication.

C Language Reference Manual covers the syntax and semantics of the C programming language as implemented on the IRIX operating system.

Silicon Graphics offers software options to assist in software development. The CASEVision/Workshop option provides the WorkShop toolset: Debugger, Static Analyzer, Performance Analyzer, Tester, and Build Manager.

You can order a printed manual from Silicon Graphics by calling SGI Direct at 1-800-800-SGI1 (800-7441). Outside the U.S. and Canada, contact your local sales office or distributor.

Silicon Graphics also provides manuals online. To read an online manual after installing it, type insight or double-click the InSight icon. It's easy to print sections and chapters of the online manuals from InSight.

Conventions Used in This Guide

The conventions used in this manual help make information easy to access and understand. The following list describes the conventions and how they are used:

  • Command names, including dbx commands, appear in italics. For example:

    The edit command lets you edit files from within dbx.

  • Examples, shell prompts, and information displayed on the screen appear in a typewriter font. For example:

    Process 946: [6] trace count in main

  • Examples of what you enter are in boldface typewriter font. This example illustrates entering edit soar.c in response to a (dbx) prompt:

    (dbx) edit soar.c

  • Command arguments you replace with actual values appear in italics. In this example, you replace name with the name of an alias:

    alias name

  • Optional arguments are enclosed in square brackets ([ ... ]). In the following example, you can provide one or more directory names as arguments to the command:

    use [ dir ... ]

  • Mutually exclusive arguments to a command are enclosed in braces
    ({ ... }) and separated by a pipe character (|). In the first example below, you can provide either an activation level or a procedure name as an argument to the command. In the second example, because the argument choices are enclosed in square brackets, you can use either the call or return argument, or omit an argument to the command:

    func { activation_level | procedure }
    syscall catch [{ call | return }]

  • File and directory names appear in italics. For example:

    You can put any dbx command in the .dbxinit file.

  • New terms appear in italics. For example:

    Each procedure on the stack defines an activation level.