-_dnl__ -*-Texinfo-*-
-_dnl__ Copyright (c) 1988 1989 1990 1991 1992 Free Software Foundation, Inc.
-_dnl__ $Id$<>_dnl__
\input texinfo @c -*-texinfo-*-
@c Copyright (c) 1988 1989 1990 1991 1992 Free Software Foundation, Inc.
+@c
@c %**start of header
-@setfilename _GDBP__.info
-_if__(_GENERIC__)
-@settitle Debugging with _GDBN__
-_fi__(_GENERIC__)
-_if__(!_GENERIC__)
-@settitle Debugging with _GDBN__ (_HOST__)
-_fi__(!_GENERIC__)
+@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
+@c of @set vars. However, we can override filename with makeinfo -o.
+@setfilename gdb.info
+@c
+@include gdb-config.texi
+@c
+@ifset GENERIC
+@settitle Debugging with @value{GDBN}
+@end ifset
+@ifclear GENERIC
+@settitle Debugging with @value{GDBN} (@value{HOST})
+@end ifclear
@setchapternewpage odd
@c @smallbook
@c @cropmarks
@finalout
@syncodeindex ky cp
-_0__@c ===> NOTE! <==_1__
+@c ===> NOTE! <==
@c Determine the edition number in *three* places by hand:
@c 1. First ifinfo section 2. title page 3. top node
@c To find the locations, search for !!set
END-INFO-DIR-ENTRY
@end format
@end ifinfo
-_if__(0)
-
-NOTE: this manual is marked up for preprocessing with a collection
-of m4 macros called "pretex.m4".
-
-THIS IS THE SOURCE PRIOR TO PREPROCESSING. The full source needs to
-be run through m4 before either tex- or info- formatting: for example,
-_0__
- m4 pretex.m4 none.m4 all.m4 gdb.texinfo >gdb-all.texinfo
-will produce (assuming your path finds either GNU m4 >= 0.84, or SysV
-m4; Berkeley will not do) a file suitable for formatting. See the text in
-"pretex.m4" for a fuller explanation (and the macro definitions).
-_1__
-
-_fi__(0)
+@c
@c
@ifinfo
-This file documents the GNU debugger _GDBN__.
+This file documents the GNU debugger @value{GDBN}.
@c !!set edition, date, version
This is Edition 4.06, October 1992,
-of @cite{Debugging with _GDBN__: the GNU Source-Level Debugger}
-for GDB Version _GDB_VN__.
+of @cite{Debugging with @value{GDBN}: the GNU Source-Level Debugger}
+for GDB Version @value{GDBVN}.
Copyright (C) 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
@end ifinfo
@titlepage
-@title Debugging with _GDBN__
+@title Debugging with @value{GDBN}
@subtitle The GNU Source-Level Debugger
-_if__(!_GENERIC__)
-@subtitle on _HOST__ Systems
-_fi__(!_GENERIC__)
+@ifclear GENERIC
+@subtitle on @value{HOST} Systems
+@end ifclear
@sp 1
@c !!set edition, date, version
-@subtitle Edition 4.06, for _GDBN__ version _GDB_VN__
+@subtitle Edition 4.06, for @value{GDBN} version @value{GDBVN}
@subtitle October 1992
@author by Richard M. Stallman and Roland H. Pesch
@page
@tex
{\parskip=0pt
\hfill pesch\@cygnus.com\par
-\hfill (Send bugs and comments on _GDBN__ to bug-gdb\@prep.ai.mit.edu.)
-\hfill {\it Debugging with _GDBN__}, \manvers\par
+\hfill (Send bugs and comments on @value{GDBN} to bug-gdb\@prep.ai.mit.edu.)\par
+\hfill {\it Debugging with @value{GDBN}}, \manvers\par
\hfill \TeX{}info \texinfoversion\par
}
@end tex
@ifinfo
@node Top
-@top Debugging with _GDBN__
+@top Debugging with @value{GDBN}
-This file describes _GDBN__, the GNU symbolic debugger.
+This file describes @value{GDBN}, the GNU symbolic debugger.
@c !!set edition, date, version
-This is Edition 4.06, October 1992, for GDB Version _GDB_VN__.
-@end ifinfo
+This is Edition 4.06, October 1992, for GDB Version @value{GDBVN}.
+@c Makeinfo node defaulting gets very confused by conditionals in menus,
+@c unfortunately. Otherwise we would use the following ignored menu,
+@c which involves four switches:
+@ignore
@menu
-* Summary:: Summary of _GDBN__
-_if__(_GENERIC__ || !_H8__)
+* Summary:: Summary of @value{GDBN}
+@ifset NOVEL
* New Features:: New features since GDB version 3.5
-_fi__(_GENERIC__ || !_H8__)
-_if__(!_BARE__)
-* Sample Session:: A sample _GDBN__ session
-_fi__(!_BARE__)
-* Invocation:: Getting in and out of _GDBN__
-* Commands:: _GDBN__ commands
-* Running:: Running programs under _GDBN__
+@end ifset
+@ifclear BARETARGET
+* Sample Session:: A sample @value{GDBN} session
+@end ifclear
+* 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
-_if__(!_CONLY__)
-* Languages:: Using _GDBN__ with different languages
-_fi__(!_CONLY__)
-_if__(_CONLY__)
+@ifclear CONLY
+* Languages:: Using @value{GDBN} with different languages
+@end ifclear
+@ifset CONLY
* C:: C and C++
-_fi__(_CONLY__)
+@end ifset
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+@ifclear DOSHOST
+* Emacs:: Using @value{GDBN} under GNU Emacs
+@end ifclear
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+@ifset NOVEL
+* Renamed Commands::
+@end ifset
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ignore
+@c
+@c Since that doesn't work, we must unroll the above into 16 cases:
+@c
+@c Menu for NOVEL && !BARETARGET && !CONLY && !DOSHOST
+@ifset NOVEL
+@ifclear BARETARGET
+@ifclear CONLY
+@ifclear DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifclear
+@end ifclear
+@end ifset
+
+@c Menu for NOVEL && !BARETARGET && !CONLY && DOSHOST
+@ifset NOVEL
+@ifclear BARETARGET
+@ifclear CONLY
+@ifset DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifclear
+@end ifclear
+@end ifset
+
+@c Menu for NOVEL && !BARETARGET && CONLY && !DOSHOST
+@ifset NOVEL
+@ifclear BARETARGET
+@ifset CONLY
+@ifclear DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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
+* C:: C Language Support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifset
+@end ifclear
+@end ifset
+
+@c Menu for NOVEL && !BARETARGET && CONLY && DOSHOST
+@ifset NOVEL
+@ifclear BARETARGET
+@ifset CONLY
+@ifset DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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
+* C:: C Language Support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifset
+@end ifclear
+@end ifset
+
+@c Menu for NOVEL && BARETARGET && !CONLY && !DOSHOST
+@ifset NOVEL
+@ifset BARETARGET
+@ifclear CONLY
+@ifclear DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifclear
+@end ifset
+@end ifset
+
+@c Menu for NOVEL && BARETARGET && !CONLY && DOSHOST
+@ifset NOVEL
+@ifset BARETARGET
+@ifclear CONLY
+@ifset DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifclear
+@end ifset
+@end ifset
+
+@c Menu for NOVEL && BARETARGET && CONLY && !DOSHOST
+@ifset NOVEL
+@ifset BARETARGET
+@ifset CONLY
+@ifclear DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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
+* C:: C Language support
* Symbols:: Examining the symbol table
* Altering:: Altering execution
-* _GDBN__ Files:: _GDBN__'s files
+* GDB Files:: @value{GDBN}'s files
* Targets:: Specifying a debugging target
-* Controlling _GDBN__:: Controlling _GDBN__
+* Controlling GDB:: Controlling @value{GDBN}
* Sequences:: Canned sequences of commands
-_if__(!_DOSHOST__)
-* Emacs:: Using _GDBN__ under GNU Emacs
-_fi__(!_DOSHOST__)
-* _GDBN__ Bugs:: Reporting bugs in _GDBN__
-_if__(_GENERIC__||!_H8__)
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
* Renamed Commands::
-_fi__(_GENERIC__||!_H8__)
* Formatting Documentation:: How to format and print GDB documentation
* Installing GDB:: Installing GDB
* Copying:: GNU GENERAL PUBLIC LICENSE
* Index:: Index
@end menu
+@end ifclear
+@end ifset
+@end ifset
+@end ifset
+
+@c Menu for NOVEL && BARETARGET && CONLY && DOSHOST
+@ifset NOVEL
+@ifset BARETARGET
+@ifset CONLY
+@ifset DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* New Features:: New features since GDB version 3.5
+* 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
+* C:: C Language support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Renamed Commands::
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifset
+@end ifset
+@end ifset
+
+@c Menu for !NOVEL && !BARETARGET && !CONLY && !DOSHOST
+@ifclear NOVEL
+@ifclear BARETARGET
+@ifclear CONLY
+@ifclear DOSHOST
+@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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifclear
+@end ifclear
+@end ifclear
+
+@c Menu for !NOVEL && !BARETARGET && !CONLY && DOSHOST
+@ifclear NOVEL
+@ifclear BARETARGET
+@ifclear CONLY
+@ifset DOSHOST
+@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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifclear
+@end ifclear
+@end ifclear
+
+@c Menu for !NOVEL && !BARETARGET && CONLY && !DOSHOST
+@ifclear NOVEL
+@ifclear BARETARGET
+@ifset CONLY
+@ifclear DOSHOST
+@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
+* C:: C Language support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifset
+@end ifclear
+@end ifclear
+
+@c Menu for !NOVEL && !BARETARGET && CONLY && DOSHOST
+@ifclear NOVEL
+@ifclear BARETARGET
+@ifset CONLY
+@ifset DOSHOST
+@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
+* C:: C Language support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifset
+@end ifclear
+@end ifclear
+
+@c Menu for !NOVEL && BARETARGET && !CONLY && !DOSHOST
+@ifclear NOVEL
+@ifset BARETARGET
+@ifclear CONLY
+@ifclear DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* 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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifclear
+@end ifset
+@end ifclear
+
+@c Menu for !NOVEL && BARETARGET && !CONLY && DOSHOST
+@ifclear NOVEL
+@ifset BARETARGET
+@ifclear CONLY
+@ifset DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* 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}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifclear
+@end ifset
+@end ifclear
+
+@c Menu for !NOVEL && BARETARGET && CONLY && !DOSHOST
+@ifclear NOVEL
+@ifset BARETARGET
+@ifset CONLY
+@ifclear DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* 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
+* C:: C Language Support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* Emacs:: Using @value{GDBN} under GNU Emacs
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifclear
+@end ifset
+@end ifset
+@end ifclear
+
+@c Menu for !NOVEL && BARETARGET && CONLY && DOSHOST
+@ifclear NOVEL
+@ifset BARETARGET
+@ifset CONLY
+@ifset DOSHOST
+@menu
+* Summary:: Summary of @value{GDBN}
+* 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
+* C:: C Language Support
+* Symbols:: Examining the symbol table
+* Altering:: Altering execution
+* GDB Files:: @value{GDBN}'s files
+* Targets:: Specifying a debugging target
+* Controlling GDB:: Controlling @value{GDBN}
+* Sequences:: Canned sequences of commands
+* GDB Bugs:: Reporting bugs in @value{GDBN}
+* Formatting Documentation:: How to format and print GDB documentation
+* Installing GDB:: Installing GDB
+* Copying:: GNU GENERAL PUBLIC LICENSE
+* Index:: Index
+@end menu
+@end ifset
+@end ifset
+@end ifset
+@end ifclear
+
+@end ifinfo
@node Summary
-@unnumbered Summary of _GDBN__
+@unnumbered Summary of @value{GDBN}
-The purpose of a debugger such as _GDBN__ is to allow you to see what is
+The purpose of a debugger such as @value{GDBN} 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.
-_GDBN__ can do four main kinds of things (plus other things in support of
+@value{GDBN} can do four main kinds of things (plus other things in support of
these) to help you catch bugs in the act:
@itemize @bullet
effects of one bug and go on to learn about another.
@end itemize
-_if__(!_CONLY__)
-You can use _GDBN__ to debug programs written in C, C++, and Modula-2.
+@ifclear CONLY
+You can use @value{GDBN} to debug programs written in C, C++, and Modula-2.
Fortran support will be added when a GNU Fortran compiler is ready.
-_fi__(!_CONLY__)
+@end ifclear
@menu
* Free Software:: Free Software
@node Free Software
@unnumberedsec Free Software
-_GDBN__ is @dfn{free software}, protected by the GNU General Public License
+@value{GDBN} is @dfn{free software}, protected by the GNU General Public License
(GPL). The GPL gives you the freedom to copy or adapt a licensed
program---but every person getting a copy also gets with it the
freedom to modify that copy (which means that they must get access to
you have these freedoms and that you cannot take these freedoms away
from anyone else.
-_if__(!_AGGLOMERATION__)
+@ifclear AGGLOMERATION
For full details, @pxref{Copying, ,GNU GENERAL PUBLIC LICENSE}.
-_fi__(!_AGGLOMERATION__)
+@end ifclear
@node Contributors
@unnumberedsec Contributors to GDB
Fred Fish wrote most of the support for Unix System Vr4, and enhanced
the command-completion support to cover C++ overloaded symbols.
-_if__(_GENERIC__ || !_H8__)
+@ifset NOVEL
@node New Features
@unnumbered New Features since GDB version 3.5
Kernel debugging for BSD and Mach systems; Tahoe and HPPA architecture
support.
@end table
-_fi__(_GENERIC__ || !_H8__)
+@end ifset
-_if__(!_BARE__)
+@ifclear BARETARGET
@node Sample Session
-@chapter A Sample _GDBN__ Session
+@chapter A Sample @value{GDBN} Session
-You can use this manual at your leisure to read all about _GDBN__.
+You can use this manual at your leisure to read all about @value{GDBN}.
However, a handful of commands are enough to get started using the
debugger. This chapter illustrates these commands.
@c FIXME: this example may not be appropriate for some configs, where
@c FIXME...primary interest is in remote use.
-_0__
+
One of the preliminary versions of GNU @code{m4} (a generic macro
processor) exhibits the following bug: sometimes, when we change its
quote strings from the default, the commands used to capture one macro's
@end smallexample
@noindent
-Let's use _GDBN__ to try to see what's going on.
+Let's use @value{GDBN} to try to see what's going on.
@smallexample
-$ @b{_GDBP__ m4}
+$ @b{@value{GDBP} m4}
@c FIXME: this falsifies the exact text played out, to permit smallbook
@c FIXME... format to come out better.
GDB is free software and you are welcome to distribute copies
the conditions.
There is absolutely no warranty for GDB; type "show warranty"
for details.
-GDB _GDB_VN__, Copyright 1992 Free Software Foundation, Inc...
-(_GDBP__)
+GDB @value{GDBVN}, Copyright 1992 Free Software Foundation, Inc...
+(@value{GDBP})
@end smallexample
@noindent
-_GDBN__ reads only enough symbol data to know where to find the rest when
+@value{GDBN} reads only enough symbol data to know where to find the rest when
needed; as a result, the first prompt comes up very quickly. We now
-tell _GDBN__ to use a narrower display width than usual, so that examples
+tell @value{GDBN} to use a narrower display width than usual, so that examples
will fit in this manual.
@smallexample
-(_GDBP__) @b{set width 70}
+(@value{GDBP}) @b{set width 70}
@end smallexample
@noindent
Let's see how the @code{m4} built-in @code{changequote} works.
Having looked at the source, we know the relevant subroutine is
-@code{m4_changequote}, so we set a breakpoint there with _GDBN__'s
+@code{m4_changequote}, so we set a breakpoint there with @value{GDBN}'s
@code{break} command.
@smallexample
-(_GDBP__) @b{break m4_changequote}
+(@value{GDBP}) @b{break m4_changequote}
Breakpoint 1 at 0x62f4: file builtin.c, line 879.
@end smallexample
@noindent
-Using the @code{run} command, we start @code{m4} running under _GDBN__
+Using the @code{run} command, we start @code{m4} running under @value{GDBN}
control; as long as control does not reach the @code{m4_changequote}
subroutine, the program runs as usual:
@smallexample
-(_GDBP__) @b{run}
+(@value{GDBP}) @b{run}
Starting program: /work/Editorial/gdb/gnu/m4/m4
@b{define(foo,0000)}
@end smallexample
@noindent
-To trigger the breakpoint, we call @code{changequote}. _GDBN__
+To trigger the breakpoint, we call @code{changequote}. @value{GDBN}
suspends execution of @code{m4}, displaying information about the
context where it stops.
the next line of the current function.
@smallexample
-(_GDBP__) @b{n}
+(@value{GDBP}) @b{n}
882 set_quotes((argc >= 2) ? TOKEN_DATA_TEXT(argv[1])\
: nil,
@end smallexample
subroutine, so it steps into @code{set_quotes}.
@smallexample
-(_GDBP__) @b{s}
+(@value{GDBP}) @b{s}
set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>")
at input.c:530
530 if (lquote != def_lquote)
stack frame for each active subroutine.
@smallexample
-(_GDBP__) @b{bt}
+(@value{GDBP}) @b{bt}
#0 set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>")
at input.c:530
#1 0x6344 in m4_changequote (argc=3, argv=0x33c70)
falling into the @code{xstrdup} subroutine.
@smallexample
-(_GDBP__) @b{s}
+(@value{GDBP}) @b{s}
0x3b5c 532 if (rquote != def_rquote)
-(_GDBP__) @b{s}
+(@value{GDBP}) @b{s}
0x3b80 535 lquote = (lq == nil || *lq == '\0') ? \
def_lquote : xstrdup(lq);
-(_GDBP__) @b{n}
+(@value{GDBP}) @b{n}
536 rquote = (rq == nil || *rq == '\0') ? def_rquote\
: xstrdup(rq);
-(_GDBP__) @b{n}
+(@value{GDBP}) @b{n}
538 len_lquote = strlen(rquote);
@end smallexample
(@code{print}) to see their values.
@smallexample
-(_GDBP__) @b{p lquote}
+(@value{GDBP}) @b{p lquote}
$1 = 0x35d40 "<QUOTE>"
-(_GDBP__) @b{p rquote}
+(@value{GDBP}) @b{p rquote}
$2 = 0x35d50 "<UNQUOTE>"
@end smallexample
surrounding the current line, with the @code{l} (@code{list}) command.
@smallexample
-(_GDBP__) @b{l}
+(@value{GDBP}) @b{l}
533 xfree(rquote);
534
535 lquote = (lq == nil || *lq == '\0') ? def_lquote\
@code{len_rquote}, and then examine the values of those variables.
@smallexample
-(_GDBP__) @b{n}
+(@value{GDBP}) @b{n}
539 len_rquote = strlen(lquote);
-(_GDBP__) @b{n}
+(@value{GDBP}) @b{n}
540 @}
-(_GDBP__) @b{p len_lquote}
+(@value{GDBP}) @b{p len_lquote}
$3 = 9
-(_GDBP__) @b{p len_rquote}
+(@value{GDBP}) @b{p len_rquote}
$4 = 7
@end smallexample
assignments.
@smallexample
-(_GDBP__) @b{p len_lquote=strlen(lquote)}
+(@value{GDBP}) @b{p len_lquote=strlen(lquote)}
$5 = 7
-(_GDBP__) @b{p len_rquote=strlen(rquote)}
+(@value{GDBP}) @b{p len_rquote=strlen(rquote)}
$6 = 9
@end smallexample
example that caused trouble initially:
@smallexample
-(_GDBP__) @b{c}
+(@value{GDBP}) @b{c}
Continuing.
@b{define(baz,defn(<QUOTE>foo<UNQUOTE>))}
@end smallexample
@noindent
-The message @samp{Program exited normally.} is from _GDBN__; it
-indicates @code{m4} has finished executing. We can end our _GDBN__
-session with the _GDBN__ @code{quit} command.
+The message @samp{Program exited normally.} is from @value{GDBN}; it
+indicates @code{m4} has finished executing. We can end our @value{GDBN}
+session with the @value{GDBN} @code{quit} command.
@smallexample
-(_GDBP__) @b{quit}
-_1__@end smallexample
-_fi__(!_BARE__)
+(@value{GDBP}) @b{quit}
+@end smallexample
+@end ifclear
@node Invocation
-@chapter Getting In and Out of _GDBN__
+@chapter Getting In and Out of @value{GDBN}
-This chapter discusses how to start _GDBN__, and how to get out of it.
-(The essentials: type @samp{_GDBP__} to start GDB, and type @kbd{quit}
+This chapter discusses how to start @value{GDBN}, and how to get out of it.
+(The essentials: type @samp{@value{GDBP}} to start GDB, and type @kbd{quit}
or @kbd{C-d} to exit.)
+@ignore
+@c original form of menu, pre-unfolding:
@menu
-* Invoking _GDBN__:: Starting _GDBN__
-* Leaving _GDBN__:: Leaving _GDBN__
-_if__(!_BARE__)
+* Invoking GDB:: Starting @value{GDBN}
+* Leaving GDB:: Leaving @value{GDBN}
+@ifclear BARETARGET
* Shell Commands:: Shell Commands
-_fi__(!_BARE__)
+@end ifclear
@end menu
+@end ignore
-@node Invoking _GDBN__
-@section Starting _GDBN__
+@ifclear BARETARGET
+@menu
+* Invoking GDB:: Starting @value{GDBN}
+* Leaving GDB:: Leaving @value{GDBN}
+* Shell Commands:: Shell Commands
+@end menu
+@end ifclear
-_if__(_H8__)
-For details on starting up _GDBP__ as a
+@ifset BARETARGET
+@menu
+* Invoking GDB:: Starting @value{GDBN}
+* Leaving GDB:: Leaving @value{GDBN}
+@end menu
+@end ifset
+
+@node Invoking GDB
+@section Starting @value{GDBN}
+
+@ifset HviiiEXCLUSIVE
+For details on starting up @value{GDBP} as a
remote debugger attached to a Hitachi H8/300 board, see @ref{Hitachi
-H8/300 Remote,,_GDBN__ and the Hitachi H8/300}.
-_fi__(_H8__)
+H8/300 Remote,,@value{GDBN} and the Hitachi H8/300}.
+@end ifset
-Start _GDBN__ by running the program @code{_GDBP__}. Once it's running,
-_GDBN__ reads commands from the terminal until you tell it to exit.
+Start @value{GDBN} by running the program @code{@value{GDBP}}. Once it's running,
+@value{GDBN} reads commands from the terminal until you tell it to exit.
-You can also run @code{_GDBP__} with a variety of arguments and options,
+You can also run @code{@value{GDBP}} with a variety of arguments and options,
to specify more of your debugging environment at the outset.
-_if__(_GENERIC__)
+@ifset GENERIC
The command-line options described here are designed
to cover a variety of situations; in some environments, some of these
options may effectively be unavailable.
-_fi__(_GENERIC__)
+@end ifset
-The most usual way to start _GDBN__ is with one argument,
+The most usual way to start @value{GDBN} is with one argument,
specifying an executable program:
@example
-_GDBP__ @var{program}
+@value{GDBP} @var{program}
@end example
-_if__(!_BARE__)
+@ifclear BARETARGET
@noindent
You can also start with both an executable program and a core file
specified:
@example
-_GDBP__ @var{program} @var{core}
+@value{GDBP} @var{program} @var{core}
@end example
You can, instead, specify a process ID as a second argument, if you want
to debug a running process:
@example
-_GDBP__ @var{program} 1234
+@value{GDBP} @var{program} 1234
@end example
@noindent
-would attach _GDBN__ to process @code{1234} (unless you also have a file
-named @file{1234}; _GDBN__ does check for a core file first).
+would attach @value{GDBN} to process @code{1234} (unless you also have a file
+named @file{1234}; @value{GDBN} does check for a core file first).
Taking advantage of the second command-line argument requires a fairly
-complete operating system; when you use _GDBN__ as a remote debugger
+complete operating system; when you use @value{GDBN} as a remote debugger
attached to a bare board, there may not be any notion of ``process'',
and there is often no way to get a core dump.
-_fi__(!_BARE__)
+@end ifclear
@noindent
-You can further control how _GDBN__ starts up by using command-line
-options. _GDBN__ itself can remind you of the options available.
+You can further control how @value{GDBN} starts up by using command-line
+options. @value{GDBN} itself can remind you of the options available.
@noindent
Type
@example
-_GDBP__ -help
+@value{GDBP} -help
@end example
@noindent
to display all available options and briefly describe their use
-(@samp{_GDBP__ -h} is a shorter equivalent).
+(@samp{@value{GDBP} -h} is a shorter equivalent).
All options and command line arguments you give are processed
in sequential order. The order makes a difference when the
@samp{-x} option is used.
+
+@ignore
+@c original, intended form of this menu (pre-unfolding):
@menu
-_if__(!_GENERIC__)
-_include__(gdbinv-m.m4)_dnl__
-_fi__(!_GENERIC__)
+@ifclear GENERIC
+@ifset REMOTESTUB
+* Remote Serial:: @value{GDBN} remote serial protocol
+@end ifset
+@ifset Icmlx
+* i960-Nindy Remote:: @value{GDBN} with a remote i960 (Nindy)
+@end ifset
+@ifset AMDxxixK
+* EB29K Remote:: @value{GDBN} with a remote EB29K
+@end ifset
+@ifset VXWORKS
+* VxWorks Remote:: @value{GDBN} and VxWorks
+@end ifset
+@ifset STmm
+* ST2000 Remote:: @value{GDBN} with a Tandem ST2000
+@end ifset
+@ifset Hviii
+* Hitachi H8/300 Remote:: @value{GDBN} and the Hitachi H8/300
+@end ifset
+@ifset ZviiiK
+* Z8000 Simulator:: @value{GDBN} and its Zilog Z8000 Simulator
+@end ifset
+@end ifclear
* File Options:: Choosing Files
* Mode Options:: Choosing Modes
@end menu
+@end ignore
-_if__(!_GENERIC__)
-_include__(gdbinv-s.m4)
-_fi__(!_GENERIC__)
+@c Unfolded form:
+@c Sigh--- GENERIC plus 7 switches mean 1+2^7 forms of this menu!
+@c Add them only on demand; no point in including forms for which
+@c there's no defined config file. Maybe by the time all are needed,
+@c makeinfo will be capable of dealing with menus like the above.
+
+@ifset GENERIC
+@menu
+* File Options:: Choosing Files
+* Mode Options:: Choosing Modes
+@end menu
+@end ifset
+
+@c Hviii config: !GENERIC && Hviii && nothing else
+@ifclear GENERIC
+@ifclear REMOTESTUB
+@ifclear Icmlx
+@ifclear AMDxxixK
+@ifclear VXWORKS
+@ifclear STmm
+@ifset Hviii
+@ifclear ZviiiK
+@menu
+* Hitachi H8/300 Remote:: @value{GDBN} and the Hitachi H8/300
+* File Options:: Choosing Files
+* Mode Options:: Choosing Modes
+@end menu
+@end ifclear
+@end ifset
+@end ifclear
+@end ifclear
+@end ifclear
+@end ifclear
+@end ifclear
+@end ifclear
+
+@ifclear GENERIC
+@include gdbinv-s.texi
+@end ifclear
@node File Options
@subsection Choosing Files
-_if__(!_BARE__)
-When _GDBN__ starts, it reads any arguments other than options as
+@ifclear BARETARGET
+When @value{GDBN} starts, it reads any arguments other than options as
specifying an executable file and core file (or process ID). This is
the same as if the arguments were specified by the @samp{-se} and
-@samp{-c} options respectively. (_GDBN__ reads the first argument
+@samp{-c} options respectively. (@value{GDBN} reads the first argument
that does not have an associated option flag as equivalent to the
@samp{-se} option followed by that argument; and the second argument
that does not have an associated option flag, if any, as equivalent to
the @samp{-c} option followed by that argument.)
-_fi__(!_BARE__)
-_if__(_BARE__)
-When _GDBN__ starts, it reads any argument other than options as
+@end ifclear
+@ifset BARETARGET
+When @value{GDBN} starts, it reads any argument other than options as
specifying an executable file. This is the same as if the argument was
specified by the @samp{-se} option.
-_fi__(_BARE__)
+@end ifset
Many options have both long and short forms; both are shown in the
-following list. _GDBN__ also recognizes the long forms if you truncate
+following list. @value{GDBN} also recognizes the long forms if you truncate
them, so long as enough of the option is present to be unambiguous.
(If you prefer, you can flag option arguments with @samp{--} rather
than @samp{-}, though we illustrate the more usual convention.)
Read symbol table from file @var{file} and use it as the executable
file.
-_if__(!_BARE__)
+@ifclear BARETARGET
@item -core=@var{file}
@itemx -c @var{file}
Use file @var{file} as a core dump to examine.
-_fi__(!_BARE__)
+@end ifclear
@item -command=@var{file}
@itemx -x @var{file}
-Execute _GDBN__ commands from file @var{file}. @xref{Command Files}.
+Execute @value{GDBN} commands from file @var{file}. @xref{Command Files}.
@item -directory=@var{directory}
@itemx -d @var{directory}
Add @var{directory} to the path to search for source files.
-_if__(!_BARE__)
+@ifclear BARETARGET
@item -m
@itemx -mapped
@emph{Warning: this option depends on operating system facilities that are not
supported on all systems.}@*
If memory-mapped files are available on your system through the @code{mmap}
system call, you can use this option
-to have _GDBN__ write the symbols from your
+to have @value{GDBN} write the symbols from your
program into a reusable file in the current directory. If the program you are debugging is
called @file{/tmp/fred}, the mapped symbol file will be @file{./fred.syms}.
-Future _GDBN__ debugging sessions will notice the presence of this file,
+Future @value{GDBN} debugging sessions will notice the presence of this file,
and will quickly map in symbol information from it, rather than reading
the symbol table from the executable program.
-The @file{.syms} file is specific to the host machine on which _GDBN__ is run.
-It holds an exact image of _GDBN__'s internal symbol table. It cannot be
+The @file{.syms} file is specific to the host machine on which @value{GDBN} is run.
+It holds an exact image of @value{GDBN}'s internal symbol table. It cannot be
shared across multiple host platforms.
-_fi__(!_BARE__)
+@end ifclear
@item -r
@itemx -readnow
This makes startup slower, but makes future operations faster.
@end table
-_if__(!_BARE__)
+@ifclear BARETARGET
The @code{-mapped} and @code{-readnow} options are typically combined in order to
build a @file{.syms} file that contains complete symbol information.
A simple GDB invocation to do nothing but build a @file{.syms} file for future
@example
gdb -batch -nx -mapped -readnow programname
@end example
-_fi__(!_BARE__)
+@end ifclear
@node Mode Options
@subsection Choosing Modes
-You can run _GDBN__ in various alternative modes---for example, in
+You can run @value{GDBN} in various alternative modes---for example, in
batch mode or quiet mode.
@table @code
@item -nx
@itemx -n
-Do not execute commands from any @file{_GDBINIT__} initialization files.
+Do not execute commands from any @file{@value{GDBINIT}} initialization files.
Normally, the commands in these files are executed after all the
command options and arguments have been processed.
@xref{Command Files}.
@item -batch
Run in batch mode. Exit with status @code{0} after processing all the command
-files specified with @samp{-x} (and @file{_GDBINIT__}, if not inhibited).
-Exit with nonzero status if an error occurs in executing the _GDBN__
+files specified with @samp{-x} (and @file{@value{GDBINIT}}, if not inhibited).
+Exit with nonzero status if an error occurs in executing the @value{GDBN}
commands in the command files.
-Batch mode may be useful for running _GDBN__ as a filter, for example to
+Batch mode may be useful for running @value{GDBN} as a filter, for example to
download and run a program on another computer; in order to make this
more useful, the message
@end example
@noindent
-(which is ordinarily issued whenever a program running under _GDBN__ control
+(which is ordinarily issued whenever a program running under @value{GDBN} control
terminates) is not issued when running in batch mode.
@item -cd=@var{directory}
-Run _GDBN__ using @var{directory} as its working directory,
+Run @value{GDBN} using @var{directory} as its working directory,
instead of the current directory.
-_if__(_LUCID__)
+@ifset LUCID
@item -context @var{authentication}
-When the Energize programming system starts up _GDBN__, it uses this
+When the Energize programming system starts up @value{GDBN}, it uses this
option to trigger an alternate mode of interaction.
-@var{authentication} is a pair of numeric codes that identify _GDBN__
+@var{authentication} is a pair of numeric codes that identify @value{GDBN}
as a client in the Energize environment. Avoid this option when you run
-_GDBN__ directly from the command line. See @ref{Energize,,Using
-_GDBN__ with Energize} for more discussion of using _GDBN__ with Energize.
-_fi__(_LUCID__)
+@value{GDBN} directly from the command line. See @ref{Energize,,Using
+@value{GDBN} with Energize} for more discussion of using @value{GDBN} with Energize.
+@end ifset
@item -fullname
@itemx -f
-Emacs sets this option when it runs _GDBN__ as a subprocess. It tells _GDBN__
+Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells @value{GDBN}
to output the full file name and line number in a standard,
recognizable fashion each time a stack frame is displayed (which
includes each time your program stops). This recognizable format looks
like two @samp{\032} characters, followed by the file name, line number
and character position separated by colons, and a newline. The
-Emacs-to-_GDBN__ interface program uses the two @samp{\032} characters as
+Emacs-to-@value{GDBN} interface program uses the two @samp{\032} characters as
a signal to display the source code for the frame.
-_if__(_GENERIC__ || !_H8__)
+@ifset SERIAL
@item -b @var{bps}
Set the line speed (baud rate or bits per second) of any serial
-interface used by _GDBN__ for remote debugging.
+interface used by @value{GDBN} for remote debugging.
@item -tty=@var{device}
Run using @var{device} for your program's standard input and output.
@c FIXME: kingdon thinks there is more to -tty. Investigate.
-_fi__(_GENERIC__ || !_H8__)
+@end ifset
@end table
-@node Leaving _GDBN__
-@section Leaving _GDBN__
-@cindex exiting _GDBN__
+@node Leaving GDB
+@section Leaving @value{GDBN}
+@cindex exiting @value{GDBN}
@table @code
@item quit
@kindex quit
@kindex q
-To exit _GDBN__, use the @code{quit} command (abbreviated @code{q}), or type
+To exit @value{GDBN}, use the @code{quit} command (abbreviated @code{q}), or type
an end-of-file character (usually @kbd{C-d}).
@end table
@cindex interrupt
-An interrupt (often @kbd{C-c}) will not exit from _GDBN__, but rather
-will terminate the action of any _GDBN__ command that is in progress and
-return to _GDBN__ command level. It is safe to type the interrupt
-character at any time because _GDBN__ does not allow it to take effect
+An interrupt (often @kbd{C-c}) will not exit from @value{GDBN}, but rather
+will terminate the action of any @value{GDBN} command that is in progress and
+return to @value{GDBN} command level. It is safe to type the interrupt
+character at any time because @value{GDBN} does not allow it to take effect
until a time when it is safe.
-_if__(!_BARE__)
-If you have been using _GDBN__ to control an attached process or device, you
+@ifclear BARETARGET
+If you have been using @value{GDBN} to control an attached process or device, you
can release it with the @code{detach} command; @pxref{Attach,
,Debugging an Already-Running Process}..
-_fi__(!_BARE__)
+@end ifclear
-_if__(!_BARE__)
+@ifclear BARETARGET
@node Shell Commands
@section Shell Commands
If you need to execute occasional shell commands during your
-debugging session, there is no need to leave or suspend _GDBN__; you can
+debugging session, there is no need to leave or suspend @value{GDBN}; you can
just use the @code{shell} command.
@table @code
@item shell @var{command string}
@kindex shell
@cindex shell escape
-Directs _GDBN__ to invoke an inferior shell to execute @var{command
+Directs @value{GDBN} to invoke an inferior shell to execute @var{command
string}. If it exists, the environment variable @code{SHELL} is used
-for the name of the shell to run. Otherwise _GDBN__ uses
+for the name of the shell to run. Otherwise @value{GDBN} uses
@code{/bin/sh}.
@end table
The utility @code{make} is often needed in development environments.
-You do not have to use the @code{shell} command for this purpose in _GDBN__:
+You do not have to use the @code{shell} command for this purpose in @value{GDBN}:
@table @code
@item make @var{make-args}
@kindex make
@cindex calling make
-Causes _GDBN__ to execute an inferior @code{make} program with the specified
+Causes @value{GDBN} to execute an inferior @code{make} program with the specified
arguments. This is equivalent to @samp{shell make @var{make-args}}.
@end table
-_fi__(!_BARE__)
+@end ifclear
@node Commands
-@chapter _GDBN__ Commands
+@chapter @value{GDBN} Commands
-You can abbreviate a _GDBN__ command to the first few letters of the command
+You can abbreviate a @value{GDBN} command to the first few letters of the command
name, if that abbreviation is unambiguous; and you can repeat certain
-_GDBN__ commands by typing just @key{RET}. You can also use the @key{TAB}
-key to get _GDBN__ to fill out the rest of a word in a command (or to
+@value{GDBN} commands by typing just @key{RET}. You can also use the @key{TAB}
+key to get @value{GDBN} to fill out the rest of a word in a command (or to
show you the alternatives available, if there's more than one possibility).
@menu
@node Command Syntax
@section Command Syntax
-A _GDBN__ command is a single line of input. There is no limit on how long
+A @value{GDBN} command is a single line of input. There is no limit on how long
it can be. It starts with a command name, which is followed by arguments
whose meaning depends on the command name. For example, the command
@code{step} accepts an argument which is the number of times to step,
no arguments. Some command names do not allow any arguments.
@cindex abbreviation
-_GDBN__ command names may always be truncated if that abbreviation is
+@value{GDBN} command names may always be truncated if that abbreviation is
unambiguous. Other possible command abbreviations are listed in the
documentation for individual commands. In some cases, even ambiguous
abbreviations are allowed; for example, @code{s} is specially defined as
@cindex repeating commands
@kindex RET
-A blank line as input to _GDBN__ (typing just @key{RET}) means to
+A blank line as input to @value{GDBN} (typing just @key{RET}) means to
repeat the previous command. Certain commands (for example, @code{run})
will not repeat this way; these are commands for which unintentional
repetition might cause trouble and which you are unlikely to want to
@key{RET}, construct new arguments rather than repeating
exactly as typed. This permits easy scanning of source or memory.
-_GDBN__ can also use @key{RET} in another way: to partition lengthy
+@value{GDBN} can also use @key{RET} in another way: to partition lengthy
output, in a way similar to the common utility @code{more}
(@pxref{Screen Size}). Since it is easy to press one @key{RET} too many
-in this situation, _GDBN__ disables command repetition after any command
+in this situation, @value{GDBN} disables command repetition after any command
that generates this sort of display.
@kindex #
@cindex completion
@cindex word completion
-_GDBN__ can fill in the rest of a word in a command for you, if there's
+@value{GDBN} can fill in the rest of a word in a command for you, if there's
only one possibility; it can also show you what the valid possibilities
-are for the next word in a command, at any time. This works for _GDBN__
-commands, _GDBN__ subcommands, and the names of symbols in your program.
+are for the next word in a command, at any time. This works for @value{GDBN}
+commands, @value{GDBN} subcommands, and the names of symbols in your program.
-Press the @key{TAB} key whenever you want _GDBN__ to fill out the rest
-of a word. If there's only one possibility, _GDBN__ will fill in the
+Press the @key{TAB} key whenever you want @value{GDBN} to fill out the rest
+of a word. If there's only one possibility, @value{GDBN} will fill in the
word, and wait for you to finish the command (or press @key{RET} to
enter it). For example, if you type
@c If texinfo enhancements make it unnecessary, it would be nice to
@c replace " @key" by "@key" in the following...
@example
-(_GDBP__) info bre @key{TAB}
+(@value{GDBP}) info bre @key{TAB}
@end example
@noindent
-_GDBN__ fills in the rest of the word @samp{breakpoints}, since that's
+@value{GDBN} fills in the rest of the word @samp{breakpoints}, since that's
the only @code{info} subcommand beginning with @samp{bre}:
@example
-(_GDBP__) info breakpoints
+(@value{GDBP}) info breakpoints
@end example
@noindent
to exploit command abbreviations rather than command completion).
If there is more than one possibility for the next word when you press
-@key{TAB}, _GDBN__ will sound a bell. You can either supply more
+@key{TAB}, @value{GDBN} will sound a bell. You can either supply more
characters and try again, or just press @key{TAB} a second time, and
-_GDBN__ will display all the possible completions for that word. For
+@value{GDBN} will display all the possible completions for that word. For
example, you might want to set a breakpoint on a subroutine whose name
-begins with @samp{make_}, but when you type @kbd{b make_@key{TAB}} _GDBN__
+begins with @samp{make_}, but when you type @kbd{b make_@key{TAB}} @value{GDBN}
just sounds the bell. Typing @key{TAB} again will display all the
function names in your program that begin with those characters, for
example:
@example
-(_GDBP__) b make_ @key{TAB}
-@exdent _GDBN__ sounds bell; press @key{TAB} again, to see:
+(@value{GDBP}) b make_ @key{TAB}
+@exdent @value{GDBN} sounds bell; press @key{TAB} again, to see:
make_a_section_from_file make_environ
make_abs_section make_function_type
make_blockvector make_pointer_type
make_cleanup make_reference_type
make_command make_symbol_completion_list
-(GDBP__) b make_
+(@value{GDBP}) b make_
@end example
@noindent
-After displaying the available possibilities, _GDBN__ copies your
+After displaying the available possibilities, @value{GDBN} copies your
partial input (@samp{b make_} in the example) so you can finish the
command.
If you just want to see the list of alternatives in the first place, you
can press @kbd{M-?} rather than pressing @key{TAB} twice. @kbd{M-?}
means @kbd{@key{META} ?}. You can type this
-_if__(_GENERIC__||!_DOSHOST__)
+@ifclear DOSHOST
either by holding down a
key designated as the @key{META} shift on your keyboard (if there is
one) while typing @kbd{?}, or
-_fi__(_GENERIC__||!_DOSHOST__)
+@end ifclear
as @key{ESC} followed by @kbd{?}.
@cindex quotes in commands
@cindex completion of quoted strings
Sometimes the string you need, while logically a ``word'', may contain
-parentheses or other characters that _GDBN__ normally excludes from its
+parentheses or other characters that @value{GDBN} normally excludes from its
notion of a word. To permit word completion to work in this situation,
-you may enclose words in @code{'} (single quote marks) in _GDBN__ commands.
+you may enclose words in @code{'} (single quote marks) in @value{GDBN} commands.
The most likely situation where you might need this is in typing the
name of a C++ function. This is because C++ allows function overloading
@code{int} parameter, @code{name(int)}, or the version that takes a
@code{float} parameter, @code{name(float)}. To use the word-completion
facilities in this situation, type a single quote @code{'} at the
-beginning of the function name. This alerts _GDBN__ that it may need to
+beginning of the function name. This alerts @value{GDBN} that it may need to
consider more information than usual when you press @key{TAB} or
@kbd{M-?} to request word completion:
@example
-(_GDBP__) b 'bubble( @key{M-?}
+(@value{GDBP}) b 'bubble( @key{M-?}
bubble(double,double) bubble(int,int)
-(_GDBP__) b 'bubble(
+(@value{GDBP}) b 'bubble(
@end example
-In some cases, _GDBN__ can tell that completing a name will require
-quotes. When this happens, _GDBN__ will insert the quote for you (while
+In some cases, @value{GDBN} can tell that completing a name will require
+quotes. When this happens, @value{GDBN} will insert the quote for you (while
completing as much as it can) if you do not type the quote in the first
place:
@example
-(_GDBP__) b bub @key{TAB}
-@exdent _GDBN__ alters your input line to the following, and rings a bell:
-(_GDBP__) b 'bubble(
+(@value{GDBP}) b bub @key{TAB}
+@exdent @value{GDBN} alters your input line to the following, and rings a bell:
+(@value{GDBP}) b 'bubble(
@end example
@noindent
-In general, _GDBN__ can tell that a quote is needed (and inserts it) if
+In general, @value{GDBN} can tell that a quote is needed (and inserts it) if
you have not yet started typing the argument list when you ask for
completion on an overloaded symbol.
@cindex online documentation
@kindex help
-You can always ask _GDBN__ itself for information on its commands, using the
+You can always ask @value{GDBN} itself for information on its commands, using the
command @code{help}.
@table @code
display a short list of named classes of commands:
@smallexample
-(_GDBP__) help
+(@value{GDBP}) help
List of classes of commands:
running -- Running the program
Type "help" followed by command name for full
documentation.
Command name abbreviations are allowed if unambiguous.
-(_GDBP__)
+(@value{GDBP})
@end smallexample
@item help @var{class}
help display for the class @code{status}:
@smallexample
-(_GDBP__) help status
+(@value{GDBP}) help status
Status inquiries.
List of commands:
Type "help" followed by command name for full
documentation.
Command name abbreviations are allowed if unambiguous.
-(_GDBP__)
+(@value{GDBP})
@end smallexample
@item help @var{command}
-With a command name as @code{help} argument, _GDBN__ will display a
+With a command name as @code{help} argument, @value{GDBN} will display a
short paragraph on how to use that command.
@end table
-In addition to @code{help}, you can use the _GDBN__ commands @code{info}
+In addition to @code{help}, you can use the @value{GDBN} commands @code{info}
and @code{show} to inquire about the state of your program, or the state
-of _GDBN__ itself. Each command supports many topics of inquiry; this
+of @value{GDBN} itself. Each command supports many topics of inquiry; this
manual introduces each of them in the appropriate context. The listings
under @code{info} and under @code{show} in the Index point to
all the sub-commands. @xref{Index}.
@kindex show
@item show
-In contrast, @code{show} is for describing the state of _GDBN__ itself.
+In contrast, @code{show} is for describing the state of @value{GDBN} itself.
You can change most of the things you can @code{show}, by using the
related command @code{set}; for example, you can control what number
system is used for displays with @code{set radix}, or simply inquire
@kindex show version
@cindex version number
@item show version
-Show what version of _GDBN__ is running. You should include this
-information in _GDBN__ bug-reports. If multiple versions of _GDBN__ are in
+Show what version of @value{GDBN} is running. You should include this
+information in @value{GDBN} bug-reports. If multiple versions of @value{GDBN} are in
use at your site, you may occasionally want to make sure what version
-of _GDBN__ you are running; as _GDBN__ evolves, new commands are introduced,
+of @value{GDBN} you are running; as @value{GDBN} evolves, new commands are introduced,
and old ones may wither away. The version number is also announced
-when you start _GDBN__ with no arguments.
+when you start @value{GDBN} with no arguments.
@kindex show copying
@item show copying
-Display information about permission for copying _GDBN__.
+Display information about permission for copying @value{GDBN}.
@kindex show warranty
@item show warranty
@end table
@node Running
-@chapter Running Programs Under _GDBN__
+@chapter Running Programs Under @value{GDBN}
-To debug a program, you must run it under _GDBN__.
+To debug a program, you must run it under @value{GDBN}.
+@ignore
+@c pre-unfolding:
@menu
* Compilation:: Compiling for Debugging
* Starting:: Starting your Program
-_if__(!_BARE__)
+@ifclear BARETARGET
* Arguments:: Your Program's Arguments
* Environment:: Your Program's Environment
* Working Directory:: Your Program's Working Directory
* Attach:: Debugging an Already-Running Process
* Kill Process:: Killing the Child Process
* Process Information:: Additional Process Information
-_fi__(!_BARE__)
+@end ifclear
@end menu
+@end ignore
+
+@ifclear BARETARGET
+@menu
+* Compilation:: Compiling for Debugging
+* Starting:: Starting your Program
+* Arguments:: Your Program's Arguments
+* Environment:: Your Program's Environment
+* Working Directory:: Your Program's Working Directory
+* Input/Output:: Your Program's Input and Output
+* Attach:: Debugging an Already-Running Process
+* Kill Process:: Killing the Child Process
+* Process Information:: Additional Process Information
+@end menu
+@end ifclear
+
+@ifset BARETARGET
+@menu
+* Compilation:: Compiling for Debugging
+* Starting:: Starting your Program
+@end menu
+@end ifset
@node Compilation
@section Compiling for Debugging
options together. Using those compilers, you cannot generate optimized
executables containing debugging information.
-_GCC__, the GNU C compiler, supports @samp{-g} with or without
+@value{NGCC}, the GNU C compiler, supports @samp{-g} with or without
@samp{-O}, making it possible to debug optimized code. We recommend
that you @emph{always} use @samp{-g} whenever you compile a program.
You may think your program is correct, but there is no sense in pushing
optimizer is rearranging your code; the debugger will show you what's
really there. Don't be too surprised when the execution path doesn't
exactly match your source file! An extreme example: if you define a
-variable, but never use it, _GDBN__ will never see that
+variable, but never use it, @value{GDBN} will never see that
variable---because the compiler optimizes it out of existence.
Some things do not work as well with @samp{-g -O} as with just
please report it as a bug (including a test case!).
Older versions of the GNU C compiler permitted a variant option
-@w{@samp{-gg}} for debugging information. _GDBN__ no longer supports this
+@w{@samp{-gg}} for debugging information. @value{GDBN} no longer supports this
format; if your GNU C compiler has this option, do not use it.
@ignore
-@comment As far as I know, there are no cases in which _GDBN__ will
+@comment As far as I know, there are no cases in which @value{GDBN} will
@comment produce strange output in this case. (but no promises).
If your program includes archives made with the @code{ar} program, and
if the object files used as input to @code{ar} were compiled without the
-@samp{-g} option and have names longer than 15 characters, _GDBN__ will get
+@samp{-g} option and have names longer than 15 characters, @value{GDBN} will get
confused reading your program's symbol table. No error message will be
-given, but _GDBN__ may behave strangely. The reason for this problem is a
+given, but @value{GDBN} may behave strangely. The reason for this problem is a
deficiency in the Unix archive file format, which cannot represent file
names longer than 15 characters.
@item run
@itemx r
@kindex run
-Use the @code{run} command to start your program under _GDBN__. You must
+Use the @code{run} command to start your program under @value{GDBN}. You must
first specify the program name
-_if__(_VXWORKS__)
+@ifset VXWORKS
(except on VxWorks)
-_fi__(_VXWORKS__)
+@end ifset
with an argument to
-_GDBN__ (@pxref{Invocation, ,Getting In and Out of _GDBN__}), or by using the
+@value{GDBN} (@pxref{Invocation, ,Getting In and Out of @value{GDBN}}), or by using the
@code{file} or @code{exec-file} command (@pxref{Files, ,Commands to
Specify Files}).
@end table
-_if__(!_BARE__)
+@ifclear BARETARGET
If you are running your program in an execution environment that
supports processes, @code{run} creates an inferior process and makes
that process run your program. (In environments without processes,
@code{run} jumps to the start of your program.)
The execution of a program is affected by certain information it
-receives from its superior. _GDBN__ provides ways to specify this
+receives from its superior. @value{GDBN} provides ways to specify this
information, which you must do @emph{before} starting your program. (You
can change it after starting your program, but such changes will only affect
your program the next time you start it.) This information may be
Program's Arguments}.
@item The @emph{environment.}
-Your program normally inherits its environment from _GDBN__, but you can
-use the _GDBN__ commands @code{set environment} and @code{unset
+Your program normally inherits its environment from @value{GDBN}, but you can
+use the @value{GDBN} commands @code{set environment} and @code{unset
environment} to change parts of the environment that will be given to
your program. @xref{Environment, ,Your Program's Environment}.
@item The @emph{working directory.}
-Your program inherits its working directory from _GDBN__. You can set
-_GDBN__'s working directory with the @code{cd} command in _GDBN__.
+Your program inherits its working directory from @value{GDBN}. You can set
+@value{GDBN}'s working directory with the @code{cd} command in @value{GDBN}.
@xref{Working Directory, ,Your Program's Working Directory}.
@item The @emph{standard input and output.}
Your program normally uses the same device for standard input and
-standard output as _GDBN__ is using. You can redirect input and output
+standard output as @value{GDBN} is using. You can redirect input and output
in the @code{run} command line, or you can use the @code{tty} command to
set a different device for your program.
@xref{Input/Output, ,Your Program's Input and Output}.
@cindex pipes
@emph{Warning:} While input and output redirection work, you cannot use
pipes to pass the output of the program you are debugging to another
-program; if you attempt this, _GDBN__ is likely to wind up debugging the
+program; if you attempt this, @value{GDBN} is likely to wind up debugging the
wrong program.
@end table
-_fi__(!_BARE__)
+@end ifclear
When you issue the @code{run} command, your program begins to execute
immediately. @xref{Stopping, ,Stopping and Continuing}, for discussion
or @code{call} commands. @xref{Data, ,Examining Data}.
If the modification time of your symbol file has changed since the
-last time _GDBN__ read its symbols, _GDBN__ will discard its symbol table and
-re-read it. When it does this, _GDBN__ tries to retain your current
+last time @value{GDBN} read its symbols, @value{GDBN} will discard its symbol table and
+re-read it. When it does this, @value{GDBN} tries to retain your current
breakpoints.
-_if__(!_BARE__)
+@ifclear BARETARGET
@node Arguments
@section Your Program's Arguments
The arguments to your program can be specified by the arguments of the
@code{run} command. They are passed to a shell, which expands wildcard
characters and performs redirection of I/O, and thence to your program.
-_GDBN__ uses the shell indicated by your environment variable
-@code{SHELL} if it exists; otherwise, _GDBN__ uses @code{/bin/sh}.
+@value{GDBN} uses the shell indicated by your environment variable
+@code{SHELL} if it exists; otherwise, @value{GDBN} uses @code{/bin/sh}.
@code{run} with no arguments uses the same arguments used by the previous
@code{run}, or those set by the @code{set args} command.
path for programs to run. Usually you set up environment variables with
the shell and they are inherited by all the other programs you run. When
debugging, it can be useful to try running your program with a modified
-environment without having to start _GDBN__ over again.
+environment without having to start @value{GDBN} over again.
@table @code
@item path @var{directory}
@kindex path
Add @var{directory} to the front of the @code{PATH} environment variable
-(the search path for executables), for both _GDBN__ and your program.
+(the search path for executables), for both @value{GDBN} and your program.
You may specify several directory names, separated by @samp{:} or
whitespace. If @var{directory} is already in the path, it is moved to
the front, so it will be searched sooner.
You can use the string @samp{$cwd} to refer to whatever is the current
-working directory at the time _GDBN__ searches the path. If you use
+working directory at the time @value{GDBN} searches the path. If you use
@samp{.} instead, it refers to the directory where you executed the
-@code{path} command. _GDBN__ fills in the current path where needed in
+@code{path} command. @value{GDBN} fills in the current path where needed in
the @var{directory} argument, before adding it to the search path.
@c 'path' is explicitly nonrepeatable, but RMS points out it is silly to
@c document that, since repeating it would be a no-op.
@item set environment @var{varname} @r{[}=@r{]} @var{value}
@kindex set environment
Sets environment variable @var{varname} to @var{value}. The value
-changes for your program only, not for _GDBN__ itself. @var{value} may
+changes for your program only, not for @value{GDBN} itself. @var{value} may
be any string; the values of environment variables are just strings, and
any interpretation is supplied by your program itself. The @var{value}
parameter is optional; if it is eliminated, the variable is set to a
@cindex working directory (of your program)
Each time you start your program with @code{run}, it inherits its
-working directory from the current working directory of _GDBN__. _GDBN__'s
+working directory from the current working directory of @value{GDBN}. @value{GDBN}'s
working directory is initially whatever it inherited from its parent
process (typically the shell), but you can specify a new working
-directory in _GDBN__ with the @code{cd} command.
+directory in @value{GDBN} with the @code{cd} command.
-The _GDBN__ working directory also serves as a default for the commands
-that specify files for _GDBN__ to operate on. @xref{Files, ,Commands to
+The @value{GDBN} working directory also serves as a default for the commands
+that specify files for @value{GDBN} to operate on. @xref{Files, ,Commands to
Specify Files}.
@table @code
@item cd @var{directory}
@kindex cd
-Set _GDBN__'s working directory to @var{directory}.
+Set @value{GDBN}'s working directory to @var{directory}.
@item pwd
@kindex pwd
-Print _GDBN__'s working directory.
+Print @value{GDBN}'s working directory.
@end table
@node Input/Output
@cindex redirection
@cindex i/o
@cindex terminal
-By default, the program you run under _GDBN__ does input and output to
-the same terminal that _GDBN__ uses. _GDBN__ switches the terminal to
+By default, the program you run under @value{GDBN} does input and output to
+the same terminal that @value{GDBN} uses. @value{GDBN} switches the terminal to
its own terminal modes to interact with you, but it records the terminal
modes your program was using and switches back to them when you continue
running your program.
@table @code
@item info terminal
@kindex info terminal
-Displays _GDBN__'s recorded information about the terminal modes your
+Displays @value{GDBN}'s recorded information about the terminal modes your
program is using.
@end table
You can redirect your program's input and/or output using shell
redirection with the @code{run} command. For example,
-_0__@example
+@example
run > outfile
-_1__@end example
+@end example
@noindent
starts your program, diverting its output to the file @file{outfile}.
When you use the @code{tty} command or redirect input in the @code{run}
command, only the input @emph{for your program} is affected. The input
-for _GDBN__ still comes from your terminal.
+for @value{GDBN} still comes from your terminal.
@node Attach
@section Debugging an Already-Running Process
@table @code
@item attach @var{process-id}
This command
-attaches to a running process---one that was started outside _GDBN__.
+attaches to a running process---one that was started outside @value{GDBN}.
(@code{info files} will show your active targets.) The command takes as
argument a process ID. The usual way to find out the process-id of
a Unix process is with the @code{ps} utility, or with the @samp{jobs -l}
To use @code{attach}, you must be debugging in an environment which
supports processes. You must also have permission to send the process a
-signal, and it must have the same effective user ID as the _GDBN__
+signal, and it must have the same effective user ID as the @value{GDBN}
process.
When using @code{attach}, you should first use the @code{file} command
to specify the program running in the process and load its symbol table.
@xref{Files, ,Commands to Specify Files}.
-The first thing _GDBN__ does after arranging to debug the specified
+The first thing @value{GDBN} does after arranging to debug the specified
process is to stop it. You can examine and modify an attached process
-with all the _GDBN__ commands that are ordinarily available when you start
+with all the @value{GDBN} commands that are ordinarily available when you start
processes with @code{run}. You can insert breakpoints; you can step and
continue; you can modify storage. If you would rather the process
continue running, you may use the @code{continue} command after
-attaching _GDBN__ to the process.
+attaching @value{GDBN} to the process.
@table @code
@item detach
@kindex detach
When you have finished debugging the attached process, you can use the
-@code{detach} command to release it from _GDBN__'s control. Detaching
+@code{detach} command to release it from @value{GDBN}'s control. Detaching
the process continues its execution. After the @code{detach} command,
-that process and _GDBN__ become completely independent once more, and you
+that process and @value{GDBN} become completely independent once more, and you
are ready to @code{attach} another process or start one with @code{run}.
@code{detach} will not repeat if you press @key{RET} again after
executing the command.
@end table
-If you exit _GDBN__ or use the @code{run} command while you have an attached
+If you exit @value{GDBN} or use the @code{run} command while you have an attached
process, you kill that process. By default, you will be asked for
confirmation if you try to do either of these things; you can control
whether or not you need to confirm by using the @code{set confirm} command
@table @code
@item kill
@kindex kill
-Kill the child process in which your program is running under _GDBN__.
+Kill the child process in which your program is running under @value{GDBN}.
@end table
This command is useful if you wish to debug a core dump instead of a
-running process. _GDBN__ ignores any core dump file while your program
+running process. @value{GDBN} ignores any core dump file while your program
is running.
@c @end group
-On some operating systems, a program cannot be executed outside _GDBN__
-while you have breakpoints set on it inside _GDBN__. You can use the
+On some operating systems, a program cannot be executed outside @value{GDBN}
+while you have breakpoints set on it inside @value{GDBN}. You can use the
@code{kill} command in this situation to permit running your program
outside the debugger.
The @code{kill} command is also useful if you wish to recompile and
relink your program, since on many systems it is impossible to modify an
executable file while it is running in a process. In this case, when you
-next type @code{run}, _GDBN__ will notice that the file has changed, and
+next type @code{run}, @value{GDBN} will notice that the file has changed, and
will re-read the symbol table (while trying to preserve your current
breakpoint settings).
@cindex process image
Some operating systems provide a facility called @samp{/proc} that can
be used to examine the image of a running process using file-system
-subroutines. If _GDBN__ is configured for an operating system with this
+subroutines. If @value{GDBN} is configured for an operating system with this
facility, the command @code{info proc} is available to report on several
kinds of information about the process running your program.
@item info proc all
Show all the above information about the process.
@end table
-_fi__(!_BARE__)
+@end ifclear
@node Stopping
@chapter Stopping and Continuing
program before it terminates; or so that, if your program runs into
trouble, you can investigate and find out why.
-Inside _GDBN__, your program may stop for any of several reasons, such
-as a signal, a breakpoint, or reaching a new line after a _GDBN__
+Inside @value{GDBN}, your program may stop for any of several reasons, such
+as a signal, a breakpoint, or reaching a new line after a @value{GDBN}
command such as @code{step}. You may then examine and change
variables, set new breakpoints or remove old ones, and then continue
-execution. Usually, the messages shown by _GDBN__ provide ample
+execution. Usually, the messages shown by @value{GDBN} provide ample
explanation of the status of your program---but you can also explicitly
request this information at any time.
running or not, what process it is, and why it stopped.
@end table
+@ignore
+@c original menu
+@menu
+@ifclear CONLY
+* Breakpoints:: Breakpoints, Watchpoints, and Exceptions
+@end ifclear
+@ifset CONLY
+* Breakpoints:: Breakpoints and Watchpoints
+@end ifset
+* Continuing and Stepping:: Resuming Execution
+@ifset POSIX
+* Signals:: Signals
+@end ifset
+@end menu
+@end ignore
+
+@c !CONLY && POSIX
+@ifclear CONLY
+@ifset POSIX
@menu
-_if__(!_CONLY__)
* Breakpoints:: Breakpoints, Watchpoints, and Exceptions
-_fi__(!_CONLY__)
-_if__(_CONLY__)
+* Continuing and Stepping:: Resuming Execution
+* Signals:: Signals
+@end menu
+@end ifset
+@end ifclear
+
+@c CONLY && POSIX
+@ifset CONLY
+@ifset POSIX
+@menu
* Breakpoints:: Breakpoints and Watchpoints
-_fi__(_CONLY__)
* Continuing and Stepping:: Resuming Execution
-_if__(_GENERIC__ || !_H8__)
* Signals:: Signals
-_fi__(_GENERIC__ || !_H8__)
@end menu
+@end ifset
+@end ifset
+
+@c !CONLY && !POSIX
+@ifclear CONLY
+@ifclear POSIX
+@menu
+* Breakpoints:: Breakpoints, Watchpoints, and Exceptions
+* Continuing and Stepping:: Resuming Execution
+@end menu
+@end ifclear
+@end ifclear
+
+@c CONLY && !POSIX
+@ifset CONLY
+@ifclear POSIX
+@menu
+* Breakpoints:: Breakpoints and Watchpoints
+* Continuing and Stepping:: Resuming Execution
+@end menu
+@end ifclear
+@end ifset
+@c node-defaulting requires adjacency of @node and sectioning cmds
+@c ...hence distribute @node Breakpoints over two possible @if expansions.
+@c
+@ifclear CONLY
@node Breakpoints
-_if__(!_CONLY__)
@section Breakpoints, Watchpoints, and Exceptions
-_fi__(!_CONLY__)
-_if__(_CONLY__)
+@end ifclear
+@ifset CONLY
+@node Breakpoints
@section Breakpoints and Watchpoints
-_fi__(_CONLY__)
+@end ifset
@cindex breakpoints
A @dfn{breakpoint} makes your program stop whenever a certain point in
(@pxref{Set Breaks, ,Setting Breakpoints}), to specify the place where
your program should stop by line number, function name or exact address
in the program.
-_if__(!_CONLY__)
+@ifclear CONLY
In languages with exception handling (such as GNU C++), you can also set
breakpoints where an exception is raised (@pxref{Exception Handling,
,Breakpoints and Exceptions}).
-_fi__(!_CONLY__)
+@end ifclear
@cindex watchpoints
@cindex memory tracing
@cindex breakpoint numbers
@cindex numbers for breakpoints
-_GDBN__ assigns a number to each breakpoint or watchpoint when you
+@value{GDBN} assigns a number to each breakpoint or watchpoint when you
create it; these numbers are successive integers starting with one. In
many of the commands for controlling various features of breakpoints you
use the breakpoint number to say which breakpoint you want to change.
@table @code
@item break @var{function}
Set a breakpoint at entry to function @var{function}.
-_if__(!_CONLY__)
+@ifclear CONLY
When using source languages that permit overloading of symbols, such as
C++, @var{function} may refer to more than one possible place to break.
@xref{Breakpoint Menus}, for a discussion of that situation.
-_fi__(!_CONLY__)
+@end ifclear
@item break +@var{offset}
@itemx break -@var{offset}
returns to that frame. This is similar to the effect of a
@code{finish} command in the frame inside the selected frame---except
that @code{finish} does not leave an active breakpoint. If you use
-@code{break} without an argument in the innermost frame, _GDBN__ will stop
+@code{break} without an argument in the innermost frame, @value{GDBN} will stop
the next time it reaches the current location; this may be useful
inside loops.
-_GDBN__ normally ignores breakpoints when it resumes execution, until at
+@value{GDBN} normally ignores breakpoints when it resumes execution, until at
least one instruction has been executed. If it did not do this, you
would be unable to proceed past a breakpoint without first disabling the
breakpoint. This rule applies whether or not the breakpoint already
just like the breakpoints set with the @code{break} command. They can
be deleted, disabled, made conditional, etc., in the standard ways.
-_if__(!_CONLY__)
+@ifclear CONLY
When debugging C++ programs, @code{rbreak} is useful for setting
breakpoints on overloaded functions that are not members of any special
classes.
-_fi__(!_CONLY__)
+@end ifclear
@kindex info breakpoints
@cindex @code{$_} and @code{info breakpoints}
listed (@pxref{Memory, ,Examining Memory}).
@end table
-_GDBN__ allows you to set any number of breakpoints at the same place in
+@value{GDBN} allows you to set any number of breakpoints at the same place in
your program. There is nothing silly or meaningless about this. When
the breakpoints are conditional, this is even useful
(@pxref{Conditions, ,Break Conditions}).
@cindex negative breakpoint numbers
-@cindex internal _GDBN__ breakpoints
-_GDBN__ itself sometimes sets breakpoints in your program for special
+@cindex internal @value{GDBN} breakpoints
+@value{GDBN} itself sometimes sets breakpoints in your program for special
purposes, such as proper handling of @code{longjmp} (in C programs).
These internal breakpoints are assigned negative numbers, starting with
@code{-1}; @samp{info breakpoints} does not display them.
-You can see these breakpoints with the _GDBN__ maintenance command
+You can see these breakpoints with the @value{GDBN} maintenance command
@samp{maint info breakpoints}.
@table @code
@kindex maint info breakpoints
@item maint info breakpoints
Using the same format as @samp{info breakpoints}, display both the
-breakpoints you've set explicitly, and those _GDBN__ is using for
+breakpoints you've set explicitly, and those @value{GDBN} is using for
internal purposes. Internal breakpoints are shown with negative
breakpoint numbers. The type column identifies what kind of breakpoint
is shown:
Internal breakpoint at the target of a @code{longjmp}.
@item until
-Temporary internal breakpoint used by the _GDBN__ @code{until} command.
+Temporary internal breakpoint used by the @value{GDBN} @code{until} command.
@item finish
-Temporary internal breakpoint used by the _GDBN__ @code{finish} command.
+Temporary internal breakpoint used by the @value{GDBN} @code{finish} command.
@end table
@end table
other breakpoints, but this can well be worth it to catch errors where
you have no clue what part of your program is the culprit. Some
processors provide special hardware to support watchpoint evaluation; future
-releases of _GDBN__ will use such hardware if it is available.
+releases of @value{GDBN} will use such hardware if it is available.
@table @code
@kindex watch
@cindex exception handlers
Some languages, such as GNU C++, implement exception handling. You can
-use _GDBN__ to examine what caused your program to raise an exception,
+use @value{GDBN} to examine what caused your program to raise an exception,
and to list the exceptions your program is prepared to handle at a
given point in time.
You can use @code{info catch} to list active exception handlers.
@xref{Frame Info, ,Information About a Frame}.
-There are currently some limitations to exception handling in _GDBN__.
+There are currently some limitations to exception handling in @value{GDBN}.
These will be corrected in a future release.
@itemize @bullet
@item
-If you call a function interactively, _GDBN__ normally returns
+If you call a function interactively, @value{GDBN} normally returns
control to you when the function has finished executing. If the call
raises an exception, however, the call may bypass the mechanism that
returns control to you and cause your program to simply continue
-running until it hits a breakpoint, catches a signal that _GDBN__ is
+running until it hits a breakpoint, catches a signal that @value{GDBN} is
listening for, or exits.
@item
You cannot raise an exception interactively.
delete individual breakpoints or watchpoints by specifying their
breakpoint numbers.
-It is not necessary to delete a breakpoint to proceed past it. _GDBN__
+It is not necessary to delete a breakpoint to proceed past it. @value{GDBN}
automatically ignores breakpoints on the first instruction to be executed
when you continue execution without changing the execution address.
@kindex delete
@kindex d
Delete the breakpoints or watchpoints of the numbers specified as
-arguments. If no argument is specified, delete all breakpoints (_GDBN__
+arguments. If no argument is specified, delete all breakpoints (@value{GDBN}
asks confirmation, unless you have @code{set confirm off}). You
can abbreviate this command as @code{d}.
@end table
that log program progress, or to use your own print functions to
format special data structures. The effects are completely predictable
unless there is another enabled breakpoint at the same address. (In
-that case, _GDBN__ might see the other breakpoint first and stop your
+that case, @value{GDBN} might see the other breakpoint first and stop your
program without checking the condition of this one.) Note that
breakpoint commands are usually more convenient and flexible for the
purpose of performing side effects when a breakpoint is reached
Specify @var{expression} as the break condition for breakpoint or
watchpoint number @var{bnum}. From now on, this breakpoint will stop
your program only if the value of @var{expression} is true (nonzero, in
-C). When you use @code{condition}, _GDBN__ checks @var{expression}
+C). When you use @code{condition}, @value{GDBN} checks @var{expression}
immediately for syntactic correctness, and to determine whether symbols
in it have referents in the context of your breakpoint.
@c FIXME so what does GDB do if there is no referent? Moreover, what
@c about watchpoints?
-_GDBN__ does
+@value{GDBN} does
not actually evaluate @var{expression} at the time the @code{condition}
command is given, however. @xref{Expressions, ,Expressions}.
@kindex ignore
Set the ignore count of breakpoint number @var{bnum} to @var{count}.
The next @var{count} times the breakpoint is reached, your program's
-execution will not stop; other than to decrement the ignore count, _GDBN__
+execution will not stop; other than to decrement the ignore count, @value{GDBN}
takes no action.
To make the breakpoint stop the next time it is reached, specify
be checked.
You could achieve the effect of the ignore count with a condition such
-as _0__@w{@samp{$foo-- <= 0}}_1__ using a debugger convenience variable that
+as @w{@samp{$foo-- <= 0}} using a debugger convenience variable that
is decremented each time. @xref{Convenience Vars, ,Convenience
Variables}.
encountered).
@end table
-Pressing @key{RET} as a means of repeating the last _GDBN__ command is
+Pressing @key{RET} as a means of repeating the last @value{GDBN} command is
disabled within a @var{command-list}.
You can use breakpoint commands to start your program up again. Simply
For example, here is how you could use breakpoint commands to print the
value of @code{x} at entry to @code{foo} whenever @code{x} is positive.
-_0__@example
+@example
break foo if x>0
commands
silent
echo \n
cont
end
-_1__@end example
+@end example
One application for breakpoint commands is to compensate for one bug so
you can test for another. Put a breakpoint just after the erroneous line
@cindex lost output
One deficiency in the operation of automatically continuing breakpoints
under Unix appears when your program uses raw mode for the terminal.
-_GDBN__ switches back to its own terminal modes (not raw) before executing
+@value{GDBN} switches back to its own terminal modes (not raw) before executing
commands, and then must switch back to raw mode when your program is
continued. This causes any pending terminal input to be lost.
@c FIXME: revisit below when GNU sys avail.
@noindent
specifies a condition expression (@pxref{Expressions, ,Expressions}) that will
change @code{x} as needed, then always have the value zero so your
-program will not stop. No input is lost here, because _GDBN__ evaluates
+program will not stop. No input is lost here, because @value{GDBN} evaluates
break conditions without changing the terminal modes. When you want
to have nontrivial conditions for performing the side effects, the
operators @samp{&&}, @samp{||} and @samp{?@dots{}:} may be useful.
Some programming languages (notably C++) permit a single function name
to be defined several times, for application in different contexts.
This is called @dfn{overloading}. When a function name is overloaded,
-@samp{break @var{function}} is not enough to tell _GDBN__ where you want
+@samp{break @var{function}} is not enough to tell @value{GDBN} where you want
a breakpoint. If you realize this will be a problem, you can use
something like @samp{break @var{function}(@var{types})} to specify which
-particular version of the function you want. Otherwise, _GDBN__ offers
+particular version of the function you want. Otherwise, @value{GDBN} offers
you a menu of numbered choices for different possible breakpoints, and
waits for your selection with the prompt @samp{>}. The first two
options are always @samp{[0] cancel} and @samp{[1] all}. Typing @kbd{1}
@c FIXME! This is likely to change to show arg type lists, at least
@example
-(_GDBP__) b String::after
+(@value{GDBP}) b String::after
[0] cancel
[1] all
[2] file:String.cc; line number:867
Breakpoint 3 at 0xafcc: file String.cc, line 846.
Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
-(_GDBP__)
+(@value{GDBP})
@end example
@node Error in Breakpoints
@c too. pesch, 20sep91
Under some operating systems, breakpoints cannot be used in a program if
any other process is running that program. In this situation,
-attempting to run or continue a program with a breakpoint causes _GDBN__
+attempting to run or continue a program with a breakpoint causes @value{GDBN}
to stop the other process.
When this happens, you have three ways to proceed:
Remove or disable the breakpoints, then continue.
@item
-Suspend _GDBN__, and copy the file containing your program to a new name.
-Resume _GDBN__ and use the @code{exec-file} command to specify that _GDBN__
+Suspend @value{GDBN}, and copy the file containing your program to a new name.
+Resume @value{GDBN} and use the @code{exec-file} command to specify that @value{GDBN}
should run your program under that name. Then start your program again.
@c FIXME: RMS commented here "Show example". Maybe when someone
line of source code, or one machine instruction (depending on what
particular command you use). Either when continuing
or when stepping, your program may stop even sooner, due to
-_if__(_BARE__)
+@ifset BARETARGET
a breakpoint.
-_fi__(_BARE__)
-_if__(!_BARE__)
+@end ifset
+@ifclear BARETARGET
a breakpoint or to a signal. (If due to a signal, you may want to use
@code{handle}, or use @samp{signal 0} to resume execution.
@xref{Signals, ,Signals}.)
-_fi__(!_BARE__)
+@end ifclear
@table @code
@item continue @r{[}@var{ignore-count}@r{]}
@kindex step
@kindex s
Continue running your program until control reaches a different source
-line, then stop it and return control to _GDBN__. This command is
+line, then stop it and return control to @value{GDBN}. This command is
abbreviated @code{s}.
@quotation
@code{206}; yet when we use @code{until}, we get to line @code{195}:
@example
-(_GDBP__) f
+(@value{GDBP}) f
#0 main (argc=4, argv=0xf7fffae8) at m4.c:206
206 expand_input();
-(_GDBP__) until
+(@value{GDBP}) until
195 for ( ; argc > 0; NEXTARG) @{
@end example
An argument is a repeat count, as in @code{next}.
@end table
-_if__(_GENERIC__ || !_H8__)
+@ifset POSIX
@node Signals
@section Signals
@cindex signals
@code{SIGINT} does not indicate an error in your program, but it is normally
fatal so it can carry out the purpose of the interrupt: to kill the program.
-_GDBN__ has the ability to detect any occurrence of a signal in your
-program. You can tell _GDBN__ in advance what to do for each kind of
+@value{GDBN} has the ability to detect any occurrence of a signal in your
+program. You can tell @value{GDBN} in advance what to do for each kind of
signal.
@cindex handling signals
-Normally, _GDBN__ is set up to ignore non-erroneous signals like @code{SIGALRM}
+Normally, @value{GDBN} is set up to ignore non-erroneous signals like @code{SIGALRM}
(so as not to interfere with their role in the functioning of your program)
but to stop your program immediately whenever an error signal happens.
You can change these settings with the @code{handle} command.
@table @code
@item info signals
@kindex info signals
-Print a table of all the kinds of signals and how _GDBN__ has been told to
+Print a table of all the kinds of signals and how @value{GDBN} has been told to
handle each one. You can use this to see the signal numbers of all
the defined types of signals.
@item handle @var{signal} @var{keywords}@dots{}
@kindex handle
-Change the way _GDBN__ handles signal @var{signal}. @var{signal} can be the
+Change the way @value{GDBN} handles signal @var{signal}. @var{signal} can be the
number of a signal or its name (with or without the @samp{SIG} at the
beginning). The @var{keywords} say what change to make.
@end table
@table @code
@item nostop
-_GDBN__ should not stop your program when this signal happens. It may
+@value{GDBN} should not stop your program when this signal happens. It may
still print a message telling you that the signal has come in.
@item stop
-_GDBN__ should stop your program when this signal happens. This implies
+@value{GDBN} should stop your program when this signal happens. This implies
the @code{print} keyword as well.
@item print
-_GDBN__ should print a message when this signal happens.
+@value{GDBN} should print a message when this signal happens.
@item noprint
-_GDBN__ should not mention the occurrence of the signal at all. This
+@value{GDBN} should not mention the occurrence of the signal at all. This
implies the @code{nostop} keyword as well.
@item pass
-_GDBN__ should allow your program to see this signal; your program will be
+@value{GDBN} should allow your program to see this signal; your program will be
able to handle the signal, or may be terminated if the signal is fatal
and not handled.
@item nopass
-_GDBN__ should not allow your program to see this signal.
+@value{GDBN} should not allow your program to see this signal.
@end table
@c @end group
When a signal has been set to stop your program, your program cannot see the
signal until you continue. It will see the signal then, if @code{pass} is
in effect for the signal in question @emph{at that time}. In other words,
-after _GDBN__ reports a signal, you can use the @code{handle} command with
+after @value{GDBN} reports a signal, you can use the @code{handle} command with
@code{pass} or @code{nopass} to control whether that signal will be seen by
your program when you later continue it.
a result of the fatal signal once it saw the signal. To prevent this,
you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your
Program a Signal}.
-_fi__(_GENERIC__ || !_H8__)
+@end ifset
@node Stack
@chapter Examining the Stack
stack frames are allocated in a region of memory called the @dfn{call
stack}.
-When your program stops, the _GDBN__ commands for examining the stack allow you
+When your program stops, the @value{GDBN} commands for examining the stack allow you
to see all of this information.
@cindex selected frame
-One of the stack frames is @dfn{selected} by _GDBN__ and many _GDBN__ commands
+One of the stack frames is @dfn{selected} by @value{GDBN} and many @value{GDBN} commands
refer implicitly to the selected frame. In particular, whenever you ask
-_GDBN__ for the value of a variable in your program, the value is found in the
-selected frame. There are special _GDBN__ commands to select whichever frame
+@value{GDBN} for the value of a variable in your program, the value is found in the
+selected frame. There are special @value{GDBN} commands to select whichever frame
you are interested in.
-When your program stops, _GDBN__ automatically selects the currently executing
+When your program stops, @value{GDBN} automatically selects the currently executing
frame and describes it briefly as the @code{frame} command does
(@pxref{Frame Info, ,Information About a Frame}).
going on in that frame.
@cindex frame number
-_GDBN__ assigns numbers to all existing stack frames, starting with
+@value{GDBN} assigns numbers to all existing stack frames, starting with
zero for the innermost frame, one for the frame that called it,
and so on upward. These numbers do not really exist in your program;
-they are assigned by _GDBN__ to give you a way of designating stack
-frames in _GDBN__ commands.
+they are assigned by @value{GDBN} to give you a way of designating stack
+frames in @value{GDBN} commands.
@cindex frameless execution
Some compilers allow functions to be compiled so that they operate
-without stack frames. (For example, the @code{_GCC__} option
+without stack frames. (For example, the @code{@value{GCC}} option
@samp{-fomit-frame-pointer} will generate functions without a frame.)
This is occasionally done with heavily used library functions to save
-the frame setup time. _GDBN__ has limited facilities for dealing with
+the frame setup time. @value{GDBN} has limited facilities for dealing with
these function invocations. If the innermost function invocation has no
-stack frame, _GDBN__ will nevertheless regard it as though it had a
+stack frame, @value{GDBN} will nevertheless regard it as though it had a
separate frame, which is numbered zero as usual, allowing correct
-tracing of the function call chain. However, _GDBN__ has no provision
+tracing of the function call chain. However, @value{GDBN} has no provision
for frameless functions elsewhere in the stack.
@node Backtrace
@itemx f @var{addr}
Select the frame at address @var{addr}. This is useful mainly if the
chaining of stack frames has been damaged by a bug, making it
-impossible for _GDBN__ to assign numbers properly to all frames. In
+impossible for @value{GDBN} to assign numbers properly to all frames. In
addition, this can be useful when your program has multiple stacks and
switches between them.
-_if__(_SPARC__)
+@ifset SPARC
On the SPARC architecture, @code{frame} needs two addresses to
select an arbitrary frame: a frame pointer and a stack pointer.
@c note to future updaters: this is conditioned on a flag
@c FRAME_SPECIFICATION_DYADIC in the tm-*.h files, currently only used
@c by SPARC, hence the specific attribution. Generalize or list all
@c possibilities if more supported machines start doing this.
-_fi__(_SPARC__)
+@end ifset
@item up @var{n}
@kindex up
@smallexample
@group
-(_GDBP__) up
+(@value{GDBP}) up
#1 0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc)
at env.c:10
10 read_input_file (argv[i]);
These two commands are variants of @code{up} and @code{down},
respectively; they differ in that they do their work silently, without
causing display of the new frame. They are intended primarily for use
-in _GDBN__ command scripts, where the output might be unnecessary and
+in @value{GDBN} command scripts, where the output might be unnecessary and
distracting.
@end table
@node Source
@chapter Examining Source Files
-_GDBN__ can print parts of your program's source, since the debugging
-information recorded in your program tells _GDBN__ what source files were
-used to build it. When your program stops, _GDBN__ spontaneously prints
+@value{GDBN} can print parts of your program's source, since the debugging
+information recorded in your program tells @value{GDBN} what source files were
+used to build it. When your program stops, @value{GDBN} spontaneously prints
the line where it stopped. Likewise, when you select a stack frame
-(@pxref{Selection, ,Selecting a Frame}), _GDBN__ prints the line where
+(@pxref{Selection, ,Selecting a Frame}), @value{GDBN} prints the line where
execution in that frame has stopped. You can print other portions of
source files by explicit command.
-_if__(!_DOSHOST__)
-If you use _GDBN__ through its GNU Emacs interface, you may prefer to use
-Emacs facilities to view source; @pxref{Emacs, ,Using _GDBN__ under GNU
+@ifclear DOSHOST
+If you use @value{GDBN} through its GNU Emacs interface, you may prefer to use
+Emacs facilities to view source; @pxref{Emacs, ,Using @value{GDBN} under GNU
Emacs}.
-_fi__(!_DOSHOST__)
+@end ifclear
+@ignore
+@c pre-unfolded menu
@menu
* List:: Printing Source Lines
-_if__(_GENERIC__ || !_H8__)
+@ifclear DOSHOST
* Search:: Searching Source Files
-_fi__(_GENERIC__ || !_H8__)
+@end ifclear
* Source Path:: Specifying Source Directories
* Machine Code:: Source and Machine Code
@end menu
+@end ignore
+
+@ifclear DOSHOST
+@menu
+* List:: Printing Source Lines
+* Search:: Searching Source Files
+* Source Path:: Specifying Source Directories
+* Machine Code:: Source and Machine Code
+@end menu
+@end ifclear
+
+@ifset DOSHOST
+@menu
+* List:: Printing Source Lines
+* Source Path:: Specifying Source Directories
+* Machine Code:: Source and Machine Code
+@end menu
+@end ifset
@node List
@section Printing Source Lines
Print lines just before the lines last printed.
@end table
-By default, _GDBN__ prints ten source lines with any of these forms of
+By default, @value{GDBN} prints ten source lines with any of these forms of
the @code{list} command. You can change this using @code{set listsize}:
@table @code
@var{address} may be any expression.
@end table
-_if__(_GENERIC__ || !_H8__)
+@ifclear DOSHOST
@node Search
@section Searching Source Files
@cindex searching
for @var{regexp}. It lists the line that is found. You can abbreviate
this command as @code{rev}.
@end table
-_fi__(_GENERIC__ || !_H8__)
+@end ifclear
@node Source Path
@section Specifying Source Directories
Executable programs sometimes do not record the directories of the source
files from which they were compiled, just the names. Even when they do,
the directories could be moved between the compilation and your debugging
-session. _GDBN__ has a list of directories to search for source files;
-this is called the @dfn{source path}. Each time _GDBN__ wants a source file,
+session. @value{GDBN} has a list of directories to search for source files;
+this is called the @dfn{source path}. Each time @value{GDBN} wants a source file,
it tries all the directories in the list, in the order they are present
in the list, until it finds a file with the desired name. Note that
the executable search path is @emph{not} used for this purpose. Neither is
the current working directory, unless it happens to be in the source
path.
-If _GDBN__ cannot find a source file in the source path, and the object
-program records a directory, _GDBN__ tries that directory too. If the
+If @value{GDBN} cannot find a source file in the source path, and the object
+program records a directory, @value{GDBN} tries that directory too. If the
source path is empty, and there is no record of the compilation
-directory, _GDBN__ will, as a last resort, look in the current
+directory, @value{GDBN} will, as a last resort, look in the current
directory.
-Whenever you reset or rearrange the source path, _GDBN__ will clear out
+Whenever you reset or rearrange the source path, @value{GDBN} will clear out
any information it has cached about where source files are found, where
each line is in the file, etc.
@kindex directory
-When you start _GDBN__, its source path is empty.
+When you start @value{GDBN}, its source path is empty.
To add other directories, use the @code{directory} command.
@table @code
You can use the string @samp{$cdir} to refer to the compilation
directory (if one is recorded), and @samp{$cwd} to refer to the current
working directory. @samp{$cwd} is not the same as @samp{.}---the former
-tracks the current working directory as it changes during your _GDBN__
+tracks the current working directory as it changes during your @value{GDBN}
session, while the latter is immediately expanded to the current
directory at the time you add an entry to the source path.
@end table
If your source path is cluttered with directories that are no longer of
-interest, _GDBN__ may sometimes cause confusion by finding the wrong
+interest, @value{GDBN} may sometimes cause confusion by finding the wrong
versions of source. You can correct the situation as follows:
@enumerate
@code{m4_changequote}:
@smallexample
-(_GDBP__) info line m4_changecom
+(@value{GDBP}) info line m4_changecom
Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350.
@end smallexample
We can also inquire (using @code{*@var{addr}} as the form for
@var{linespec}) what source line covers a particular address:
@smallexample
-(_GDBP__) info line *0x63ff
+(@value{GDBP}) info line *0x63ff
Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
@end smallexample
inclusive, second exclusive) to dump.
@end table
-_if__(_GENERIC__||!_H8__)
+@ifclear HviiiEXCLUSIVE
We can use @code{disassemble} to inspect the object code
range shown in the last @code{info line} example (the example
shows SPARC machine instructions):
-_0__
+
@smallexample
-(_GDBP__) disas 0x63e4 0x6404
+(@value{GDBP}) disas 0x63e4 0x6404
Dump of assembler code from 0x63e4 to 0x6404:
0x63e4 <builtin_init+5340>: ble 0x63f8 <builtin_init+5360>
0x63e8 <builtin_init+5344>: sethi %hi(0x4c00), %o0
0x6400 <builtin_init+5368>: nop
End of assembler dump.
@end smallexample
-_1__
-_fi__(_GENERIC__||!_H8__)
+@end ifclear
-_if__(!_GENERIC__||_H8__)
+@ifset HviiiEXCLUSIVE
For example, here is the beginning of the output for the
disassembly of a function @code{fact}:
-_0__
+
@smallexample
-(_GDBP__) disas fact
+(@value{GDBP}) disas fact
Dump of assembler code for function fact:
to 0x808c:
0x802c <fact>: 6d f2 mov.w r2,@@-r7
.
.
@end smallexample
-_1__
-_fi__(!_GENERIC__||_H8__)
-
+@end ifset
@node Data
@chapter Examining Data
@c different window or something like that.
The usual way to examine data in your program is with the @code{print}
command (abbreviated @code{p}), or its synonym @code{inspect}.
-_if__(!_CONLY__)
+@ifclear CONLY
It evaluates and prints the value of an expression of the language your
-program is written in (@pxref{Languages, ,Using _GDBN__ with Different
+program is written in (@pxref{Languages, ,Using @value{GDBN} with Different
Languages}).
-_fi__(!_CONLY__)
+@end ifclear
@table @code
@item print @var{exp}
@item print
@itemx print /@var{f}
-If you omit @var{exp}, _GDBN__ displays the last value again (from the
+If you omit @var{exp}, @value{GDBN} displays the last value again (from the
@dfn{value history}; @pxref{Value History, ,Value History}). This allows you to
conveniently inspect the same value in an alternative format.
@end table
of a struct or class are declared, use the @code{ptype @var{exp}}
command rather than @code{print}. @xref{Symbols, ,Examining the Symbol Table}.
+@ignore
+@c pre-unfold
+@menu
+* Expressions:: Expressions
+* Variables:: Program Variables
+* Arrays:: Artificial Arrays
+* Output formats:: Output formats
+* Memory:: Examining Memory
+* Auto Display:: Automatic Display
+* Print Settings:: Print Settings
+* Value History:: Value History
+* Convenience Vars:: Convenience Variables
+* Registers:: Registers
+@ifclear HviiiEXCLUSIVE
+* Floating Point Hardware:: Floating Point Hardware
+@end ifclear
+@end menu
+@end ignore
+
+@ifclear HviiiEXCLUSIVE
@menu
* Expressions:: Expressions
* Variables:: Program Variables
* Value History:: Value History
* Convenience Vars:: Convenience Variables
* Registers:: Registers
-_if__(_GENERIC__ || !_H8__)
* Floating Point Hardware:: Floating Point Hardware
-_fi__(_GENERIC__ || !_H8__)
@end menu
+@end ifclear
+
+@ifset HviiiEXCLUSIVE
+@menu
+* Expressions:: Expressions
+* Variables:: Program Variables
+* Arrays:: Artificial Arrays
+* Output formats:: Output formats
+* Memory:: Examining Memory
+* Auto Display:: Automatic Display
+* Print Settings:: Print Settings
+* Value History:: Value History
+* Convenience Vars:: Convenience Variables
+* Registers:: Registers
+@end menu
+@end ifset
@node Expressions
@section Expressions
@cindex expressions
-@code{print} and many other _GDBN__ commands accept an expression and
+@code{print} and many other @value{GDBN} commands accept an expression and
compute its value. Any kind of constant, variable or operator defined
by the programming language you are using is legal in an expression in
-_GDBN__. This includes conditional expressions, function calls, casts
+@value{GDBN}. This includes conditional expressions, function calls, casts
and string constants. It unfortunately does not include symbols defined
by preprocessor @code{#define} commands.
-_if__(!_CONLY__)
+@ifclear CONLY
Because C is so widespread, most of the expressions shown in examples in
-this manual are in C. @xref{Languages, , Using _GDBN__ with Different
+this manual are in C. @xref{Languages, , Using @value{GDBN} with Different
Languages}, for information on how to use expressions in other
languages.
-In this section, we discuss operators that you can use in _GDBN__
+In this section, we discuss operators that you can use in @value{GDBN}
expressions regardless of your programming language.
Casts are supported in all languages, not just in C, because it is so
useful to cast a number into a pointer so as to examine a structure
at that address in memory.
@c FIXME: casts supported---Mod2 true?
-_fi__(!_CONLY__)
+@end ifclear
-_GDBN__ supports these operators in addition to those of programming
+@value{GDBN} supports these operators in addition to those of programming
languages:
@table @code
@noindent
Here @var{file} or @var{function} is the name of the context for the
static @var{variable}. In the case of file names, you can use quotes to
-make sure _GDBN__ parses the file name as a single word---for example,
+make sure @value{GDBN} parses the file name as a single word---for example,
to print a global value of @code{x} defined in @file{f2.c}:
@example
-(_GDBP__) p 'f2.c'::x
+(@value{GDBP}) p 'f2.c'::x
@end example
-_if__(!_CONLY__)
+@ifclear CONLY
@cindex C++ scope resolution
This use of @samp{::} is very rarely in conflict with the very similar
-use of the same notation in C++. _GDBN__ also supports use of the C++
-scope resolution operator in _GDBN__ expressions.
-_fi__(!_CONLY__)
+use of the same notation in C++. @value{GDBN} also supports use of the C++
+scope resolution operator in @value{GDBN} expressions.
+@end ifclear
@cindex wrong values
@cindex variable values, wrong
@cindex formatted output
@cindex output formats
-By default, _GDBN__ prints a value according to its data type. Sometimes
+By default, @value{GDBN} prints a value according to its data type. Sometimes
this is not what you want. For example, you might want to print a number
in hex, or a pointer in decimal. Or you might want to view data in memory
at a certain address as a character string or as an instruction. To do
what function) an unknown address is located:
@example
-(_GDBP__) p/a 0x54320
-_0__$3 = 0x54320 <_initialize_vx+396>_1__
+(@value{GDBP}) p/a 0x54320
+$3 = 0x54320 <_initialize_vx+396>
@end example
@item c
@noindent
Note that no space is required before the slash; this is because command
-names in _GDBN__ cannot contain a slash.
+names in @value{GDBN} cannot contain a slash.
To reprint the last value in the value history with a different format,
you can use the @code{print} command with just a format and no
@samp{i} formats, the unit size is ignored and is normally not written.)
@item @var{addr}, starting display address
-@var{addr} is the address where you want _GDBN__ to begin displaying
+@var{addr} is the address where you want @value{GDBN} to begin displaying
memory. The expression need not have a pointer value (though it may);
it is always interpreted as an integer address of a byte of memory.
@xref{Expressions, ,Expressions}, for more information on expressions. The default for
@cindex @code{$_}, @code{$__}, and value history
The addresses and contents printed by the @code{x} command are not saved
in the value history because there is often too much of them and they
-would get in the way. Instead, _GDBN__ makes these values available for
+would get in the way. Instead, @value{GDBN} makes these values available for
subsequent use in expressions as values of the convenience variables
@code{$_} and @code{$__}. After an @code{x} command, the last address
examined is available for use in expressions in the convenience variable
If you find that you want to print the value of an expression frequently
(to see how it changes), you might want to add it to the @dfn{automatic
-display list} so that _GDBN__ will print its value each time your program stops.
+display list} so that @value{GDBN} will print its value each time your program stops.
Each expression added to the list is given a number to identify it;
to remove an expression from the list, you specify that number.
The automatic display looks like this:
@cindex format options
@cindex print settings
-_GDBN__ provides the following ways to control how arrays, structures,
+@value{GDBN} provides the following ways to control how arrays, structures,
and symbols are printed.
@noindent
@item set print address
@item set print address on
@kindex set print address
-_GDBN__ will print memory addresses showing the location of stack
+@value{GDBN} will print memory addresses showing the location of stack
traces, structure values, pointer values, breakpoints, and so forth,
even when it also displays the contents of those addresses. The default
is on. For example, this is what a stack frame display looks like, with
@smallexample
@group
-(_GDBP__) f
+(@value{GDBP}) f
#0 set_quotes (lq=0x34c78 "<<", rq=0x34c88 ">>")
at input.c:530
530 if (lquote != def_lquote)
@example
@group
-(_GDBP__) set print addr off
-(_GDBP__) f
+(@value{GDBP}) set print addr off
+(@value{GDBP}) f
#0 set_quotes (lq="<<", rq=">>") at input.c:530
530 if (lquote != def_lquote)
@end group
@item set print array
@itemx set print array on
@kindex set print array
-_GDBN__ will pretty print arrays. This format is more convenient to read,
+@value{GDBN} will pretty print arrays. This format is more convenient to read,
but uses more space. The default is off.
@item set print array off.
@item set print elements @var{number-of-elements}
@kindex set print elements
-If _GDBN__ is printing a large array, it will stop printing after it has
+If @value{GDBN} is printing a large array, it will stop printing after it has
printed the number of elements set by the @code{set print elements} command.
This limit also applies to the display of strings.
@item show print elements
@kindex show print elements
-Display the number of elements of a large array that _GDBN__ will print
+Display the number of elements of a large array that @value{GDBN} will print
before losing patience.
@item set print pretty on
@kindex set print pretty
-Cause _GDBN__ to print structures in an indented format with one member per
+Cause @value{GDBN} to print structures in an indented format with one member per
line, like this:
@example
@end example
@item set print pretty off
-Cause _GDBN__ to print structures in a compact format, like this:
+Cause @value{GDBN} to print structures in a compact format, like this:
@smallexample
@group
@item show print pretty
@kindex show print pretty
-Show which format _GDBN__ will use to print structures.
+Show which format @value{GDBN} will use to print structures.
@item set print sevenbit-strings on
@kindex set print sevenbit-strings
Print using only seven-bit characters; if this option is set,
-_GDBN__ will display any eight-bit characters (in strings or character
+@value{GDBN} will display any eight-bit characters (in strings or character
values) using the notation @code{\}@var{nnn}. For example, @kbd{M-a} is
displayed as @code{\341}.
@item show print sevenbit-strings
@kindex show print sevenbit-strings
-Show whether or not _GDBN__ will print only seven-bit characters.
+Show whether or not @value{GDBN} will print only seven-bit characters.
@item set print union on
@kindex set print union
-Tell _GDBN__ to print unions which are contained in structures. This is the
+Tell @value{GDBN} to print unions which are contained in structures. This is the
default setting.
@item set print union off
-Tell _GDBN__ not to print unions which are contained in structures.
+Tell @value{GDBN} not to print unions which are contained in structures.
@item show print union
@kindex show print union
-Ask _GDBN__ whether or not it will print unions which are contained in
+Ask @value{GDBN} whether or not it will print unions which are contained in
structures.
For example, given the declarations
@section Value History
@cindex value history
-Values printed by the @code{print} command are saved in _GDBN__'s @dfn{value
+Values printed by the @code{print} command are saved in @value{GDBN}'s @dfn{value
history} so that you can refer to them in other expressions. Values are
kept until the symbol table is re-read or discarded (for example with
the @code{file} or @code{symbol-file} commands). When the symbol table
@section Convenience Variables
@cindex convenience variables
-_GDBN__ provides @dfn{convenience variables} that you can use within
-_GDBN__ to hold on to a value and refer to it later. These variables
-exist entirely within _GDBN__; they are not part of your program, and
+@value{GDBN} provides @dfn{convenience variables} that you can use within
+@value{GDBN} to hold on to a value and refer to it later. These variables
+exist entirely within @value{GDBN}; they are not part of your program, and
setting a convenience variable has no direct effect on further execution
of your program. That is why you can use them freely.
incremented or a pointer to be advanced. For example, to print
a field from successive elements of an array of structures:
-_0__@example
+@example
set $i = 0
print bar[$i++]->contents
@i{@dots{} repeat that command by typing @key{RET}.}
-_1__@end example
+@end example
-Some convenience variables are created automatically by _GDBN__ and given
+Some convenience variables are created automatically by @value{GDBN} and given
values likely to be useful.
@table @code
or without the initial @samp{$}.
@end table
-_GDBN__ has four ``standard'' register names that are available (in
+@value{GDBN} has four ``standard'' register names that are available (in
expressions) on most machines---whenever they do not conflict with an
architecture's canonical mnemonics for registers. The register names
@code{$pc} and @code{$sp} are used for the program counter register and
registers} displays the processor status register as @code{$psr} but you
can also refer to it as @code{$ps}.
-_GDBN__ always considers the contents of an ordinary register as an
+@value{GDBN} always considers the contents of an ordinary register as an
integer when the register is examined in this way. Some machines have
special registers which can hold nothing but floating point; these
registers are considered to have floating point values. There is no way
sees. For example, the registers of the 68881 floating point
coprocessor are always saved in ``extended'' (raw) format, but all C
programs expect to work with ``double'' (virtual) format. In such
-cases, _GDBN__ normally works with the virtual format only (the format that
+cases, @value{GDBN} normally works with the virtual format only (the format that
makes sense for your program), but the @code{info registers} command
prints the data in both formats.
true contents of hardware registers, you must select the innermost
frame (with @samp{frame 0}).
-However, _GDBN__ must deduce where registers are saved, from the machine
+However, @value{GDBN} must deduce where registers are saved, from the machine
code generated by your compiler. If some registers are not saved, or if
-_GDBN__ is unable to locate the saved registers, the selected stack
+@value{GDBN} is unable to locate the saved registers, the selected stack
frame will make no difference.
-_if__(_AMD29K__)
+@ifset AMDxxixK
@table @code
@item set rstack_high_address @var{address}
@kindex set rstack_high_address
@cindex AMD 29K register stack
@cindex register stack, AMD29K
On AMD 29000 family processors, registers are saved in a separate
-``register stack''. There is no way for _GDBN__ to determine the extent
-of this stack. Normally, _GDBN__ just assumes that the stack is ``large
-enough''. This may result in _GDBN__ referencing memory locations that
+``register stack''. There is no way for @value{GDBN} to determine the extent
+of this stack. Normally, @value{GDBN} just assumes that the stack is ``large
+enough''. This may result in @value{GDBN} referencing memory locations that
don't exist. If necessary, you can get around this problem by
specifying the ending address of the register stack with the @code{set
rstack_high_address} command. The argument should be an address, which
Display the current limit of the register stack, on AMD 29000 family
processors.
@end table
-_fi__(_AMD29K__)
+@end ifset
-_if__(_GENERIC__ || !_H8__)
+@ifclear HviiiEXCLUSIVE
@node Floating Point Hardware
@section Floating Point Hardware
@cindex floating point
-Depending on the host machine architecture, _GDBN__ may be able to give
+Depending on the host machine architecture, @value{GDBN} may be able to give
you more information about the status of the floating point hardware.
@table @code
@c FIXME...supported currently on arm's and 386's. Mark properly with
@c FIXME... m4 macros to isolate general statements from hardware-dep,
@c FIXME... at that point.
-_fi__(_GENERIC__ || !_H8__)
+@end ifclear
-_if__(!_CONLY__)
+@ifclear CONLY
@node Languages
-@chapter Using _GDBN__ with Different Languages
+@chapter Using @value{GDBN} with Different Languages
@cindex languages
Although programming languages generally have common aspects, they are
like @samp{0x1ae}, while in Modula-2 they appear as @samp{1AEH}.
@cindex working language
-Language-specific information is built into _GDBN__ for some languages,
+Language-specific information is built into @value{GDBN} for some languages,
allowing you to express operations like the above in your program's
-native language, and allowing _GDBN__ to output values in a manner
+native language, and allowing @value{GDBN} to output values in a manner
consistent with the syntax of your program's native language. The
language you use to build expressions, called the @dfn{working
-language}, can be selected manually, or _GDBN__ can set it
+language}, can be selected manually, or @value{GDBN} can set it
automatically.
@menu
@node Setting
@section Switching between source languages
-There are two ways to control the working language---either have _GDBN__
+There are two ways to control the working language---either have @value{GDBN}
set it automatically, or select it manually yourself. You can use the
-@code{set language} command for either purpose. On startup, _GDBN__
+@code{set language} command for either purpose. On startup, @value{GDBN}
defaults to setting the language automatically.
@menu
* Manually:: Setting the working language manually
-* Automatically:: Having _GDBN__ infer the source language
+* Automatically:: Having @value{GDBN} infer the source language
@end menu
@node Manually
where @var{lang} is the name of a language: @code{c} or @code{modula-2}.
For a list of the supported languages, type @samp{set language}.
-Setting the language manually prevents _GDBN__ from updating the working
+Setting the language manually prevents @value{GDBN} from updating the working
language automatically. This can lead to confusion if you try
to debug a program when the working language is not the same as the
source language, when an expression is acceptable to both
languages---but means different things. For instance, if the current
-source file were written in C, and _GDBN__ was parsing Modula-2, a
+source file were written in C, and @value{GDBN} was parsing Modula-2, a
command such as:
@example
printed would be the value of @code{a}. In Modula-2, this means to compare
@code{a} to the result of @code{b+c}, yielding a @code{BOOLEAN} value.
-If you allow _GDBN__ to set the language automatically, then
+If you allow @value{GDBN} to set the language automatically, then
you can count on expressions evaluating the same way in your debugging
session and in your program.
@node Automatically
-@subsection Having _GDBN__ infer the source language
+@subsection Having @value{GDBN} infer the source language
-To have _GDBN__ set the working language automatically, use @samp{set
-language local} or @samp{set language auto}. _GDBN__ then infers the
+To have @value{GDBN} set the working language automatically, use @samp{set
+language local} or @samp{set language auto}. @value{GDBN} then infers the
language that a program was written in by looking at the name of its
source files, and examining their extensions:
This information is recorded for each function or procedure in a source
file. When your program stops in a frame (usually by encountering a
-breakpoint), _GDBN__ sets the working language to the language recorded
+breakpoint), @value{GDBN} sets the working language to the language recorded
for the function in that frame. If the language for a frame is unknown
(that is, if the function or block corresponding to the frame was
defined in a source file that does not have a recognized extension), the
-current working language is not changed, and _GDBN__ issues a warning.
+current working language is not changed, and @value{GDBN} issues a warning.
This may not seem necessary for most programs, which are written
entirely in one source language. However, program modules and libraries
@section Type and range Checking
@quotation
-@emph{Warning:} In this release, the _GDBN__ commands for type and range
+@emph{Warning:} In this release, the @value{GDBN} commands for type and range
checking are included, but they do not yet have any effect. This
section documents the intended facilities.
@end quotation
by eliminating type mismatches, and providing active checks for range
errors when your program is running.
-_GDBN__ can check for conditions like the above if you wish.
-Although _GDBN__ will not check the statements in your program, it
-can check expressions entered directly into _GDBN__ for evaluation via
+@value{GDBN} can check for conditions like the above if you wish.
+Although @value{GDBN} will not check the statements in your program, it
+can check expressions entered directly into @value{GDBN} for evaluation via
the @code{print} command, for example. As with the working language,
-_GDBN__ can also decide whether or not to check automatically based on
+@value{GDBN} can also decide whether or not to check automatically based on
your program's source language. @xref{Support, ,Supported Languages},
for the default settings of supported languages.
The second example fails because the @code{CARDINAL} 1 is not
type-compatible with the @code{REAL} 2.3.
-For expressions you use in _GDBN__ commands, you can tell the _GDBN__
+For expressions you use in @value{GDBN} commands, you can tell the @value{GDBN}
type checker to skip checking; to treat any mismatches as errors and
abandon the expression; or only issue warnings when type mismatches
occur, but evaluate the expression anyway. When you choose the last of
-these, _GDBN__ evaluates expressions like the second example above, but
+these, @value{GDBN} evaluates expressions like the second example above, but
also issues a warning.
Even though you may turn type checking off, other type-based reasons may
-prevent _GDBN__ from evaluating an expression. For instance, _GDBN__ does not
+prevent @value{GDBN} from evaluating an expression. For instance, @value{GDBN} does not
know how to add an @code{int} and a @code{struct foo}. These particular
type errors have nothing to do with the language in use, and usually
arise from expressions, such as the one described above, which make
operators. @xref{Support, ,Supported Languages}, for further
details on specific languages.
-_GDBN__ provides some additional commands for controlling the type checker:
+@value{GDBN} provides some additional commands for controlling the type checker:
@kindex set check
@kindex set check type
Set type checking on or off, overriding the default setting for the
current working language. Issue a warning if the setting does not
match the language's default. If any type mismatches occur in
-evaluating an expression while typechecking is on, _GDBN__ prints a
+evaluating an expression while typechecking is on, @value{GDBN} prints a
message and aborts evaluation of the expression.
@item set check type warn
Cause the type checker to issue warnings, but to always attempt to
evaluate the expression. Evaluating the expression may still
-be impossible for other reasons. For example, _GDBN__ cannot add
+be impossible for other reasons. For example, @value{GDBN} cannot add
numbers and structures.
@item show type
-Show the current setting of the type checker, and whether or not _GDBN__ is
+Show the current setting of the type checker, and whether or not @value{GDBN} is
setting it automatically.
@end table
computations do not overflow, or indices on an array element access do
not exceed the bounds of the array.
-For expressions you use in _GDBN__ commands, you can tell _GDBN__ to
+For expressions you use in @value{GDBN} commands, you can tell @value{GDBN} to
ignore range errors; to always treat them as errors and abandon the
expression; or to issue warnings when a range error occurs but evaluate
the expression anyway.
specific to individual compilers or machines. @xref{Support, ,
Supported Languages}, for further details on specific languages.
-_GDBN__ provides some additional commands for controlling the range checker:
+@value{GDBN} provides some additional commands for controlling the range checker:
@kindex set check
@kindex set check range
is printed and evaluation of the expression is aborted.
@item set check range warn
-Output messages when the _GDBN__ range checker detects a range error,
+Output messages when the @value{GDBN} range checker detects a range error,
but attempt to evaluate the expression anyway. Evaluating the
expression may still be impossible for other reasons, such as accessing
memory that the process does not own (a typical example from many UNIX
@item show range
Show the current setting of the range checker, and whether or not it is
-being set automatically by _GDBN__.
+being set automatically by @value{GDBN}.
@end table
@node Support
@section Supported Languages
-_GDBN__ 4 supports C, C++, and Modula-2. Some _GDBN__
+@value{GDBN} 4 supports C, C++, and Modula-2. Some @value{GDBN}
features may be used in expressions regardless of the language you
-use: the _GDBN__ @code{@@} and @code{::} operators, and the
+use: the @value{GDBN} @code{@@} and @code{::} operators, and the
@samp{@{type@}addr} construct (@pxref{Expressions, ,Expressions}) can be
used with the constructs of any of the supported languages.
The following sections detail to what degree each of these
-source languages is supported by _GDBN__. These sections are
+source languages is supported by @value{GDBN}. These sections are
not meant to be language tutorials or references, but serve only as a
-reference guide to what the _GDBN__ expression parser will accept, and
+reference guide to what the @value{GDBN} expression parser will accept, and
what input and output formats should look like for different languages.
There are many good books written on each of these languages; please
look to these for a language reference or tutorial.
@cindex C and C++
@cindex expressions in C or C++
-Since C and C++ are so closely related, many features of _GDBN__ apply
+Since C and C++ are so closely related, many features of @value{GDBN} apply
to both languages. Whenever this is the case, we discuss both languages
together.
@kindex g++
@cindex GNU C++
The C++ debugging facilities are jointly implemented by the GNU C++
-compiler and _GDBN__. Therefore, to debug your C++ code effectively,
+compiler and @value{GDBN}. Therefore, to debug your C++ code effectively,
you must compile your C++ programs with the GNU C++ compiler,
@code{g++}.
-_fi__(!_CONLY__)
-_if__(_CONLY__)
+@end ifclear
+@ifset CONLY
@node C
@chapter C Language Support
@cindex C language
@cindex expressions in C
-Information specific to the C language is built into _GDBN__ so that you
-can use C expressions while degugging. This also permits _GDBN__ to
+Information specific to the C language is built into @value{GDBN} so that you
+can use C expressions while degugging. This also permits @value{GDBN} to
output values in a manner consistent with C conventions.
@menu
* C Operators:: C Operators
* C Constants:: C Constants
-* Debugging C:: _GDBN__ and C
+* Debugging C:: @value{GDBN} and C
@end menu
-_fi__(_CONLY__)
-_if__(!_CONLY__)
+@end ifset
+@ifclear CONLY
@menu
* C Operators:: C and C++ Operators
* C Constants:: C and C++ Constants
* Cplusplus expressions:: C++ Expressions
* C Defaults:: Default settings for C and C++
* C Checks:: C and C++ Type and Range Checks
-* Debugging C:: _GDBN__ and C
+* Debugging C:: @value{GDBN} and C
* Debugging C plus plus:: Special features for C++
@end menu
-_fi__(!_CONLY__)
+@end ifclear
-_if__(!_CONLY__)
+@ifclear CONLY
@cindex C and C++ operators
@node C Operators
@subsubsection C and C++ Operators
-_fi__(!_CONLY__)
-_if__(_CONLY__)
+@end ifclear
+@ifset CONLY
@cindex C operators
@node C Operators
@section C Operators
-_fi__(_CONLY__)
+@end ifset
Operators must be defined on values of specific types. For instance,
@code{+} is defined on numbers, but not on structures. Operators are
often defined on groups of types.
-_if__(!_CONLY__)
+@ifclear CONLY
For the purposes of C and C++, the following definitions hold:
-_fi__(!_CONLY__)
+@end ifclear
@itemize @bullet
@item
in order of increasing precedence:
@table @code
-_0__@item ,
+@item ,
The comma or sequencing operator. Expressions in a comma-separated list
are evaluated from left to right, with the result of the entire
expression being the last expression evaluated.
and non-zero for true.
@item <<@r{, }>>
-left shift, and right shift. Defined on integral types._1__
+left shift, and right shift. Defined on integral types.
@item @@
-The _GDBN__ ``artificial array'' operator (@pxref{Expressions, ,Expressions}).
+The @value{GDBN} ``artificial array'' operator (@pxref{Expressions, ,Expressions}).
@item +@r{, }-
Addition and subtraction. Defined on integral types, floating-point types and
@item &
Address operator. Defined on variables. Same precedence as @code{++}.
-_if__(!_CONLY__)
-For debugging C++, _GDBN__ implements a use of @samp{&} beyond what's
+@ifclear CONLY
+For debugging C++, @value{GDBN} implements a use of @samp{&} beyond what's
allowed in the C++ language itself: you can use @samp{&(&@var{ref})}
(or, if you prefer, simply @samp{&&@var{ref}} to examine the address
where a C++ reference variable (declared with @samp{&@var{ref}}) is
stored.
-_fi__(!_CONLY__)
+@end ifclear
@item -
Negative. Defined on integral and floating-point types. Same
Bitwise complement operator. Defined on integral types. Same precedence as
@code{++}.
-_0__
+
@item .@r{, }->
Structure member, and pointer-to-structure member. For convenience,
-_GDBN__ regards the two as equivalent, choosing whether to dereference a
+@value{GDBN} regards the two as equivalent, choosing whether to dereference a
pointer based on the stored type information.
Defined on @code{struct}s and @code{union}s.
@code{*(@var{a}+@var{i})}. Same precedence as @code{->}.
@item ()
-Function parameter list. Same precedence as @code{->}._1__
+Function parameter list. Same precedence as @code{->}.
-_if__(!_CONLY__)
+@ifclear CONLY
@item ::
C++ scope resolution operator. Defined on
@code{struct}, @code{union}, and @code{class} types.
-_fi__(!_CONLY__)
+@end ifclear
@item ::
-The _GDBN__ scope operator (@pxref{Expressions, ,Expressions}).
-_if__(!_CONLY__)
+The @value{GDBN} scope operator (@pxref{Expressions, ,Expressions}).
+@ifclear CONLY
Same precedence as @code{::}, above.
-_fi__(!_CONLY__)
+@end ifclear
@end table
-_if__(!_CONLY__)
+@ifclear CONLY
@cindex C and C++ constants
@node C Constants
@subsubsection C and C++ Constants
-_GDBN__ allows you to express the constants of C and C++ in the
+@value{GDBN} allows you to express the constants of C and C++ in the
following ways:
-_fi__(!_CONLY__)
-_if__(_CONLY__)
+@end ifclear
+@ifset CONLY
@cindex C constants
@node C Constants
@section C Constants
-_GDBN__ allows you to express the constants of C in the
+@value{GDBN} allows you to express the constants of C in the
following ways:
-_fi__(_CONLY__)
+@end ifset
@itemize @bullet
@item
Pointer constants are an integral value.
@end itemize
-_if__(!_CONLY__)
+@ifclear CONLY
@node Cplusplus expressions
@subsubsection C++ Expressions
@cindex expressions in C++
-_GDBN__'s expression handling has a number of extensions to
+@value{GDBN}'s expression handling has a number of extensions to
interpret a significant subset of C++ expressions.
@cindex C++ support, not in @sc{coff}
a.out, MIPS @sc{ecoff}, RS/6000 @sc{xcoff}, or Sun @sc{elf} with stabs
extensions to the symbol table, these facilities are all available.
Where the object code format is standard @sc{coff}, on the other hand,
-most of the C++ support in _GDBN__ will @emph{not} work, nor can it.
+most of the C++ support in @value{GDBN} will @emph{not} work, nor can it.
For the standard SVr4 debugging format, @sc{dwarf} in @sc{elf}, the
-standard is still evolving, so the C++ support in _GDBN__ is still
+standard is still evolving, so the C++ support in @value{GDBN} is still
fragile; when this debugging format stabilizes, however, C++ support
will also be available on systems that use it.
@end quotation
@item
While a member function is active (in the selected stack frame), your
expressions have the same namespace available as the member function;
-that is, _GDBN__ allows implicit references to the class instance
+that is, @value{GDBN} allows implicit references to the class instance
pointer @code{this} following the same rules as C++.
@cindex call overloaded functions
@cindex type conversions in C++
@item
-You can call overloaded functions; _GDBN__ will resolve the function
+You can call overloaded functions; @value{GDBN} will resolve the function
call to the right definition, with one restriction---you must use
arguments of the type required by the function that you want to call.
-_GDBN__ will not perform conversions requiring constructors or
+@value{GDBN} will not perform conversions requiring constructors or
user-defined type operators.
@cindex reference declarations
@item
-_GDBN__ understands variables declared as C++ references; you can use them in
+@value{GDBN} understands variables declared as C++ references; you can use them in
expressions just as you do in C++ source---they are automatically
dereferenced.
-In the parameter list shown when _GDBN__ displays a frame, the values of
+In the parameter list shown when @value{GDBN} displays a frame, the values of
reference variables are not displayed (unlike other variables); this
avoids clutter, since references are often used for large structures.
The @emph{address} of a reference variable is always shown, unless
you have specified @samp{set print address off}.
@item
-_GDBN__ supports the C++ name resolution operator @code{::}---your
+@value{GDBN} supports the C++ name resolution operator @code{::}---your
expressions can use it just as expressions in your program do. Since
one scope may be defined in another, you can use @code{::} repeatedly if
necessary, for example in an expression like
-@samp{@var{scope1}::@var{scope2}::@var{name}}. _GDBN__ also allows
+@samp{@var{scope1}::@var{scope2}::@var{name}}. @value{GDBN} also allows
resolving name scope by reference to source files, in both C and C++
debugging (@pxref{Variables, ,Program Variables}).
@end enumerate
@subsubsection C and C++ Defaults
@cindex C and C++ defaults
-If you allow _GDBN__ to set type and range checking automatically, they
+If you allow @value{GDBN} to set type and range checking automatically, they
both default to @code{off} whenever the working language changes to
-C or C++. This happens regardless of whether you, or _GDBN__,
+C or C++. This happens regardless of whether you, or @value{GDBN},
selected the working language.
-If you allow _GDBN__ to set the language automatically, it sets the
+If you allow @value{GDBN} to set the language automatically, it sets the
working language to C or C++ on entering code compiled from a source file
whose name ends with @file{.c}, @file{.C}, or @file{.cc}.
-@xref{Automatically, ,Having _GDBN__ infer the source language}, for
+@xref{Automatically, ,Having @value{GDBN} infer the source language}, for
further details.
@node C Checks
@cindex C and C++ checks
@quotation
-@emph{Warning:} in this release, _GDBN__ does not yet perform type or
+@emph{Warning:} in this release, @value{GDBN} does not yet perform type or
range checking.
@end quotation
@c FIXME remove warning when type/range checks added
-By default, when _GDBN__ parses C or C++ expressions, type checking
-is not used. However, if you turn type checking on, _GDBN__ will
+By default, when @value{GDBN} parses C or C++ expressions, type checking
+is not used. However, if you turn type checking on, @value{GDBN} will
consider two variables type equivalent if:
@itemize @bullet
Range checking, if turned on, is done on mathematical operations. Array
indices are not checked, since they are often used to index a pointer
that is not itself an array.
-_fi__(!_CONLY__)
+@end ifclear
+@ifclear CONLY
@node Debugging C
-_if__(!_CONLY__)
-@subsubsection _GDBN__ and C
-_fi__(!_CONLY__)
-_if__(_CONLY__)
-@section _GDBN__ and C
-_fi__(_CONLY__)
+@subsubsection @value{GDBN} and C
+@end ifclear
+@ifset CONLY
+@node Debugging C
+@section @value{GDBN} and C
+@end ifset
The @code{set print union} and @code{show print union} commands apply to
the @code{union} type. When set to @samp{on}, any @code{union} that is
The @code{@@} operator aids in the debugging of dynamic arrays, formed
with pointers and a memory allocation function. (@pxref{Expressions, ,Expressions})
-_if__(!_CONLY__)
+@ifclear CONLY
@node Debugging C plus plus
-_if__(!_CONLY__)
-@subsubsection _GDBN__ Features for C++
-_fi__(!_CONLY__)
-_if__(_CONLY__)
-@section _GDBN__ Features for C++
-_fi__(_CONLY__)
+@subsubsection @value{GDBN} Features for C++
@cindex commands for C++
-Some _GDBN__ commands are particularly useful with C++, and some are
+Some @value{GDBN} commands are particularly useful with C++, and some are
designed specifically for use with C++. Here is a summary:
@table @code
@cindex break in overloaded functions
@item @r{breakpoint menus}
When you want a breakpoint in a function whose name is overloaded,
-_GDBN__'s breakpoint menus help you specify which function definition
+@value{GDBN}'s breakpoint menus help you specify which function definition
you want. @xref{Breakpoint Menus}.
@cindex overloading in C++
You can specify a particular definition of an overloaded symbol, using
the same notation that's used to declare such symbols in C++: type
@code{@var{symbol}(@var{types})} rather than just @var{symbol}. You can
-also use _GDBN__'s command-line word completion facilities to list the
+also use @value{GDBN}'s command-line word completion facilities to list the
available choices, or to finish the type list for you.
@xref{Completion,, Command Completion}, for details on how to do this.
@end table
@subsection Modula-2
@cindex Modula-2
-The extensions made to _GDBN__ to support Modula-2 support output
+The extensions made to @value{GDBN} to support Modula-2 support output
from the GNU Modula-2 compiler (which is currently being developed).
Other Modula-2 compilers are not currently supported, and attempting to
debug executables produced by them will most likely result in an error
-as _GDBN__ reads in the executable's symbol table.
+as @value{GDBN} reads in the executable's symbol table.
@cindex expressions in Modula-2
@menu
* Deviations:: Deviations from standard Modula-2
* M2 Checks:: Modula-2 Type and Range Checks
* M2 Scope:: The scope operators @code{::} and @code{.}
-* GDB/M2:: _GDBN__ and Modula-2
+* GDB/M2:: @value{GDBN} and Modula-2
@end menu
@node M2 Operators
@table @code
@item ,
Function argument or array index separator.
-_0__
+
@item :=
Assignment. The value of @var{var} @code{:=} @var{value} is
@var{value}.
@item =@r{, }<>@r{, }#
Equality and two ways of expressing inequality, valid on scalar types.
-Same precedence as @code{<}. In _GDBN__ scripts, only @code{<>} is
+Same precedence as @code{<}. In @value{GDBN} scripts, only @code{<>} is
available for inequality, since @code{#} conflicts with the script
comment character.
Boolean conjuction. Defined on boolean types.
@item @@
-The _GDBN__ ``artificial array'' operator (@pxref{Expressions, ,Expressions}).
+The @value{GDBN} ``artificial array'' operator (@pxref{Expressions, ,Expressions}).
@item +@r{, }-
Addition and subtraction on integral and floating-point types, or union
as @code{^}.
@item ::@r{, }.
-_GDBN__ and Modula-2 scope operators.
+@value{GDBN} and Modula-2 scope operators.
@end table
@quotation
-@emph{Warning:} Sets and their operations are not yet supported, so _GDBN__
+@emph{Warning:} Sets and their operations are not yet supported, so @value{GDBN}
will treat the use of the operator @code{IN}, or the use of operators
@code{+}, @code{-}, @code{*}, @code{/}, @code{=}, , @code{<>}, @code{#},
@code{<=}, and @code{>=} on sets as an error.
@end quotation
-_1__
+
@cindex Modula-2 built-ins
@node Built-In Func/Proc
@subsubsection Built-in Functions and Procedures
@quotation
@emph{Warning:} Sets and their operations are not yet supported, so
-_GDBN__ will treat the use of procedures @code{INCL} and @code{EXCL} as
+@value{GDBN} will treat the use of procedures @code{INCL} and @code{EXCL} as
an error.
@end quotation
@node M2 Constants
@subsubsection Constants
-_GDBN__ allows you to express the constants of Modula-2 in the following
+@value{GDBN} allows you to express the constants of Modula-2 in the following
ways:
@itemize @bullet
@subsubsection Modula-2 Defaults
@cindex Modula-2 defaults
-If type and range checking are set automatically by _GDBN__, they
+If type and range checking are set automatically by @value{GDBN}, they
both default to @code{on} whenever the working language changes to
-Modula-2. This happens regardless of whether you, or _GDBN__,
+Modula-2. This happens regardless of whether you, or @value{GDBN},
selected the working language.
-If you allow _GDBN__ to set the language automatically, then entering
+If you allow @value{GDBN} to set the language automatically, then entering
code compiled from a file whose name ends with @file{.mod} will set the
-working language to Modula-2. @xref{Automatically, ,Having _GDBN__ set
+working language to Modula-2. @xref{Automatically, ,Having @value{GDBN} set
the language automatically}, for further details.
@node Deviations
@item
C escape sequences can be used in strings and characters to represent
-non-printable characters. _GDBN__ will print out strings with these
+non-printable characters. @value{GDBN} will print out strings with these
escape sequences embedded. Single non-printable characters are
printed using the @samp{CHR(@var{nnn})} format.
@cindex Modula-2 checks
@quotation
-@emph{Warning:} in this release, _GDBN__ does not yet perform type or
+@emph{Warning:} in this release, @value{GDBN} does not yet perform type or
range checking.
@end quotation
@c FIXME remove warning when type/range checks added
-_GDBN__ considers two Modula-2 variables type equivalent if:
+@value{GDBN} considers two Modula-2 variables type equivalent if:
@itemize @bullet
@item
@end iftex
There are a few subtle differences between the Modula-2 scope operator
-(@code{.}) and the _GDBN__ scope operator (@code{::}). The two have
+(@code{.}) and the @value{GDBN} scope operator (@code{::}). The two have
similar syntax:
@example
@var{module} the name of a module, and @var{id} is any declared
identifier within your program, except another module.
-Using the @code{::} operator makes _GDBN__ search the scope
+Using the @code{::} operator makes @value{GDBN} search the scope
specified by @var{scope} for the identifier @var{id}. If it is not
-found in the specified scope, then _GDBN__ will search all scopes
+found in the specified scope, then @value{GDBN} will search all scopes
enclosing the one specified by @var{scope}.
-Using the @code{.} operator makes _GDBN__ search the current scope for
+Using the @code{.} operator makes @value{GDBN} search the current scope for
the identifier specified by @var{id} that was imported from the
definition module specified by @var{module}. With this operator, it is
an error if the identifier @var{id} was not imported from definition
@var{module}.
@node GDB/M2
-@subsubsection _GDBN__ and Modula-2
+@subsubsection @value{GDBN} and Modula-2
-Some _GDBN__ commands have little use when debugging Modula-2 programs.
+Some @value{GDBN} commands have little use when debugging Modula-2 programs.
Five subcommands of @code{set print} and @code{show print} apply
specifically to C and C++: @samp{vtbl}, @samp{demangle},
@samp{asm-demangle}, @samp{object}, and @samp{union}. The first four
created in Modula-2 as they can in C or C++. However, because an
address can be specified by an integral constant, the construct
@samp{@{@var{type}@}@var{adrexp}} is still useful. (@pxref{Expressions, ,Expressions})
-_0__
+
@cindex @code{#} in Modula-2
-In _GDBN__ scripts, the Modula-2 inequality operator @code{#} is
+In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
interpreted as the beginning of a comment. Use @code{<>} instead.
-_1__
-_fi__(!_CONLY__)
+
+@end ifclear
@node Symbols
@chapter Examining the Symbol Table
The commands described in this section allow you to inquire about the
symbols (names of variables, functions and types) defined in your
program. This information is inherent in the text of your program and
-does not change as your program executes. _GDBN__ finds it in your
-program's symbol table, in the file indicated when you started _GDBN__
+does not change as your program executes. @value{GDBN} finds it in your
+program's symbol table, in the file indicated when you started @value{GDBN}
(@pxref{File Options, ,Choosing Files}), or by one of the
file-management commands (@pxref{Files, ,Commands to Specify Files}).
@cindex names of symbols
@cindex quoting names
Occasionally, you may need to refer to symbols that contain unusual
-characters, which _GDBN__ ordinarily treats as word delimiters. The
+characters, which @value{GDBN} ordinarily treats as word delimiters. The
most frequent case is in referring to static variables in other
source files (@pxref{Variables,,Program Variables}). File names
-are recorded in object files as debugging symbols, but _GDBN__ would
+are recorded in object files as debugging symbols, but @value{GDBN} would
ordinarily parse a typical file name, like @file{foo.c}, as the three words
-@samp{foo} @samp{.} @samp{c}. To allow _GDBN__ to recognize
+@samp{foo} @samp{.} @samp{c}. To allow @value{GDBN} to recognize
@samp{foo.c} as a single symbol, enclose it in single quotes; for example,
@example
@example
@group
-(_GDBP__) whatis v
+(@value{GDBP}) whatis v
type = struct complex
-(_GDBP__) ptype v
+(@value{GDBP}) ptype v
type = struct complex @{
double real;
double imag;
@kindex maint print psymbols
@cindex partial symbol dump
Write a dump of debugging symbol data into the file @var{filename}.
-These commands are used to debug the _GDBN__ symbol-reading code. Only
+These commands are used to debug the @value{GDBN} symbol-reading code. Only
symbols with debugging data are included. If you use @samp{maint print
-symbols}, _GDBN__ includes all the symbols for which it has already
+symbols}, @value{GDBN} includes all the symbols for which it has already
collected full details: that is, @var{filename} reflects symbols for
-only those files whose symbols _GDBN__ has read. You can use the
+only those files whose symbols @value{GDBN} has read. You can use the
command @code{info sources} to find out which files these are. If you
use @samp{maint print psymbols} instead, the dump shows information about
-symbols that _GDBN__ only knows partially---that is, symbols defined in
-files that _GDBN__ has skimmed, but not yet read completely. Finally,
+symbols that @value{GDBN} only knows partially---that is, symbols defined in
+files that @value{GDBN} has skimmed, but not yet read completely. Finally,
@samp{maint print msymbols} dumps just the minimal symbol information
-required for each object file from which _GDBN__ has read some symbols.
-The description of @code{symbol-file} explains how _GDBN__ reads
+required for each object file from which @value{GDBN} has read some symbols.
+The description of @code{symbol-file} explains how @value{GDBN} reads
symbols; both @code{info source} and @code{symbol-file} are described in
@ref{Files, ,Commands to Specify Files}.
@end table
Once you think you have found an error in your program, you might want to
find out for certain whether correcting the apparent error would lead to
correct results in the rest of the run. You can find the answer by
-experiment, using the _GDBN__ features for altering execution of the
+experiment, using the @value{GDBN} features for altering execution of the
program.
For example, you can store new values into variables or memory
locations, give your program a signal, restart it at a different address,
or even return prematurely from a function to its caller.
+@ignore
+@c pre-unfold
@menu
* Assignment:: Assignment to Variables
* Jumping:: Continuing at a Different Address
-_if__(!_BARE__)
+@ifclear BARETARGET
* Signaling:: Giving your program a Signal
-_fi__(!_BARE__)
+@end ifclear
* Returning:: Returning from a Function
* Calling:: Calling your Program's Functions
* Patching:: Patching your Program
@end menu
+@end ignore
+
+@ifclear BARETARGET
+@menu
+* Assignment:: Assignment to Variables
+* Jumping:: Continuing at a Different Address
+* Signaling:: Giving your program a Signal
+* Returning:: Returning from a Function
+* Calling:: Calling your Program's Functions
+* Patching:: Patching your Program
+@end menu
+@end ifclear
+
+@ifset BARETARGET
+@menu
+* Assignment:: Assignment to Variables
+* Jumping:: Continuing at a Different Address
+* Returning:: Returning from a Function
+* Calling:: Calling your Program's Functions
+* Patching:: Patching your Program
+@end menu
+@end ifset
@node Assignment
@section Assignment to Variables
@noindent
stores the value 4 into the variable @code{x}, and then prints the
value of the assignment expression (which is 4).
-_if__(!_CONLY__)
-@xref{Languages, ,Using _GDBN__ with Different Languages}, for more
+@ifclear CONLY
+@xref{Languages, ,Using @value{GDBN} with Different Languages}, for more
information on operators in supported languages.
-_fi__(!_CONLY__)
+@end ifclear
@kindex set variable
@cindex variables, setting
to @code{set} except for its lack of subcommands. For example, a
program might well have a variable @code{width}---which leads to
an error if we try to set a new value with just @samp{set width=13}, as
-we might if @code{set width} did not happen to be a _GDBN__ command:
+we might if @code{set width} did not happen to be a @value{GDBN} command:
@example
-(_GDBP__) whatis width
+(@value{GDBP}) whatis width
type = double
-(_GDBP__) p width
+(@value{GDBP}) p width
$4 = 13
-(_GDBP__) set width=47
+(@value{GDBP}) set width=47
Invalid syntax in expression.
@end example
order to actually set our program's variable @code{width} is
@example
-(_GDBP__) set var width=47
+(@value{GDBP}) set var width=47
@end example
-_GDBN__ allows more implicit conversions in assignments than C; you can
+@value{GDBN} allows more implicit conversions in assignments than C; you can
freely store an integer value into a pointer variable or vice versa,
and any structure can be converted to any other structure that is the
same length or shorter.
perhaps with more breakpoints set, over a portion of a program that has
already executed, in order to examine its execution in more detail.
-_if__(!_BARE__)
+@ifclear BARETARGET
@node Signaling
@c @group
@section Giving your program a Signal
after executing the command.
@end table
@c @end group
-_fi__(!_BARE__)
+@end ifclear
@node Returning
@section Returning from a Function
value.
@end table
-When you use @code{return}, _GDBN__ discards the selected stack frame
+When you use @code{return}, @value{GDBN} discards the selected stack frame
(and all frames within it). You can think of this as making the
discarded frame return prematurely. If you wish to specify a value to
be returned, give that value as the argument to @code{return}.
@cindex writing into executables
@cindex writing into corefiles
-By default, _GDBN__ opens the file containing your program's executable
+By default, @value{GDBN} opens the file containing your program's executable
code (or the corefile) read-only. This prevents accidental alterations
to machine code; but it also prevents you from intentionally patching
your program's binary.
@item set write on
@itemx set write off
@kindex set write
-If you specify @samp{set write on}, _GDBN__ will open executable
-_if__(!_BARE__)
+If you specify @samp{set write on}, @value{GDBN} will open executable
+@ifclear BARETARGET
and core
-_fi__(!_BARE__)
+@end ifclear
files for both reading and writing; if you specify @samp{set write
-off} (the default), _GDBN__ will open them read-only.
+off} (the default), @value{GDBN} will open them read-only.
If you have already loaded a file, you must load it
again (using the @code{exec-file} or @code{core-file} command) after
@item show write
@kindex show write
Display whether executable files
-_if__(!_BARE__)
+@ifclear BARETARGET
and core files
-_fi__(!_BARE__)
+@end ifclear
will be opened for writing as well as reading.
@end table
-@node _GDBN__ Files
-@chapter _GDBN__'s Files
+@node GDB Files
+@chapter @value{GDBN}'s Files
-_GDBN__ needs to know the file name of the program to be debugged, both in
+@value{GDBN} needs to know the file name of the program to be debugged, both in
order to read its symbol table and in order to start your program.
-_if__(!_BARE__)
-To debug a core dump of a previous run, _GDBN__ must be told the file
+@ifclear BARETARGET
+To debug a core dump of a previous run, @value{GDBN} must be told the file
name of the core dump.
-_fi__(!_BARE__)
+@end ifclear
@menu
* Files:: Commands to Specify Files
@section Commands to Specify Files
@cindex symbol table
-_if__(!_BARE__)
+@ifclear BARETARGET
@cindex core dump file
The usual way to specify executable and core dump file names is with
-the command arguments given when you start _GDBN__, (@pxref{Invocation,
-,Getting In and Out of _GDBN__}.
-_fi__(!_BARE__)
-_if__(_BARE__)
+the command arguments given when you start @value{GDBN}, (@pxref{Invocation,
+,Getting In and Out of @value{GDBN}}.
+@end ifclear
+@ifset BARETARGET
The usual way to specify an executable file name is with
-the command argument given when you start _GDBN__, (@pxref{Invocation,
-,Getting In and Out of _GDBN__}.
-_fi__(_BARE__)
+the command argument given when you start @value{GDBN}, (@pxref{Invocation,
+,Getting In and Out of @value{GDBN}}.
+@end ifset
Occasionally it is necessary to change to a different file during a
-_GDBN__ session. Or you may run _GDBN__ and forget to specify a file you
-want to use. In these situations the _GDBN__ commands to specify new files
+@value{GDBN} session. Or you may run @value{GDBN} and forget to specify a file you
+want to use. In these situations the @value{GDBN} commands to specify new files
are useful.
@table @code
Use @var{filename} as the program to be debugged. It is read for its
symbols and for the contents of pure memory. It is also the program
executed when you use the @code{run} command. If you do not specify a
-directory and the file is not found in _GDBN__'s working directory, _GDBN__
+directory and the file is not found in @value{GDBN}'s working directory, @value{GDBN}
uses the environment variable @code{PATH} as a list of directories to
search, just as the shell does when looking for a program to run. You
-can change the value of this variable, for both _GDBN__ and your program,
+can change the value of this variable, for both @value{GDBN} and your program,
using the @code{path} command.
On systems with memory-mapped files, an auxiliary symbol table file
@file{@var{filename}.syms} may be available for @var{filename}. If it
-is, _GDBN__ will map in the symbol table from
+is, @value{GDBN} will map in the symbol table from
@file{@var{filename}.syms}, starting up more quickly. See the
descriptions of the options @samp{-mapped} and @samp{-readnow} (available
on the command line, and with the commands @code{file}, @code{symbol-file},
or @code{add-symbol-file}), for more information.
@item file
-@code{file} with no argument makes _GDBN__ discard any information it
+@code{file} with no argument makes @value{GDBN} discard any information it
has on both executable file and the symbol table.
@item exec-file @r{[} @var{filename} @r{]}
@kindex exec-file
Specify that the program to be run (but not the symbol table) is found
-in @var{filename}. _GDBN__ will search the environment variable @code{PATH}
+in @var{filename}. @value{GDBN} will search the environment variable @code{PATH}
if necessary to locate your program. Omitting @var{filename} means to
discard information on the executable file.
searched when necessary. Use the @code{file} command to get both symbol
table and program to run from the same file.
-@code{symbol-file} with no argument clears out _GDBN__'s information on your
+@code{symbol-file} with no argument clears out @value{GDBN}'s information on your
program's symbol table.
-The @code{symbol-file} command causes _GDBN__ to forget the contents of its
+The @code{symbol-file} command causes @value{GDBN} to forget the contents of its
convenience variables, the value history, and all breakpoints and
auto-display expressions. This is because they may contain pointers to
the internal data recording symbols and data types, which are part of
-the old symbol table data being discarded inside _GDBN__.
+the old symbol table data being discarded inside @value{GDBN}.
@code{symbol-file} will not repeat if you press @key{RET} again after
executing it once.
-When _GDBN__ is configured for a particular environment, it will
+When @value{GDBN} is configured for a particular environment, it will
understand debugging information in whatever format is the standard
generated for that environment; you may use either a GNU compiler, or
other compilers that adhere to the local conventions. Best results are
-usually obtained from GNU compilers; for example, using @code{_GCC__}
+usually obtained from GNU compilers; for example, using @code{@value{GCC}}
you can generate debugging information for optimized code.
On some kinds of object files, the @code{symbol-file} command does not
are present. The details are read later, one source file at a time,
as they are needed.
-The purpose of this two-stage reading strategy is to make _GDBN__ start up
+The purpose of this two-stage reading strategy is to make @value{GDBN} start up
faster. For the most part, it is invisible except for occasional
pauses while the symbol table details for a particular source file are
being read. (The @code{set verbose} command can turn these pauses
@kindex mapped
@cindex memory-mapped symbol file
@cindex saving symbol table
-You can override the _GDBN__ two-stage strategy for reading symbol
+You can override the @value{GDBN} two-stage strategy for reading symbol
tables by using the @samp{-readnow} option with any of the commands that
-load symbol table information, if you want to be sure _GDBN__ has the
+load symbol table information, if you want to be sure @value{GDBN} has the
entire symbol table available.
-_if__(!_BARE__)
+@ifclear BARETARGET
If memory-mapped files are available on your system through the
@code{mmap} system call, you can use another option, @samp{-mapped}, to
-cause _GDBN__ to write the symbols for your program into a reusable
-file. Future _GDBN__ debugging sessions will map in symbol information
+cause @value{GDBN} to write the symbols for your program into a reusable
+file. Future @value{GDBN} debugging sessions will map in symbol information
from this auxiliary symbol file (if the program hasn't changed), rather
than spending time reading the symbol table from the executable
program. Using the @samp{-mapped} option has the same effect as
-starting _GDBN__ with the @samp{-mapped} command-line option.
+starting @value{GDBN} with the @samp{-mapped} command-line option.
You can use both options together, to make sure the auxiliary symbol
file has all the symbol information for your program.
The auxiliary symbol file for a program called @var{myprog} is called
@samp{@var{myprog}.syms}. Once this file exists (so long as it is newer
-than the corresponding executable), _GDBN__ will always attempt to use
+than the corresponding executable), @value{GDBN} will always attempt to use
it when you debug @var{myprog}; no special options or commands are
needed.
@c FIXME: for now no mention of directories, since this seems to be in
@kindex core-file
Specify the whereabouts of a core dump file to be used as the ``contents
of memory''. Traditionally, core files contain only some parts of the
-address space of the process that generated them; _GDBN__ can access the
+address space of the process that generated them; @value{GDBN} can access the
executable file itself for other parts.
@code{core-file} with no argument specifies that no core file is
to be used.
Note that the core file is ignored when your program is actually running
-under _GDBN__. So, if you have been running your program and you wish to
+under @value{GDBN}. So, if you have been running your program and you wish to
debug a core file instead, you must kill the subprocess in which the
program is running. To do this, use the @code{kill} command
(@pxref{Kill Process, ,Killing the Child Process}).
-_fi__(!_BARE__)
+@end ifclear
@item load @var{filename}
@kindex load
-_if__(_GENERIC__)
+@ifset GENERIC
Depending on what remote debugging facilities are configured into
-_GDBN__, the @code{load} command may be available. Where it exists, it
+@value{GDBN}, the @code{load} command may be available. Where it exists, it
is meant to make @var{filename} (an executable) available for debugging
on the remote system---by downloading, or dynamic linking, for example.
-@code{load} also records @var{filename}'s symbol table in _GDBN__, like
+@code{load} also records @var{filename}'s symbol table in @value{GDBN}, like
the @code{add-symbol-file} command.
-If @code{load} is not available on your _GDBN__, attempting to execute
+If @code{load} is not available on your @value{GDBN}, attempting to execute
it gets the error message ``@code{You can't do that when your target is
@dots{}}''
-_fi__(_GENERIC__)
+@end ifset
-_if__(_VXWORKS__)
+@ifset VXWORKS
On VxWorks, @code{load} will dynamically link @var{filename} on the
-current target system as well as adding its symbols in _GDBN__.
-_fi__(_VXWORKS__)
+current target system as well as adding its symbols in @value{GDBN}.
+@end ifset
-_if__(_I960__)
+@ifset Icmlx
@cindex download to Nindy-960
With the Nindy interface to an Intel 960 board, @code{load} will
download @var{filename} to the 960 as well as adding its symbols in
-_GDBN__.
-_fi__(_I960__)
+@value{GDBN}.
+@end ifset
-_if__(_H8__)
+@ifset Hviii
@cindex download to H8/300
@cindex H8/300 download
When you select remote debugging to a Hitachi H8/300 board (@pxref{Hitachi
-H8/300 Remote,,_GDBN__ and the Hitachi H8/300}), the
+H8/300 Remote,,@value{GDBN} and the Hitachi H8/300}), the
@code{load} command downloads your program to the H8/300 and also opens
-it as the current executable target for _GDBN__ on your host (like the
+it as the current executable target for @value{GDBN} on your host (like the
@code{file} command).
-_fi__(_H8__)
+@end ifset
@code{load} will not repeat if you press @key{RET} again after using it.
-_if__(!_BARE__)
+@ifclear BARETARGET
@item add-symbol-file @var{filename} @var{address}
@itemx add-symbol-file @var{filename} @var{address} @r{[} -readnow @r{]} @r{[} -mapped @r{]}
@kindex add-symbol-file
from the file @var{filename}. You would use this command when @var{filename}
has been dynamically loaded (by some other means) into the program that
is running. @var{address} should be the memory address at which the
-file has been loaded; _GDBN__ cannot figure this out for itself.
+file has been loaded; @value{GDBN} cannot figure this out for itself.
The symbol table of the file @var{filename} is added to the symbol table
originally read with the @code{symbol-file} command. You can use the
@code{add-symbol-file} will not repeat if you press @key{RET} after using it.
You can use the @samp{-mapped} and @samp{-readnow} options just as with
-the @code{symbol-file} command, to change how _GDBN__ manages the symbol
+the @code{symbol-file} command, to change how @value{GDBN} manages the symbol
table information for @var{filename}.
-_fi__(!_BARE__)
+@end ifclear
@item info files
@itemx info target
@code{info files} and @code{info target} are synonymous; both print
the current targets (@pxref{Targets, ,Specifying a Debugging Target}),
including the names of the executable and core dump files currently in
-use by _GDBN__, and the files from which symbols were loaded. The command
+use by @value{GDBN}, and the files from which symbols were loaded. The command
@code{help targets} lists all possible targets rather than current
ones.
@end table
All file-specifying commands allow both absolute and relative file names
-as arguments. _GDBN__ always converts the file name to an absolute path
+as arguments. @value{GDBN} always converts the file name to an absolute path
name and remembers it that way.
-_if__(!_BARE__)
+@ifclear BARETARGET
@cindex shared libraries
-_GDBN__ supports SunOS, SVR4, and IBM RS/6000 shared libraries.
-_GDBN__ automatically loads symbol definitions from shared libraries
+@value{GDBN} supports SunOS, SVR4, and IBM RS/6000 shared libraries.
+@value{GDBN} automatically loads symbol definitions from shared libraries
when you use the @code{run} command, or when you examine a core file.
-(Before you issue the @code{run} command, _GDBN__ will not understand
+(Before you issue the @code{run} command, @value{GDBN} will not understand
references to a function in a shared library, however---unless you are
debugging a core file).
-@c FIXME: next _GDBN__ release should permit some refs to undef
+@c FIXME: next @value{GDBN} release should permit some refs to undef
@c FIXME...symbols---eg in a break cmd---assuming they are from a shared lib
@table @code
typing @code{run}. If @var{regex} is omitted all shared libraries
required by your program are loaded.
@end table
-_fi__(!_BARE__)
+@end ifclear
@node Symbol Errors
@section Errors Reading Symbol Files
-While reading a symbol file, _GDBN__ will occasionally encounter problems,
+While reading a symbol file, @value{GDBN} will occasionally encounter problems,
such as symbol types it does not recognize, or known bugs in compiler
-output. By default, _GDBN__ does not notify you of such problems, since
+output. By default, @value{GDBN} does not notify you of such problems, since
they are relatively common and primarily of interest to people
debugging compilers. If you are interested in seeing information
-about ill-constructed symbol tables, you can either ask _GDBN__ to print
+about ill-constructed symbol tables, you can either ask @value{GDBN} to print
only one message about each such type of problem, no matter how many
-times the problem occurs; or you can ask _GDBN__ to print more messages,
+times the problem occurs; or you can ask @value{GDBN} to print more messages,
to see how many times the problems occur, with the @code{set
complaints} command (@pxref{Messages/Warnings, ,Optional Warnings and
Messages}).
error indicates that an inner scope block is not fully contained
in its outer scope blocks.
-_GDBN__ circumvents the problem by treating the inner block as if it had
+@value{GDBN} circumvents the problem by treating the inner block as if it had
the same scope as the outer block. In the error message, @var{symbol}
may be shown as ``@code{(don't know)}'' if the outer block is not a
function.
order of increasing addresses. This error indicates that it does not
do so.
-_GDBN__ does not circumvent this problem, and will have trouble locating
+@value{GDBN} does not circumvent this problem, and will have trouble locating
symbols in the source file whose symbols being read. (You can often
determine what source file is affected by specifying @code{set verbose
on}. @xref{Messages/Warnings, ,Optional Warnings and Messages}.)
smaller than the address of the preceding source line. This is known
to occur in the SunOS 4.1.1 (and earlier) C compiler.
-_GDBN__ circumvents the problem by treating the symbol scope block as
+@value{GDBN} circumvents the problem by treating the symbol scope block as
starting on the previous source line.
@item bad string table offset in symbol @var{n}
Symbol number @var{n} contains a pointer into the string table which is
larger than the size of the string table.
-_GDBN__ circumvents the problem by considering the symbol to have the
+@value{GDBN} circumvents the problem by considering the symbol to have the
name @code{foo}, which may cause other problems if many symbols end up
with this name.
@item unknown symbol type @code{0x@var{nn}}
-The symbol information contains new data types that _GDBN__ does not yet
+The symbol information contains new data types that @value{GDBN} does not yet
know how to read. @code{0x@var{nn}} is the symbol type of the misunderstood
information, in hexadecimal.
-_GDBN__ circumvents the error by ignoring this symbol information. This
+@value{GDBN} circumvents the error by ignoring this symbol information. This
will usually allow your program to be debugged, though certain symbols
will not be accessible. If you encounter such a problem and feel like
-debugging it, you can debug @code{_GDBP__} with itself, breakpoint on
+debugging it, you can debug @code{@value{GDBP}} with itself, breakpoint on
@code{complain}, then go up to the function @code{read_dbx_symtab} and
examine @code{*bufp} to see the symbol.
@item stub type has NULL name
-_GDBN__ could not find the full definition for a struct or class.
+@value{GDBN} could not find the full definition for a struct or class.
@item const/volatile indicator missing (ok if using g++ v1.x), got@dots{}
@item info mismatch between compiler and debugger
-_GDBN__ could not parse a type specification output by the compiler.
+@value{GDBN} could not parse a type specification output by the compiler.
@end table
@node Targets
@kindex target
A @dfn{target} is the execution environment occupied by your program.
-_if__(!_BARE__)
-Often, _GDBN__ runs in the same host environment as your program; in
+@ifclear BARETARGET
+Often, @value{GDBN} runs in the same host environment as your program; in
that case, the debugging target is specified as a side effect when you
use the @code{file} or @code{core} commands. When you need more
-flexibility---for example, running _GDBN__ on a physically separate
+flexibility---for example, running @value{GDBN} on a physically separate
host, or controlling a standalone system over a serial port or a
realtime system over a TCP/IP connection---you
-_fi__(!_BARE__)
-_if__(_BARE__)
+@end ifclear
+@ifset BARETARGET
You
-_fi__(_BARE__)
+@end ifset
can use the @code{target} command to specify one of the target types
-configured for _GDBN__ (@pxref{Target Commands, ,Commands for Managing
+configured for @value{GDBN} (@pxref{Target Commands, ,Commands for Managing
Targets}).
@menu
@cindex active targets
@cindex multiple targets
-_if__(!_BARE__)
+@ifclear BARETARGET
There are three classes of targets: processes, core files, and
-executable files. _GDBN__ can work concurrently on up to three active
+executable files. @value{GDBN} can work concurrently on up to three active
targets, one in each class. This allows you to (for example) start a
process and inspect its activity without abandoning your work on a core
file.
If, for example, you execute @samp{gdb a.out}, then the executable file
@code{a.out} is the only active target. If you designate a core file as
well---presumably from a prior run that crashed and coredumped---then
-_GDBN__ has two active targets and will use them in tandem, looking
+@value{GDBN} has two active targets and will use them in tandem, looking
first in the corefile target, then in the executable file, to satisfy
requests for memory addresses. (Typically, these two classes of target
are complementary, since core files contain only a program's
read-write memory---variables and so on---plus machine status, while
executable files contain only the program text and initialized data.)
-_fi__(!_BARE__)
+@end ifclear
When you type @code{run}, your executable file becomes an active process
-target as well. When a process target is active, all _GDBN__ commands
+target as well. When a process target is active, all @value{GDBN} commands
requesting memory addresses refer to that target; addresses in an
-_if__(!_BARE__)
+@ifclear BARETARGET
active core file or
-_fi__(!_BARE__)
+@end ifclear
executable file target are obscured while the process
target is active.
-_if__(_BARE__)
+@ifset BARETARGET
Use the @code{exec-file} command to select a
new executable target (@pxref{Files, ,Commands to Specify
Files}).
-_fi__(_BARE__)
-_if__(!_BARE__)
+@end ifset
+@ifclear BARETARGET
Use the @code{core-file} and @code{exec-file} commands to select a
new core file or executable target (@pxref{Files, ,Commands to Specify
Files}). To specify as a target a process that is already running, use
the @code{attach} command (@pxref{Attach, ,Debugging an
Already-Running Process}.).
-_fi__(!_BARE__)
+@end ifclear
@node Target Commands
@section Commands for Managing Targets
@table @code
@item target @var{type} @var{parameters}
-Connects the _GDBN__ host environment to a target machine or process. A
+Connects the @value{GDBN} host environment to a target machine or process. A
target is typically a protocol for talking to debugging facilities. You
use the argument @var{type} to specify the type or protocol of the
target machine.
A core dump file. @samp{target core @var{filename}} is the same as
@samp{core-file @var{filename}}.
-_if__(_REMOTESTUB__)
+@ifset REMOTESTUB
@item target remote @var{dev}
@kindex target remote
Remote serial target in GDB-specific protocol. The argument @var{dev}
specifies what serial device to use for the connection (e.g.
@file{/dev/ttya}). @xref{Remote, ,Remote Debugging}.
-_fi__(_REMOTESTUB__)
+@end ifset
-_if__(_AMD29K__)
+@ifset AMDxxixK
@item target amd-eb @var{dev} @var{speed} @var{PROG}
@kindex target amd-eb
@cindex AMD EB29K
@var{dev} is the serial device, as for @code{target remote};
@var{speed} allows you to specify the linespeed; and @var{PROG} is the
name of the program to be debugged, as it appears to DOS on the PC.
-@xref{EB29K Remote, ,_GDBN__ with a Remote EB29K}.
+@xref{EB29K Remote, ,@value{GDBN} with a Remote EB29K}.
-_fi__(_AMD29K__)
-_if__(_H8__)
+@end ifset
+@ifset Hviii
@item target hms
@kindex target hms
A Hitachi H8/300 board, attached via serial line to your host. Use
special commands @code{device} and @code{speed} to control the serial
line and the communications speed used. @xref{Hitachi H8/300
-Remote,,_GDBN__ and the Hitachi H8/300}.
+Remote,,@value{GDBN} and the Hitachi H8/300}.
-_fi__(_H8__)
-_if__(_I960__)
+@end ifset
+@ifset Icmlx
@item target nindy @var{devicename}
@kindex target nindy
An Intel 960 board controlled by a Nindy Monitor. @var{devicename} is
the name of the serial device to use for the connection, e.g.
-@file{/dev/ttya}. @xref{i960-Nindy Remote, ,_GDBN__ with a Remote i960 (Nindy)}.
+@file{/dev/ttya}. @xref{i960-Nindy Remote, ,@value{GDBN} with a Remote i960 (Nindy)}.
-_fi__(_I960__)
-_if__(_ST2000__)
+@end ifset
+@ifset STmm
@item target st2000 @var{dev} @var{speed}
@kindex target st2000
A Tandem ST2000 phone switch, running Tandem's STDBUG protocol. @var{dev}
is the name of the device attached to the ST2000 serial line;
@var{speed} is the communication line speed. The arguments are not used
-if _GDBN__ is configured to connect to the ST2000 using TCP or Telnet.
-@xref{ST2000 Remote,,_GDBN__ with a Tandem ST2000}.
+if @value{GDBN} is configured to connect to the ST2000 using TCP or Telnet.
+@xref{ST2000 Remote,,@value{GDBN} with a Tandem ST2000}.
-_fi__(_ST2000__)
-_if__(_VXWORKS__)
+@end ifset
+@ifset VXWORKS
@item target vxworks @var{machinename}
@kindex target vxworks
A VxWorks system, attached via TCP/IP. The argument @var{machinename}
is the target system's machine name or IP address.
-@xref{VxWorks Remote, ,_GDBN__ and VxWorks}.
-_fi__(_VXWORKS__)
+@xref{VxWorks Remote, ,@value{GDBN} and VxWorks}.
+@end ifset
@end table
-_if__(_GENERIC__)
-Different targets are available on different configurations of _GDBN__; your
+@ifset GENERIC
+Different targets are available on different configurations of @value{GDBN}; your
configuration may have more or fewer targets.
-_fi__(_GENERIC__)
+@end ifset
@node Remote
@section Remote Debugging
Other remote targets may be available in your
configuration of GDB; use @code{help targets} to list them.
-_if__(_GENERIC__)
-_dnl__ Text on starting up GDB in various specific cases; it goes up front
-_dnl__ in manuals configured for any of those particular situations, here
-_dnl__ otherwise.
+@ifset GENERIC
+@c Text on starting up GDB in various specific cases; it goes up front
+@c in manuals configured for any of those particular situations, here
+@c otherwise.
+@ignore
+@c original, intended form of this menu (pre-unfolding):
+@menu
+@ifset REMOTESTUB
+* Remote Serial:: @value{GDBN} remote serial protocol
+@end ifset
+@ifset Icmlx
+* i960-Nindy Remote:: @value{GDBN} with a remote i960 (Nindy)
+@end ifset
+@ifset AMDxxixK
+* EB29K Remote:: @value{GDBN} with a remote EB29K
+@end ifset
+@ifset VXWORKS
+* VxWorks Remote:: @value{GDBN} and VxWorks
+@end ifset
+@ifset STmm
+* ST2000 Remote:: @value{GDBN} with a Tandem ST2000
+@end ifset
+@ifset Hviii
+* Hitachi H8/300 Remote:: @value{GDBN} and the Hitachi H8/300
+@end ifset
+@ifset ZviiiK
+* Z8000 Simulator:: @value{GDBN} and its Zilog Z8000 Simulator
+@end ifset
+@end menu
+@end ignore
+
+@c Unfolded menus:
+@c add as configs require, while unfolding remains necessary.
+@c
+@c All target details:
@menu
-_include__(gdbinv-m.m4)<>_dnl__
+* Remote Serial:: @value{GDBN} remote serial protocol
+* i960-Nindy Remote:: @value{GDBN} with a remote i960 (Nindy)
+* EB29K Remote:: @value{GDBN} with a remote EB29K
+* VxWorks Remote:: @value{GDBN} and VxWorks
+* ST2000 Remote:: @value{GDBN} with a Tandem ST2000
+* Hitachi H8/300 Remote:: @value{GDBN} and the Hitachi H8/300
+* Z8000 Simulator:: @value{GDBN} and its Zilog Z8000 Simulator
@end menu
-_include__(gdbinv-s.m4)
-_fi__(_GENERIC__)
-@node Controlling _GDBN__
-@chapter Controlling _GDBN__
+@include gdbinv-s.texi
+@end ifset
+
+@node Controlling GDB
+@chapter Controlling @value{GDBN}
-You can alter many aspects of _GDBN__'s interaction with you by using
-the @code{set} command. For commands controlling how _GDBN__ displays
+You can alter many aspects of @value{GDBN}'s interaction with you by using
+the @code{set} command. For commands controlling how @value{GDBN} displays
data, @pxref{Print Settings, ,Print Settings}; other settings are described here.
@menu
@section Prompt
@cindex prompt
-_GDBN__ indicates its readiness to read a command by printing a string
-called the @dfn{prompt}. This string is normally @samp{(_GDBP__)}. You
+@value{GDBN} indicates its readiness to read a command by printing a string
+called the @dfn{prompt}. This string is normally @samp{(@value{GDBP})}. You
can change the prompt string with the @code{set prompt} command. For
-instance, when debugging _GDBN__ with _GDBN__, it is useful to change
-the prompt in one of the _GDBN__<>s so that you can always tell which
+instance, when debugging @value{GDBN} with @value{GDBN}, it is useful to change
+the prompt in one of the @value{GDBN}s so that you can always tell which
one you are talking to.
@table @code
@item set prompt @var{newprompt}
@kindex set prompt
-Directs _GDBN__ to use @var{newprompt} as its prompt string henceforth.
+Directs @value{GDBN} to use @var{newprompt} as its prompt string henceforth.
@kindex show prompt
@item show prompt
Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
@cindex readline
@cindex command line editing
-_GDBN__ reads its input commands via the @dfn{readline} interface. This
+@value{GDBN} reads its input commands via the @dfn{readline} interface. This
GNU library provides consistent behavior for programs which provide a
command line interface to the user. Advantages are @code{emacs}-style
or @code{vi}-style inline editing of commands, @code{csh}-like history
substitution, and a storage and recall of command history across
debugging sessions.
-You may control the behavior of command line editing in _GDBN__ with the
+You may control the behavior of command line editing in @value{GDBN} with the
command @code{set}.
@table @code
@cindex history file
@kindex set history filename
@item set history filename @var{fname}
-Set the name of the _GDBN__ command history file to @var{fname}. This is
-the file from which _GDBN__ will read an initial command history
+Set the name of the @value{GDBN} command history file to @var{fname}. This is
+the file from which @value{GDBN} will read an initial command history
list or to which it will write this list when it exits. This list is
accessed through history expansion or through the history
command editing characters listed below. This file defaults to the
@cindex history size
@kindex set history size
@item set history size @var{size}
-Set the number of commands which _GDBN__ will keep in its history list.
+Set the number of commands which @value{GDBN} will keep in its history list.
This defaults to the value of the environment variable
@code{HISTSIZE}, or to 256 if this variable is not set.
@end table
@itemx show history save
@itemx show history size
@itemx show history expansion
-These commands display the state of the _GDBN__ history parameters.
+These commands display the state of the @value{GDBN} history parameters.
@code{show history} by itself displays all four states.
@c @end group
@end table
@cindex size of screen
@cindex pauses in output
-Certain commands to _GDBN__ may produce large amounts of information
-output to the screen. To help you read all of it, _GDBN__ pauses and
+Certain commands to @value{GDBN} may produce large amounts of information
+output to the screen. To help you read all of it, @value{GDBN} pauses and
asks you for input at the end of each page of output. Type @key{RET}
-when you want to continue the output. _GDBN__ also uses the screen
+when you want to continue the output. @value{GDBN} also uses the screen
width setting to determine when to wrap lines of output. Depending on
what is being printed, it tries to break the line at a readable place,
rather than simply letting it overflow onto the following line.
-Normally _GDBN__ knows the size of the screen from the termcap data base
+Normally @value{GDBN} knows the size of the screen from the termcap data base
together with the value of the @code{TERM} environment variable and the
@code{stty rows} and @code{stty cols} settings. If this is not correct,
you can override it with the @code{set height} and @code{set
a screen width of @var{cpl} characters. The associated @code{show}
commands display the current settings.
-If you specify a height of zero lines, _GDBN__ will not pause during output
+If you specify a height of zero lines, @value{GDBN} will not pause during output
no matter how long the output is. This is useful if output is to a file
or to an editor buffer.
@end table
@cindex number representation
@cindex entering numbers
-You can always enter numbers in octal, decimal, or hexadecimal in _GDBN__ by
+You can always enter numbers in octal, decimal, or hexadecimal in @value{GDBN} by
the usual conventions: octal numbers begin with @samp{0}, decimal
numbers end with @samp{.}, and hexadecimal numbers begin with @samp{0x}.
Numbers that begin with none of these are, by default, entered in base
@node Messages/Warnings
@section Optional Warnings and Messages
-By default, _GDBN__ is silent about its inner workings. If you are running
+By default, @value{GDBN} is silent about its inner workings. If you are running
on a slow machine, you may want to use the @code{set verbose} command.
-It will make _GDBN__ tell you when it does a lengthy internal operation, so
+It will make @value{GDBN} tell you when it does a lengthy internal operation, so
you will not think it has crashed.
Currently, the messages controlled by @code{set verbose} are those
@table @code
@kindex set verbose
@item set verbose on
-Enables _GDBN__'s output of certain informational messages.
+Enables @value{GDBN}'s output of certain informational messages.
@item set verbose off
-Disables _GDBN__'s output of certain informational messages.
+Disables @value{GDBN}'s output of certain informational messages.
@kindex show verbose
@item show verbose
Displays whether @code{set verbose} is on or off.
@end table
-By default, if _GDBN__ encounters bugs in the symbol table of an object
+By default, if @value{GDBN} encounters bugs in the symbol table of an object
file, it is silent; but if you are debugging a compiler, you may find
this information useful (@pxref{Symbol Errors, ,Errors Reading Symbol Files}).
@table @code
@kindex set complaints
@item set complaints @var{limit}
-Permits _GDBN__ to output @var{limit} complaints about each type of unusual
+Permits @value{GDBN} to output @var{limit} complaints about each type of unusual
symbols before becoming silent about the problem. Set @var{limit} to
zero to suppress all complaints; set it to a large number to prevent
complaints from being suppressed.
@kindex show complaints
@item show complaints
-Displays how many symbol complaints _GDBN__ is permitted to produce.
+Displays how many symbol complaints @value{GDBN} is permitted to produce.
@end table
-By default, _GDBN__ is cautious, and asks what sometimes seems to be a
+By default, @value{GDBN} is cautious, and asks what sometimes seems to be a
lot of stupid questions to confirm certain commands. For example, if
you try to run a program which is already running:
@example
-(_GDBP__) run
+(@value{GDBP}) run
The program being debugged has been started already.
Start it from the beginning? (y or n)
@end example
@cindex reloading symbols
Some systems allow individual object files that make up your program to
be replaced without stopping and restarting your program.
-_if__(_VXWORKS__)
+@ifset VXWORKS
For example, in VxWorks you can simply recompile a defective object file
and keep on running.
-_fi__(_VXWORKS__)
-If you are running on one of these systems, you can allow _GDBN__ to
+@end ifset
+If you are running on one of these systems, you can allow @value{GDBN} to
reload the symbols for automatically relinked modules:
@table @code
Do not replace symbol definitions when re-encountering object files of
the same name. This is the default state; if you are not running on a
system that permits automatically relinking modules, you should leave
-@code{symbol-reloading} off, since otherwise _GDBN__ may discard symbols
+@code{symbol-reloading} off, since otherwise @value{GDBN} may discard symbols
when linking large programs, that may contain several modules (from
different directories or libraries) with the same name.
@chapter Canned Sequences of Commands
Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint
-Command Lists}), _GDBN__ provides two ways to store sequences of commands
+Command Lists}), @value{GDBN} provides two ways to store sequences of commands
for execution as a unit: user-defined commands and command files.
@menu
@section User-Defined Commands
@cindex user-defined command
-A @dfn{user-defined command} is a sequence of _GDBN__ commands to which you
+A @dfn{user-defined command} is a sequence of @value{GDBN} commands to which you
assign a new name as a command. This is done with the @code{define}
command.
Define a command named @var{commandname}. If there is already a command
by that name, you are asked to confirm that you want to redefine it.
-The definition of the command is made up of other _GDBN__ command lines,
+The definition of the command is made up of other @value{GDBN} command lines,
which are given following the @code{define} command. The end of these
commands is marked by a line containing @code{end}.
@item show user
@itemx show user @var{commandname}
@kindex show user
-Display the _GDBN__ commands used to define @var{commandname} (but not its
+Display the @value{GDBN} commands used to define @var{commandname} (but not its
documentation). If no @var{commandname} is given, display the
definitions for all user-defined commands.
@end table
stops execution of the user-defined command.
Commands that would ask for confirmation if used interactively proceed
-without asking when used inside a user-defined command. Many _GDBN__ commands
+without asking when used inside a user-defined command. Many @value{GDBN} commands
that normally print messages to say what they are doing omit the messages
when used in a user-defined command.
@section Command Files
@cindex command files
-A command file for _GDBN__ is a file of lines that are _GDBN__ commands. Comments
+A command file for @value{GDBN} is a file of lines that are @value{GDBN} commands. Comments
(lines starting with @kbd{#}) may also be included. An empty line in a
command file does nothing; it does not mean to repeat the last command, as
it would from the terminal.
@cindex init file
-@cindex @file{_GDBINIT__}
-When you start _GDBN__, it automatically executes commands from its
-@dfn{init files}. These are files named @file{_GDBINIT__}. _GDBN__ reads
+@cindex @file{@value{GDBINIT}}
+When you start @value{GDBN}, it automatically executes commands from its
+@dfn{init files}. These are files named @file{@value{GDBINIT}}. @value{GDBN} reads
the init file (if any) in your home directory and then the init file
(if any) in the current working directory. (The init files are not
executed if you use the @samp{-nx} option; @pxref{Mode Options,
of the command file.
Commands that would ask for confirmation if used interactively proceed
-without asking when used in a command file. Many _GDBN__ commands that
+without asking when used in a command file. Many @value{GDBN} commands that
normally print messages to say what they are doing omit the messages
when called from command files.
@section Commands for Controlled Output
During the execution of a command file or a user-defined command, normal
-_GDBN__ output is suppressed; the only output that appears is what is
+@value{GDBN} output is suppressed; the only output that appears is what is
explicitly printed by the commands in the definition. This section
describes three commands useful for generating exactly the output you
want.
letter.
@end table
-_if__(!_DOSHOST__)
+@ifclear DOSHOST
@node Emacs
-@chapter Using _GDBN__ under GNU Emacs
+@chapter Using @value{GDBN} under GNU Emacs
@cindex emacs
A special interface allows you to use GNU Emacs to view (and
edit) the source files for the program you are debugging with
-_GDBN__.
+@value{GDBN}.
To use this interface, use the command @kbd{M-x gdb} in Emacs. Give the
executable file you want to debug as an argument. This command starts
-_GDBN__ as a subprocess of Emacs, with input and output through a newly
+@value{GDBN} as a subprocess of Emacs, with input and output through a newly
created Emacs buffer.
-Using _GDBN__ under Emacs is just like using _GDBN__ normally except for two
+Using @value{GDBN} under Emacs is just like using @value{GDBN} normally except for two
things:
@itemize @bullet
All ``terminal'' input and output goes through the Emacs buffer.
@end itemize
-This applies both to _GDBN__ commands and their output, and to the input
+This applies both to @value{GDBN} commands and their output, and to the input
and output done by the program you are debugging.
This is useful because it means that you can copy the text of previous
@itemize @bullet
@item
-_GDBN__ displays source code through Emacs.
+@value{GDBN} displays source code through Emacs.
@end itemize
-Each time _GDBN__ displays a stack frame, Emacs automatically finds the
-source file for that frame and puts an arrow (_0__@samp{=>}_1__) at the
+Each time @value{GDBN} displays a stack frame, Emacs automatically finds the
+source file for that frame and puts an arrow (@samp{=>}) at the
left margin of the current line. Emacs uses a separate buffer for
-source display, and splits the window to show both your _GDBN__ session
+source display, and splits the window to show both your @value{GDBN} session
and the source.
-Explicit _GDBN__ @code{list} or search commands still produce output as
+Explicit @value{GDBN} @code{list} or search commands still produce output as
usual, but you probably will have no reason to use them.
@quotation
@emph{Warning:} If the directory where your program resides is not your
current directory, it can be easy to confuse Emacs about the location of
the source files, in which case the auxiliary display buffer will not
-appear to show your source. _GDBN__ can find programs by searching your
-environment's @code{PATH} variable, so the _GDBN__ input and output
+appear to show your source. @value{GDBN} can find programs by searching your
+environment's @code{PATH} variable, so the @value{GDBN} input and output
session will proceed normally; but Emacs does not get enough information
-back from _GDBN__ to locate the source files in this situation. To
-avoid this problem, either start _GDBN__ mode from the directory where
+back from @value{GDBN} to locate the source files in this situation. To
+avoid this problem, either start @value{GDBN} mode from the directory where
your program resides, or specify a full path name when prompted for the
@kbd{M-x gdb} argument.
-A similar confusion can result if you use the _GDBN__ @code{file} command to
+A similar confusion can result if you use the @value{GDBN} @code{file} command to
switch to debugging a program in some other location, from an existing
-_GDBN__ buffer in Emacs.
+@value{GDBN} buffer in Emacs.
@end quotation
By default, @kbd{M-x gdb} calls the program called @file{gdb}. If
-you need to call _GDBN__ by a different name (for example, if you keep
+you need to call @value{GDBN} by a different name (for example, if you keep
several configurations around, with different names) you can set the
Emacs variable @code{gdb-command-name}; for example,
in your @file{.emacs} file) will make Emacs call the program named
``@code{mygdb}'' instead.
-In the _GDBN__ I/O buffer, you can use these special Emacs commands in
+In the @value{GDBN} I/O buffer, you can use these special Emacs commands in
addition to the standard Shell mode commands:
@table @kbd
@item C-h m
-Describe the features of Emacs' _GDBN__ Mode.
+Describe the features of Emacs' @value{GDBN} Mode.
@item M-s
-Execute to another source line, like the _GDBN__ @code{step} command; also
+Execute to another source line, like the @value{GDBN} @code{step} command; also
update the display window to show the current file and location.
@item M-n
Execute to next source line in this function, skipping all function
-calls, like the _GDBN__ @code{next} command. Then update the display window
+calls, like the @value{GDBN} @code{next} command. Then update the display window
to show the current file and location.
@item M-i
-Execute one instruction, like the _GDBN__ @code{stepi} command; update
+Execute one instruction, like the @value{GDBN} @code{stepi} command; update
display window accordingly.
@item M-x gdb-nexti
-Execute to next instruction, using the _GDBN__ @code{nexti} command; update
+Execute to next instruction, using the @value{GDBN} @code{nexti} command; update
display window accordingly.
@item C-c C-f
-Execute until exit from the selected stack frame, like the _GDBN__
+Execute until exit from the selected stack frame, like the @value{GDBN}
@code{finish} command.
@item M-c
-Continue execution of your program, like the _GDBN__ @code{continue}
+Continue execution of your program, like the @value{GDBN} @code{continue}
command.
@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
@item M-u
Go up the number of frames indicated by the numeric argument
(@pxref{Arguments, , Numeric Arguments, emacs, The GNU Emacs Manual}),
-like the _GDBN__ @code{up} command.
+like the @value{GDBN} @code{up} command.
@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
@item M-d
Go down the number of frames indicated by the numeric argument, like the
-_GDBN__ @code{down} command.
+@value{GDBN} @code{down} command.
@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
@item C-x &
Read the number where the cursor is positioned, and insert it at the end
-of the _GDBN__ I/O buffer. For example, if you wish to disassemble code
+of the @value{GDBN} I/O buffer. For example, if you wish to disassemble code
around an address that was displayed earlier, type @kbd{disassemble};
then move the cursor to the address display, and pick up the
argument for @code{disassemble} by typing @kbd{C-x &}.
@end table
In any source file, the Emacs command @kbd{C-x SPC} (@code{gdb-break})
-tells _GDBN__ to set a breakpoint on the source line point is on.
+tells @value{GDBN} to set a breakpoint on the source line point is on.
If you accidentally delete the source-display buffer, an easy way to get
-it back is to type the command @code{f} in the _GDBN__ buffer, to
+it back is to type the command @code{f} in the @value{GDBN} buffer, to
request a frame display; when you run under Emacs, this will recreate
the source buffer if necessary to show you the context of the current
frame.
The source files displayed in Emacs are in ordinary Emacs buffers
which are visiting the source files in the usual way. You can edit
-the files with these buffers if you wish; but keep in mind that _GDBN__
+the files with these buffers if you wish; but keep in mind that @value{GDBN}
communicates with Emacs in terms of line numbers. If you add or
-delete lines from the text, the line numbers that _GDBN__ knows will cease
+delete lines from the text, the line numbers that @value{GDBN} knows will cease
to correspond properly to the code.
@c The following dropped because Epoch is nonstandard. Reactivate
@code{inspect} which performs identically to @code{print} except that
each value is printed in its own window.
@end ignore
-_fi__(!_DOSHOST__)
+@end ifclear
-_if__(_LUCID__)
+@ifset LUCID
@node Energize
-@chapter Using _GDBN__ with Energize
+@chapter Using @value{GDBN} with Energize
@cindex Energize
The Energize Programming System is an integrated development environment
that includes a point-and-click interface to many programming tools.
-When you use _GDBN__ in this environment, you can use the standard
-Energize graphical interface to drive _GDBN__; you can also, if you
-choose, type _GDBN__ commands as usual in a debugging window. Even if
+When you use @value{GDBN} in this environment, you can use the standard
+Energize graphical interface to drive @value{GDBN}; you can also, if you
+choose, type @value{GDBN} commands as usual in a debugging window. Even if
you use the graphical interface, the debugging window (which uses Emacs,
-and resembles the standard Emacs interface to _GDBN__) displays the
+and resembles the standard Emacs interface to @value{GDBN}) displays the
equivalent commands, so that the history of your debugging session is
properly reflected.
-When Energize starts up a _GDBN__ session, it uses one of the
+When Energize starts up a @value{GDBN} session, it uses one of the
command-line options @samp{-energize} or @samp{-cadillac} (``cadillac''
is the name of the communications protocol used by the Energize system).
-This option makes _GDBN__ run as one of the tools in the Energize Tool
+This option makes @value{GDBN} run as one of the tools in the Energize Tool
Set: it sends all output to the Energize kernel, and accept input from
it as well.
See the user manual for the Energize Programming System for
information on how to use the Energize graphical interface and the other
-development tools that Energize integrates with _GDBN__.
+development tools that Energize integrates with @value{GDBN}.
-_fi__(_LUCID__)
+@end ifset
-@node _GDBN__ Bugs
-@chapter Reporting Bugs in _GDBN__
-@cindex Bugs in _GDBN__
-@cindex Reporting Bugs in _GDBN__
+@node GDB Bugs
+@chapter Reporting Bugs in @value{GDBN}
+@cindex Bugs in @value{GDBN}
+@cindex Reporting Bugs in @value{GDBN}
-Your bug reports play an essential role in making _GDBN__ reliable.
+Your bug reports play an essential role in making @value{GDBN} reliable.
Reporting a bug may help you by bringing a solution to your problem, or it
may not. But in any case the principal function of a bug report is to help
-the entire community by making the next version of _GDBN__ work better. Bug
-reports are your contribution to the maintenance of _GDBN__.
+the entire community by making the next version of @value{GDBN} work better. Bug
+reports are your contribution to the maintenance of @value{GDBN}.
In order for a bug report to serve its purpose, you must include the
information that enables us to fix the bug.
@cindex fatal signal
@cindex core dump
If the debugger gets a fatal signal, for any input whatever, that is a
-_GDBN__ bug. Reliable debuggers never crash.
+@value{GDBN} bug. Reliable debuggers never crash.
@item
@cindex error on valid input
-If _GDBN__ produces an error message for valid input, that is a bug.
+If @value{GDBN} produces an error message for valid input, that is a bug.
@item
@cindex Invalid Input
-If _GDBN__ does not produce an error message for invalid input,
+If @value{GDBN} does not produce an error message for invalid input,
that is a bug. However, you should note that your idea of
``invalid input'' might be our idea of ``an extension'' or ``support
for traditional practice''.
@item
If you are an experienced user of debugging tools, your suggestions
-for improvement of _GDBN__ are welcome in any case.
+for improvement of @value{GDBN} are welcome in any case.
@end itemize
@node Bug Reporting
@section How to Report Bugs
@cindex bug reports
-@cindex _GDBN__ bugs, reporting
+@cindex @value{GDBN} bugs, reporting
A number of companies and individuals offer support for GNU products.
-If you obtained _GDBN__ from a support organization, we recommend you
+If you obtained @value{GDBN} from a support organization, we recommend you
contact that organization first.
Contact information for many support companies and individuals is
available in the file @file{etc/SERVICE} in the GNU Emacs distribution.
-In any event, we also recommend that you send bug reports for _GDBN__ to one
+In any event, we also recommend that you send bug reports for @value{GDBN} to one
of these addresses:
@example
@end example
@strong{Do not send bug reports to @samp{info-gdb}, or to
-@samp{help-gdb}, or to any newsgroups.} Most users of _GDBN__ do not want to
+@samp{help-gdb}, or to any newsgroups.} Most users of @value{GDBN} do not want to
receive bug reports. Those that do, have arranged to receive @samp{bug-gdb}.
The mailing list @samp{bug-gdb} has a newsgroup @samp{gnu.gdb.bug} which
@itemize @bullet
@item
-The version of _GDBN__. _GDBN__ announces it if you start with no
+The version of @value{GDBN}. @value{GDBN} announces it if you start with no
arguments; you can also print it at any time using @code{show version}.
Without this, we will not know whether there is any point in looking for
-the bug in the current version of _GDBN__.
+the bug in the current version of @value{GDBN}.
@item
The type of machine you are using, and the operating system name and
version number.
@item
-What compiler (and its version) was used to compile _GDBN__---e.g.
-``_GCC__-2.0''.
+What compiler (and its version) was used to compile @value{GDBN}---e.g.
+``@value{GCC}--2.0''.
@item
What compiler (and its version) was used to compile the program you
-are debugging---e.g. ``_GCC__-2.0''.
+are debugging---e.g. ``@value{GCC}--2.0''.
@item
The command arguments you gave the compiler to compile your example and
A description of what behavior you observe that you believe is
incorrect. For example, ``It gets a fatal signal.''
-Of course, if the bug is that _GDBN__ gets a fatal signal, then we will
+Of course, if the bug is that @value{GDBN} gets a fatal signal, then we will
certainly notice it. But if the bug is incorrect output, we might not
notice unless it is glaringly wrong. We are human, after all. You
might as well not give us a chance to make a mistake.
Even if the problem you experience is a fatal signal, you should still
say so explicitly. Suppose something strange is going on, such as,
-your copy of _GDBN__ is out of synch, or you have encountered a
+your copy of @value{GDBN} is out of synch, or you have encountered a
bug in the C library on your system. (This has happened!) Your copy
might crash and ours would not. If you told us to expect a crash,
then when ours fails to crash, we would know that the bug was not
would not be able to draw any conclusion from our observations.
@item
-If you wish to suggest changes to the _GDBN__ source, send us context
-diffs. If you even discuss something in the _GDBN__ source, refer to
+If you wish to suggest changes to the @value{GDBN} source, send us context
+diffs. If you even discuss something in the @value{GDBN} source, refer to
it by context, not by line number.
The line numbers in our development sources will not match those in your
a patch is all we need. We might see problems with your patch and decide
to fix the problem another way, or we might not understand it at all.
-Sometimes with a program as complicated as _GDBN__ it is very hard to
+Sometimes with a program as complicated as @value{GDBN} it is very hard to
construct an example that will make the program follow a certain path
through the code. If you do not send us the example, we will not be able
to construct one, so we will not be able to verify that the bug is fixed.
@include inc-hist.texi
@end iftex
-_if__(_GENERIC__||!_H8__)
+@ifset NOVEL
@node Renamed Commands
@appendix Renamed Commands
}
@end tex
@c END TEXI2ROFF-KILL
-_fi__(_GENERIC__||!_H8__)
+@end ifset
-_if__(!_PRECONFIGURED__)
+@ifclear PRECONFIGURED
@node Formatting Documentation
@appendix Formatting the Documentation
The GDB 4 release includes an already-formatted reference card, ready
for printing with PostScript or GhostScript, in the @file{gdb}
subdirectory of the main source directory---in
-@file{gdb-_GDB_VN__/gdb/refcard.ps} of the version _GDB_VN__ release.
+@file{gdb-@value{GDBVN}/gdb/refcard.ps} of the version @value{GDBVN} release.
If you can use PostScript or GhostScript with your printer, you can
print the reference card immediately with @file{refcard.ps}.
@code{makeinfo}.
If you have @code{makeinfo} installed, and are in the top level GDB
-source directory (@file{gdb-_GDB_VN__}, in the case of version _GDB_VN__), you can
+source directory (@file{gdb-@value{GDBVN}}, in the case of version @value{GDBVN}), you can
make the Info file by typing:
@example
If you have @TeX{} and a @sc{dvi} printer program installed, you can
typeset and print this manual. First switch to the the @file{gdb}
subdirectory of the main source directory (for example, to
-@file{gdb-_GDB_VN__/gdb}) and then type:
+@file{gdb-@value{GDBVN}/gdb}) and then type:
@example
make gdb.dvi
@c irrelevant in info file; it's as current as the code it lives with.
@quotation
@emph{Warning:} These installation instructions are current as of
-GDB version _GDB_VN__. If you're installing a more recent release
+GDB version @value{GDBVN}. If you're installing a more recent release
of GDB, we may have improved the installation procedures since
printing this manual; see the @file{README} file included in your
release for the most recent instructions.
a single directory, whose name is usually composed by appending the
version number to @samp{gdb}.
-For example, the GDB version _GDB_VN__ distribution is in the @file{gdb-_GDB_VN__}
+For example, the GDB version @value{GDBVN} distribution is in the @file{gdb-@value{GDBVN}}
directory. That directory contains:
@table @code
-@item gdb-_GDB_VN__/configure @r{(and supporting files)}
+@item gdb-@value{GDBVN}/configure @r{(and supporting files)}
script for configuring GDB and all its supporting libraries.
-@item gdb-_GDB_VN__/gdb
+@item gdb-@value{GDBVN}/gdb
the source specific to GDB itself
-@item gdb-_GDB_VN__/bfd
+@item gdb-@value{GDBVN}/bfd
source for the Binary File Descriptor library
-@item gdb-_GDB_VN__/include
+@item gdb-@value{GDBVN}/include
GNU include files
-@item gdb-_GDB_VN__/libiberty
+@item gdb-@value{GDBVN}/libiberty
source for the @samp{-liberty} free software library
-@item gdb-_GDB_VN__/opcodes
+@item gdb-@value{GDBVN}/opcodes
source for the library of opcode tables and disassemblers
-@item gdb-_GDB_VN__/readline
+@item gdb-@value{GDBVN}/readline
source for the GNU command-line interface
-@item gdb-_GDB_VN__/glob
+@item gdb-@value{GDBVN}/glob
source for the GNU filename pattern-matching subroutine
-@item gdb-_GDB_VN__/mmalloc
+@item gdb-@value{GDBVN}/mmalloc
source for the GNU memory-mapped malloc package
@end table
The simplest way to configure and build GDB is to run @code{configure}
from the @file{gdb-@var{version-number}} source directory, which in
-this example is the @file{gdb-_GDB_VN__} directory.
+this example is the @file{gdb-@value{GDBVN}} directory.
First switch to the @file{gdb-@var{version-number}} source directory
if you are not already in it; then run @code{configure}. Pass the
For example:
@example
-cd gdb-_GDB_VN__
+cd gdb-@value{GDBVN}
./configure @var{host}
make
@end example
If you run @code{configure} from a directory that contains source
directories for multiple libraries or programs, such as the
-@file{gdb-_GDB_VN__} source directory for version _GDB_VN__, @code{configure}
+@file{gdb-@value{GDBVN}} source directory for version @value{GDBVN}, @code{configure}
creates configuration files for every directory level underneath (unless
you tell it not to, with the @samp{--norecursion} option).
subordinate directories in the GDB distribution, if you only want to
configure that subdirectory; but be sure to specify a path to it.
-For example, with version _GDB_VN__, type the following to configure only
+For example, with version @value{GDBVN}, type the following to configure only
the @code{bfd} subdirectory:
@example
@group
-cd gdb-_GDB_VN__/bfd
+cd gdb-@value{GDBVN}/bfd
../configure @var{host}
@end group
@end example
-You can install @code{_GDBP__} anywhere; it has no hardwired paths.
+You can install @code{@value{GDBP}} anywhere; it has no hardwired paths.
However, you should make sure that the shell on your path (named by
the @samp{SHELL} environment variable) is publicly readable. Remember
that GDB uses the shell to start your program---some systems refuse to
would be the same as the argument to @samp{--srcdir}, you can leave out
the @samp{--srcdir} option; it will be assumed.)
-For example, with version _GDB_VN__, you can build GDB in a separate
+For example, with version @value{GDBVN}, you can build GDB in a separate
directory for a Sun 4 like this:
@example
@group
-cd gdb-_GDB_VN__
+cd gdb-@value{GDBVN}
mkdir ../gdb-sun4
cd ../gdb-sun4
-../gdb-_GDB_VN__/configure sun4
+../gdb-@value{GDBVN}/configure sun4
make
@end group
@end example
The @code{Makefile} generated by @code{configure} for each source
directory also runs recursively. If you type @code{make} in a source
-directory such as @file{gdb-_GDB_VN__} (or in a separate configured
-directory configured with @samp{--srcdir=@var{path}/gdb-_GDB_VN__}), you
+directory such as @file{gdb-@value{GDBVN}} (or in a separate configured
+directory configured with @samp{--srcdir=@var{path}/gdb-@value{GDBVN}}), you
will build all the required libraries, then build GDB.
When you have multiple hosts or targets configured in separate
@noindent
@code{config.sub} is also distributed in the GDB source
-directory (@file{gdb-_GDB_VN__}, for version _GDB_VN__).
+directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}).
@node configure Options
@section @code{configure} Options
Here is a summary of the @code{configure} options and arguments that
-are most often useful for building _GDBN__. @code{configure} also has
+are most often useful for building @value{GDBN}. @code{configure} also has
several other options not listed here. @inforef{What Configure
Does,,configure.info}, for a full explanation of @code{configure}.
@c FIXME: Would this be more, or less, useful as an xref (ref to printed
@code{configure} accepts other options, for compatibility with
configuring other GNU tools recursively; but these are the only
options that affect GDB or its supporting libraries.
-_fi__(!_PRECONFIGURED__)
+@end ifclear
-_if__(!_AGGLOMERATION__)
+@ifclear AGGLOMERATION
@node Copying
@unnumbered GNU GENERAL PUBLIC LICENSE
@center Version 2, June 1991
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
-_fi__(!_AGGLOMERATION__)
+@end ifclear
@node Index
@unnumbered Index