Typo.
[deliverable/binutils-gdb.git] / gdb / doc / gdb.top-m4
CommitLineData
9bcc06ef
RP
1_dnl__ -*- Texinfo -*-
2_dnl__ Copyright (c) 1988 1989 1990 1991 Free Software Foundation, Inc.
3_dnl__ This file is part of the source for the GDB manual.
8734fc33 4@c M4 FRAGMENT: $Id$
9bcc06ef
RP
5@c
6@syncodeindex ky cp
7@c FOR UPDATES LEADING TO THIS DRAFT, GDB CHANGELOG CONSULTED BETWEEN:
8@c Sun May 19 05:36:59 1991 John Gilmore (gnu at cygint.cygnus.com)
9@c Sat Dec 22 02:51:40 1990 John Gilmore (gnu at cygint)
10@ifinfo
11This file documents the GNU debugger _GDBN__.
12
13Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
14
15Permission is granted to make and distribute verbatim copies of
16this manual provided the copyright notice and this permission notice
17are preserved on all copies.
18
19@ignore
20Permission is granted to process this file through TeX and print the
21results, provided the printed document carries copying permission
22notice identical to this one except for the removal of this paragraph
23(this paragraph not being relevant to the printed manual).
24
25@end ignore
26Permission is granted to copy and distribute modified versions of this
27manual under the conditions for verbatim copying, provided also that the
28section entitled ``GNU General Public License'' is included exactly as
29in the original, and provided that the entire resulting derived work is
30distributed under the terms of a permission notice identical to this
31one.
32
33Permission is granted to copy and distribute translations of this manual
34into another language, under the above conditions for modified versions,
35except that the section entitled ``GNU General Public License'' may be
36included in a translation approved by the Free Software Foundation
37instead of in the original English.
38@end ifinfo
39@smallbook
40@setchapternewpage odd
41_if__(_GENERIC__)
42@settitle Using _GDBN__ (v4.0)
43_fi__(_GENERIC__)
44_if__(!_GENERIC__)
45@settitle Using _GDBN__ v4.0 (_HOST__)
46_fi__(!_GENERIC__)
47@iftex
8734fc33 48@finalout
9bcc06ef
RP
49@end iftex
50@titlepage
51@title{Using _GDBN__}
52@subtitle{A Guide to the GNU Source-Level Debugger}
53_if__(!_GENERIC__)
54@subtitle{On _HOST__ Systems}
55_fi__(!_GENERIC__)
56@sp 1
57@c Maybe crank this up to "Fourth Edition" when released at FSF
58@c @subtitle Third Edition---_GDBN__ version 4.0
59@subtitle _GDBN__ version 4.0
60@subtitle May 1991
61@author{Richard M. Stallman@qquad @hfill Free Software Foundation}
62@author{Roland H. Pesch@qquad @hfill Cygnus Support}
63@page
8734fc33
RP
64@tex
65{\parskip=0pt
66\hfill rms\@ai.mit.edu, pesch\@cygnus.com\par
67\hfill {\it Using _GDBN__}, \manvers\par
68\hfill \TeX{}info \texinfoversion\par
69}
70@end tex
9bcc06ef 71
9bcc06ef
RP
72@vskip 0pt plus 1filll
73Copyright @copyright{} 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
74
75Permission is granted to make and distribute verbatim copies of
76this manual provided the copyright notice and this permission notice
77are preserved on all copies.
78
79Permission is granted to copy and distribute modified versions of this
80manual under the conditions for verbatim copying, provided also that the
81section entitled ``GNU General Public License'' is included exactly as
82in the original, and provided that the entire resulting derived work is
83distributed under the terms of a permission notice identical to this
84one.
85
86Permission is granted to copy and distribute translations of this manual
87into another language, under the above conditions for modified versions,
88except that the section entitled ``GNU General Public License'' may be
89included in a translation approved by the Free Software Foundation
90instead of in the original English.
91@end titlepage
92@page
93
94@node Top, Summary, (dir), (dir)
95@ifinfo
96This file describes version 4.0 of GDB, the GNU symbolic debugger.
97@end ifinfo
98
99@menu
100* Summary:: Summary of _GDBN__
101* New Features:: New Features in _GDBN__ version 4.0
102* Sample Session:: A Sample _GDBN__ Session
103* Invocation:: Getting In and Out of _GDBN__
104* Commands::
105* Running:: Running Programs Under _GDBN__
106* Stopping:: Stopping and Continuing
107* Stack:: Examining the Stack
108* Source:: Examining Source Files
109* Data:: Examining Data
110* Symbols:: Examining the Symbol Table
111* Altering:: Altering Execution
112* _GDBN__ Files::
113* Targets:: Specifying a Debugging Target
114* Controlling _GDBN__:: Controlling _GDBN__
115* Sequences:: Canned Sequences of Commands
116* Emacs:: Using _GDBN__ under GNU Emacs
8734fc33 117* _GDBN__ Bugs:: Reporting Bugs in _GDBN__
9bcc06ef
RP
118* Renamed Commands::
119* Installing _GDBN__:: Installing _GDBN__
120* Copying:: GNU GENERAL PUBLIC LICENSE
121* Index:: Index
8734fc33
RP
122 --- The Detailed Node Listing ---
123
124Summary of _GDBN__
125
126* Free Software:: Free Software
127* Contributors:: Contributors to _GDBN__
128
129Getting In and Out of _GDBN__
130
131* Starting _GDBN__:: Starting _GDBN__
132* Leaving _GDBN__:: Leaving _GDBN__
133* Shell Commands:: Shell Commands
134
135Starting _GDBN__
136
137* File Options:: Choosing Files
138* Mode Options:: Choosing Modes
139
140_GDBN__ Commands
141
142* Command Syntax:: Command Syntax
143* Help:: Getting Help
144
145Running Programs Under _GDBN__
146
147* Compilation:: Compiling for Debugging
148* Starting:: Starting your Program
149* Arguments:: Your Program's Arguments
150* Environment:: Your Program's Environment
151* Working Directory:: Your Program's Working Directory
152* Input/Output:: Your Program's Input and Output
153* Attach:: Debugging an Already-Running Process
154* Kill Process:: Killing the Child Process
155
156Stopping and Continuing
157
158* Breakpoints:: Breakpoints, Watchpoints, and Exceptions
159* Stepping:: Stepping
160* Continuing:: Continuing
161* Signals:: Signals
162
163Breakpoints, Watchpoints, and Exceptions
164
165* Set Breaks:: Setting Breakpoints
166* Set Watchpoints:: Setting Watchpoints
167* Exception Handling:: Breakpoints and Exceptions
168* Delete Breaks:: Deleting Breakpoints
169* Disabling:: Disabling Breakpoints
170* Conditions:: Break Conditions
171* Break Commands:: Breakpoint Command Lists
172* Breakpoint Menus:: Breakpoint Menus
173* Error in Breakpoints::
174
175Examining the Stack
176
177* Frames:: Stack Frames
178* Backtrace:: Backtraces
179* Selection:: Selecting a Frame
180* Frame Info:: Information on a Frame
181
182Examining Source Files
183
184* List:: Printing Source Lines
185* Search:: Searching Source Files
186* Source Path:: Specifying Source Directories
187* Machine Code:: Source and Machine Code
188
189Examining Data
190
191* Expressions:: Expressions
192* Variables:: Program Variables
193* Arrays:: Artificial Arrays
194* Output formats:: Output formats
195* Memory:: Examining Memory
196* Auto Display:: Automatic Display
197* Print Settings:: Print Settings
198* Value History:: Value History
199* Convenience Vars:: Convenience Variables
200* Registers:: Registers
201* Floating Point Hardware:: Floating Point Hardware
202
203Altering Execution
204
205* Assignment:: Assignment to Variables
206* Jumping:: Continuing at a Different Address
207* Signaling:: Giving the Program a Signal
208* Returning:: Returning from a Function
209* Calling:: Calling your Program's Functions
210
211_GDBN__'s Files
212
213* Files:: Commands to Specify Files
214* Symbol Errors:: Errors Reading Symbol Files
215
216Specifying a Debugging Target
217
218* Active Targets:: Active Targets
219* Target Commands:: Commands for Managing Targets
220* Remote:: Remote Debugging
221
222Remote Debugging
223
224* i960-Nindy Remote::
225* EB29K Remote::
226* VxWorks Remote::
227
228_GDBN__ with a Remote i960 (Nindy)
229
230* Nindy Startup:: Startup with Nindy
231* Nindy Options:: Options for Nindy
232* Nindy reset:: Nindy Reset Command
233
234_GDBN__ with a Remote EB29K
235
236* Comms (EB29K):: Communications Setup
237* gdb-EB29K:: EB29K cross-debugging
238* Remote Log:: Remote Log
239
240_GDBN__ and VxWorks
241
242* VxWorks connection:: Connecting to VxWorks
243* VxWorks download:: VxWorks Download
244* VxWorks attach:: Running Tasks
245
246Controlling _GDBN__
247
248* Prompt:: Prompt
249* Editing:: Command Editing
250* History:: Command History
251* Screen Size:: Screen Size
252* Numbers:: Numbers
253* Messages/Warnings:: Optional Warnings and Messages
254
255Canned Sequences of Commands
256
257* Define:: User-Defined Commands
258* Command Files:: Command Files
259* Output:: Commands for Controlled Output
260
261Reporting Bugs in _GDBN__
262
263* Bug Criteria:: Have You Found a Bug?
264* Bug Reporting:: How to Report Bugs
9bcc06ef
RP
265@end menu
266
267@node Summary, New Features, Top, Top
268@unnumbered Summary of _GDBN__
269
270The purpose of a debugger such as _GDBN__ is to allow you to see what is
271going on ``inside'' another program while it executes---or what another
272program was doing at the moment it crashed.
273
274_GDBN__ can do four main kinds of things (plus other things in support of
275these) to help you catch bugs in the act:
276
277@itemize @bullet
278@item
279Start your program, specifying anything that might affect its behavior.
280
281@item
282Make your program stop on specified conditions.
283
284@item
285Examine what has happened, when your program has stopped.
286
287@item
288Change things in your program, so you can experiment with correcting the
289effects of one bug and go on to learn about another.
290@end itemize
291
292_GDBN__ can be used to debug programs written in C and C++. Pascal support
293is being implemented, and Fortran support will be added when a GNU
294Fortran compiler is ready.
295
296@menu
297* Free Software:: Free Software
298* Contributors:: Contributors to GDB
299@end menu
300
301@node Free Software, Contributors, Summary, Summary
302@unnumberedsec Free Software
303_GDBN__ is @dfn{free software}, protected by the GNU General Public License (GPL).
304The GPL gives you the freedom to copy or adapt a licensed
305program---but every person getting a copy also gets with it the
306freedom to modify that copy (which means that they must get access to
307the source code), and the freedom to distribute further copies.
308Typical software companies use copyrights to limit your freedoms; the
309Free Software Foundation uses the GPL to preserve these freedoms.
310
311Fundamentally, the General Public License is a license which says that
312you have these freedoms and that you can't take these freedoms away
313from anyone else.
314
315@c FIXME: (passim) go through all xrefs, expanding to use text headings
316For full details, @pxref{Copying}.
317@node Contributors, , Free Software, Summary
318@unnumberedsec Contributors to GDB
319
320Richard Stallman was the original author of GDB, as with many GNU
321programs. Many others have contributed to its development. This
322section attempts to credit major contributors. One of the virtues of
323free software is that everyone is free to contribute to it; with
324regret, we cannot actually acknowledge everyone here. The file
325@file{ChangeLog} in the GDB distribution approximates a blow-by-blow
326account.
327
328Changes much prior to version 2.0 are lost in the mists of time.
329
330@quotation
331@emph{Plea:} Additions to this section are particularly welcome. If you
332or your friends (or enemies; let's be evenhanded) have been unfairly
333omitted from this list, we would like to add your names!
334@end quotation
335
336So that they may not regard their long labor as thankless, we
337particularly thank those who shepherded GDB through major releases:
338John Gilmore (release 4.0); Jim Kingdon (releases 3.9, 3.5, 3.4, 3.3);
339and Randy Smith (releases 3.2, 3.1, 3.0). As major maintainer of GDB
340for some period, each contributed significantly to the structure,
341stability, and capabilities of the entire debugger.
342
343Richard Stallman, assisted at various times by Pete TerMaat, Chris
344Hanson, and Richard Mlynarik, handled releases through 2.8.
345
346Michael Tiemann is the author of most of the GNU C++ support in GDB,
347with significant additional contributions from Per Bothner. James
348Clark wrote the GNU C++ demangler. Early work on C++ was by Peter
349TerMaat (who also did much general update work leading to release 3.0).
350
351GDB 4.0 uses the BFD subroutine library to examine multiple
352object-file formats; BFD was a joint project of V. Gumby
353Henkel-Wallace, Rich Pixley, Steve Chamberlain, and John Gilmore.
354
355David Johnson wrote the original COFF support; Pace Willison did
356the original support for encapsulated COFF.
357
358Adam de Boor and Bradley Davis contributed the ISI Optimum V support.
359Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS
360support. Jean-Daniel Fekete contributed Sun 386i support. Chris
361Hanson improved the HP9000 support. Noboyuki Hikichi and Tomoyuki
362Hasei contributed Sony/News OS 3 support. David Johnson contributed
363Encore Umax support. Jyrki Kuoppala contributed Altos 3068 support.
364Keith Packard contributed NS32K support. Doug Rabson contributed
365Acorn Risc Machine support. Chris Smith contributed Convex support
366(and Fortran debugging). Jonathan Stone contributed Pyramid support.
367Michael Tiemann contributed SPARC support. Tim Tucker contributed
368support for the Gould NP1 and Gould Powernode. Pace Willison
369contributed Intel 386 support. Jay Vosburgh contributed Symmetry
370support.
371
372Rich Schaefer helped with support of SunOS shared libraries.
373
374Jay Fenlason and Roland McGrath ensured that GDB and GAS agree about
375several machine instruction sets.
376
377Patrick Duval, Ted Goldstein, Vikram Koka and Glenn Engel helped
378develop remote debugging. Intel Corporation and Wind River Systems
379contributed remote debugging modules for their products.
380
381Brian Fox is the author of the readline libraries providing
382command-line editing and command history.
383
384@node New Features, Sample Session, Summary, Top
385@unnumbered New Features since _GDBN__ version 3.5
386
387@table @emph
388@item Targets
389Using the new command @code{target}, you can select at runtime whether
390you are debugging local files, local processes, standalone systems over
391a serial port, realtime systems over a TCP/IP connection, etc.
392Internally, _GDBN__ now uses a function vector to mediate access to
393different targets; if you need to add your own support for a remote
394protocol, this makes it much easier.
395
396@item Watchpoints
397_GDBN__ now sports watchpoints as well as breakpoints. You can use a
398watchpoint to stop execution whenever the value of an expression
399changes, without having to predict a particular place in your program
400where this may happen.
401
402@item Object Code Formats
403_GDBN__ uses a new scheme called Binary File Descriptors (BFD) to permit
404it to switch dynamically, without reconfiguration or recompilation,
405between different object-file formats. Formats currently supported are
406COFF, a.out, and the Intel 960 b.out; files may be read as .o's, archive
407libraries, or core dumps. BFD is available as a subroutine library so
408that other programs may take advantage of it, and the other GNU binary
409utilities are being converted to use it.
410
411@item Configuration
412Compile-time configuration (to select a particular architecture and
413operating system) is much easier. The script @code{config.gdb} now
414handles specification of separate host and target configurations.
415
416@item Interaction
417The user interface to _GDBN__'s control variables has been simplified
418and consolidated in two commands, @code{set} and @code{show}. Output
419lines are now broken at readable places, rather than overflowing onto
420the next line. You can suppress output of machine-level addresses,
421displaying only source language information.
422
423
424@item Source Language
425_GDBN__ now has limited support for C++ exception handling: _GDBN__ can
426break when an exception is raised, before the stack is peeled back to
427the exception handler's context.
428
429@item Command Rationalization
430Many _GDBN__ commands have been renamed to make them easier to remember
431and use. In particular, the subcommands of @code{info} and
432@code{show}/@code{set} are grouped to make the former refer to the state
433of your program, and the latter refer to the state of _GDBN__ itself.
434@xref{Renamed Commands}, for details on what commands were renamed.
435
436@item Ports
437_GDBN__ has been ported to the following new architectures: AT&T 3b1,
438Acorn RISC machine, HP300 running HPUX, big- and little-endian MIPS
439machines, Motorola 88k, Sun 386i, and Sun 3 running SunOS 4. In
440addition, the following are supported as targets only: AMD 29k, Intel
441960, and Wind River's VxWorks.
442
443@item Shared Libraries
444_GDBN__ 4.0 supports SunOS shared libraries.
445
446@item Work in Progress
447Kernel debugging for BSD and Mach systems; Tahoe and HPPA architecture
448support.
449
450@end table
451
This page took 0.069701 seconds and 4 git commands to generate.