GNUPro Toolkit Documentation|Index|Next

#

Debugging with GDB
The GNU Source-Level Debugger

    Copyright © 1988-1997  Free Software Foundation, Inc.

    Permission is granted to make and distribute verbatim copies of this documentation
    provided the copyright notice and this permission notice are preserved on all copies.

    Permission is granted to copy and distribute modified versions of this documentation
    under the conditions for verbatim copying, provided also that the entire resulting derived
    work is distributed under the terms of a permission notice identical to this one.

    Permission is granted to copy and distribute translations of this documentation into
    another language, under the above conditions for modified versions.

    Free Software Foundation

    59 Temple Place    Suite 330

    Boston, MA        02111-1307        USA

    Send bugs and comments on GDB to: bug-gdb@prep.ai.mit.edu.

    This documentation has been prepared by Cygnus Technical Publications; contact the
    Cygnus Solutions Technical Publications staff: doc@cygnus.com.

    Copyright © 1993- 1997  Cygnus Solutions. All rights reserved.

    GNUPro™, the GNUPro™ logo, and the Cygnus Solutions logo are trademarks of
    Cygnus Solutions.  All other brand and product names are trademarks of their respective
    owners.

The following documentation details the GNU source level debugger, GDB.

- Summary of GDB

- GDB as free software
- Contributors to GDB

- Installing GDB

- Compiling GDB in another directory
- Specifying names for hosts and targets
- configure options

- Controlling GDB

- Prompt
- Command editing
- Command history
- Screen size
- Numbers
- Optional warnings and messages

- Getting In and Out of GDB

- Invoking GDB

- Choosing files
- Choosing modes

- Quitting GDB
- Shell commands

- GDB Commands

- Command syntax
- Command completion
- Getting help

- Running Programs Under GDB

- Compiling for debugging
- Starting your program
- Your program’s arguments
- Your program’s environment
- Your program’s working directory
- Your program’s input and output
- Debugging an already-running process
- Killing the child process
- Additional process information
- Debugging programs with multiple threads
- Debugging programs with multiple processes

- Stopping and Continuing

- Breakpoints, watchpoints, and exceptions

- Setting breakpoints
- Setting watchpoints
- Breakpoints and exceptions
- Deleting breakpoints
- Disabling breakpoints
- Break conditions
- Breakpoint command lists
- Breakpoint menus

- Continuing and stepping
- Signals
- Stopping and starting multi-thread programs

- Examining the Stack

- Stack frames
- Backtraces
- Selecting a frame
- Information about a frame
- MIPS machines and the function stack

- Examining Source Files

- Printing source lines
- Searching source files
- Specifying source directories
- Source and machine code

- Examining Data

- Expressions
- Program variables
- Artificial arrays
- Output formats
- Examining memory
- Automatic display
- Print settings
- Value history
- Convenience variables
- Registers
- Floating point hardware

- Using GDB with Different Languages

- Switching between source languages

- List of filename extensions and languages
- Setting the working language
- Having GDB infer the source language

- Displaying the language
- Type and range checking

- An overview of type checking
- An overview of range checking

- Supported languages

- C and C++
- Modula-2

- Examining the Symbol Table
- Altering Execution

- Assignment to variables
- Continuing at a different address
- Giving your program a signal
- Returning from a function
- Calling program functions
- Patching programs

- GDB Files

- Commands to specify files
- Errors reading symbol files

- Specifying a Debugging Target

- Active targets
- Commands for managing targets
- Choosing target byte order
- Remote debugging

- The GDB remote serial protocol
- The UDI protocol for AMD29K
- The EBMON protocol for AMD29K
- GDB with a Tandem ST2000
- GDB and VxWorks
- GDB and SPARClet
- GDB and Hitachi microprocessors
- GDB and remote MIPS boards
- Simulated CPU target

- Canned Sequences of Commands

- User-defined commands
- User-defined command hooks
- Command files
- Commands for controlled output

- Using GDB under GNU Emacs
- Reporting Bugs in GDB

- Have you found a bug?
- How to report bugs

- Command Line Editing

- Introduction to Line Editing
- Readline Interaction

- Readline Bare Essentials
- Readline Movement Commands
- Readline Killing Commands
- Readline Arguments

- Readline Init File

- Readline Init Syntax
- Letting Readline Type For You
- Readline vi Mode

- Using History Interactively

- History Interaction

- Event Designators
- Word Designators
- Modifiers

- Formatting Documentation
- Index