Debugging with gdb
The gnu Source-Level Debugger
Ninth Edition, for gdb version
PACKAGE
(GDB)
Richard Stallman, Roland Pesch, Stan Shebs, et al.
(Send bugs ments on gdb to tware/gdb/bugs/.)
Debugging with gdb
TEXinfo 2003-02-
Published by the Free Software Foundation
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
ISBN 1-882114-77-9
Copyright
c 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms
of the GNU Free Documentation License, Version 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 FSF’s Back-Cover Text is: “You are free to copy and modify this GNU Man-
ual. Buying copies from GNU Press supports the FSF in developing GNU and promoting
software freedom.”
This edition of the GDB manual is dedicated to the memory of Fred Fish. Fred was a
long-standing contributor to GDB and to Free software in general. We will miss him.
i
Table of Contents
ii Debugging with gdb
Summary of gdb 1
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:
• Start your program, specifying anything that might affect its behavior.
• Make your program stop on specified conditions.
• Examine what has happened, when your program has stopped.
• Change things in your program, so you can experiment with correcting the effects of
one bug and go on to learn abo
Debugging with gdb 来自淘豆网m.daumloan.com转载请标明出处.