Go to the first, previous, next, last section, table of contents.


@dircategory Programming & development tools. * Gdb: (gdb). The GNU debugger.

Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Published by the Free Software Foundation
59 Temple Place - Suite 330,
Boston, MA 02111-1307 USA
ISBN 1-882114-77-9

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below.

(a) The Free Software Foundation's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." @node Top @top Debugging with @value{GDBN} This file describes @value{GDBN}, the @sc{gnu} symbolic debugger. This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version @value{GDBVN}. Copyright (C) 1988-2000 Free Software Foundation, Inc. @menu * Summary:: Summary of @value{GDBN} * Sample Session:: A sample @value{GDBN} session * Invocation:: Getting in and out of @value{GDBN} * Commands:: @value{GDBN} commands * Running:: Running programs under @value{GDBN} * Stopping:: Stopping and continuing * Stack:: Examining the stack * Source:: Examining source files * Data:: Examining data * Languages:: Using @value{GDBN} with different languages * Symbols:: Examining the symbol table * Altering:: Altering execution * GDB Files:: @value{GDBN} files * Targets:: Specifying a debugging target * Configurations:: Configuration-specific information * Controlling GDB:: Controlling @value{GDBN} * Sequences:: Canned sequences of commands * Emacs:: Using @value{GDBN} under @sc{gnu} Emacs * Annotations:: @value{GDBN}'s annotation interface. * GDB Bugs:: Reporting bugs in @value{GDBN} * Formatting Documentation:: How to format and print @value{GDBN} documentation * Command Line Editing:: Command Line Editing * Using History Interactively:: Using History Interactively * Installing GDB:: Installing GDB * GNU Free Documentation License:: The license for this documentation * Index:: Index @end menu

Summary of GDB

The purpose of a debugger such as GDB is to allow you to see what is going on "inside" another program while it executes--or what another program was doing at the moment it crashed.

GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:

You can use GDB to debug programs written in C and C++. For more information, see section Supported languages. For more information, see section C and C++.

Support for Modula-2 and Chill is partial. For information on Modula-2, see section Modula-2. For information on Chill, see section Chill.

Debugging Pascal programs which use sets, subranges, file variables, or nested functions does not currently work. GDB does not support entering expressions, printing values, or similar features using Pascal syntax.

GDB can be used to debug programs written in Fortran, although it may be necessary to refer to some variables with a trailing underscore.


Go to the first, previous, next, last section, table of contents.