From 1d7c3357ddfe48ec7b755f8599d48384bdeb6a8e Mon Sep 17 00:00:00 2001 From: Roland Pesch Date: Sat, 27 Mar 1993 01:32:11 +0000 Subject: [PATCH] 1. Update conditional markup: (a) to make H8 configuration come out right (first attempt since conversion to texinfo conditionals); (b) to exploit yesterday's makeinfo bugfix, using conditionals in menus rather than multiple alternative menus. 2. Update H8 text to refer to H8/500 as well as H8/300. 3. Define config file gdb-config.texi as a link in Makefile, based on a DOC_CONFIG variable. --- gdb/doc/Makefile.in | 13 +- gdb/doc/all-config.texi | 42 ++ gdb/doc/gdb-config.texi | 104 ---- gdb/doc/gdb.texinfo | 1016 +++++++-------------------------------- gdb/doc/gdbinv-s.texi | 87 ++-- gdb/doc/h8-config.texi | 50 +- 6 files changed, 307 insertions(+), 1005 deletions(-) create mode 100644 gdb/doc/all-config.texi diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in index 74143b44826..46d528ee8cb 100644 --- a/gdb/doc/Makefile.in +++ b/gdb/doc/Makefile.in @@ -47,6 +47,8 @@ READLINE_DIR = ${gdbdir}/../readline/doc SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS +DOC_CONFIG = all + # Don Knuth's TeX formatter TEX = tex @@ -154,6 +156,15 @@ lrefcard.ps : $(srcdir)/refcard.tex $(srcdir)/lpsrc.sed GDBvn.texi : ${gdbdir}/Makefile.in echo "@set GDBVN `sed <$(srcdir)/../Makefile.in -n 's/VERSION = //p'`" > ./GDBvn.texi +# Choose configuration for GDB manual (normally `all'; normally not tied into +# `configure' script because most users prefer generic version of manual, +# not one for their binary config---which may not be specifically +# defined anyways). +gdb-config.texi: ${DOC_CONFIG}-config.texi + ln -s ${srcdir}/${DOC_CONFIG}-config.texi gdb-config.texi || \ + ln ${srcdir}/${DOC_CONFIG}-config.texi gdb-config.texi || \ + cp ${srcdir}/${DOC_CONFIG}-config.texi gdb-config.texi + # GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear # If your texinfo or makeinfo don't support these, get a new texinfo release # @@ -196,7 +207,7 @@ gdb.info: ${SFILES_DOC} # it out for gdb manual's include files---but only if not configured # in main sourcedir. links2roff: $(SFILES_INCLUDED) - if [ ! -f gdb-config.texi ]; then \ + if [ ! -f gdb.texinfo ]; then \ ln -s $(SFILES_INCLUDED) . || \ ln $(SFILES_INCLUDED) . || \ cp $(SFILES_INCLUDED) . ; \ diff --git a/gdb/doc/all-config.texi b/gdb/doc/all-config.texi new file mode 100644 index 00000000000..83c9ba135e3 --- /dev/null +++ b/gdb/doc/all-config.texi @@ -0,0 +1,42 @@ +@c GDB version number is recorded in the variable GDBVN +@include GDBvn.texi +@c +@set AGGLOMERATION +@clear AMDxxixK +@set BARETARGET +@set CONLY +@set DOSHOST +@clear FSFDOC +@set Hviii +@set HviiiEXCLUSIVE +@clear Icmlx +@clear NOVEL +@clear POSIX +@set PRECONFIGURED +@clear REMOTESTUB +@set SIMS +@clear SERIAL +@clear SPARC +@clear STmm +@clear VXWORKS +@clear ZviiiK +@c ---------------------------------------------------------------------- +@c STRINGS: +@c +@c Name of GDB program. Used also for (gdb) prompt string. +@set GDBP gdb +@c +@c Name of GDB product. Used in running text. +@set GDBN GDB +@c +@c Name of GDB initialization file. +@set GDBINIT .gdbinit +@c +@c Name of target. +@set TARGET Hitachi H/300 and H/500 +@c +@c Name of GCC product +@set NGCC GCC +@c +@c Name of GCC program +@set GCC gcc diff --git a/gdb/doc/gdb-config.texi b/gdb/doc/gdb-config.texi index fab8a62ad9d..e69de29bb2d 100644 --- a/gdb/doc/gdb-config.texi +++ b/gdb/doc/gdb-config.texi @@ -1,104 +0,0 @@ -@c GDB MANUAL configuration file. -@c Copyright (c) 1993 Free Software Foundation, Inc. -@c -@c NOTE: While the GDB manual is configurable (by changing these -@c switches), its configuration is ***NOT*** automatically tied in to -@c source configuration---because the authors expect that, save in -@c unusual cases, the most inclusive form of the manual is appropriate -@c no matter how the program itself is configured. -@c -@c The only automatically-varying variable is the GDB version number, -@c which the Makefile rewrites based on the VERSION variable from -@c `../Makefile.in'. -@c -@c GDB version number is recorded in the variable GDBVN -@include GDBvn.texi -@c -@c ---------------------------------------------------------------------- -@c PLATFORM FLAGS: -@set GENERIC -@c -@c Hitachi H8/300 target: -@set Hviii -@c Hitachi H8/300 target ONLY: -@clear HviiiEXCLUSIVE -@c -@c SPARC target: -@set SPARC -@c -@c AMD 29000 target: -@set AMDxxixK -@c -@c Intel 960 target: -@set Icmlx -@c -@c Tandem ST2000 (phone switch) target: -@set STmm -@c -@c Zilog 8000 target: -@set ZviiiK -@c -@c Lucid "Energize" environment: -@clear LUCID -@c -@c Wind River Systems VxWorks environment: -@set VXWORKS -@c -@c ---------------------------------------------------------------------- -@c DOC FEATURE FLAGS: -@c -@c Include change-from-old? -@set NOVEL -@c -@c Bare-board target? -@clear BARETARGET -@c -@c Restrict languages discussed to C? -@clear CONLY -@c -@c Specifically for host machine running DOS? -@clear DOSHOST -@c -@c Talk about CPU simulator targets? -@set SIMS -@c -@c Is manual stand-alone, or part of an agglomeration, with overall GPL? -@clear AGGLOMERATION -@c -@c Remote serial line settings of interest? -@set SERIAL -@c -@c Discuss features requiring Posix or similar OS environment? -@set POSIX -@c -@c Discuss remote serial debugging stub? -@set REMOTESTUB -@c -@c Refrain from discussing how to configure sw and format doc? -@clear PRECONFIGURED -@c -@c Refrain from referring to unfree publications? -@set FSFDOC -@c -@c ---------------------------------------------------------------------- -@c STRINGS: -@c -@c Name of GDB program. Used also for (gdb) prompt string. -@set GDBP gdb -@c -@c Name of GDB product. Used in running text. -@set GDBN GDB -@c -@c Name of GDB initialization file. -@set GDBINIT .gdbinit -@c -@c Name of host. Should not be used in generic configs, but generic -@c value may catch some flubs. -@set HOST machine specific -@c -@c Name of GCC product -@set NGCC GCC -@c -@c Name of GCC program -@set GCC gcc - diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 31fc0791650..ae576b3a759 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -3,7 +3,7 @@ @c @c %**start of header @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. +@c of @set vars. However, you can override filename with makeinfo -o. @setfilename gdb.info @c @include gdb-config.texi @@ -12,13 +12,13 @@ @settitle Debugging with @value{GDBN} @end ifset @ifclear GENERIC -@settitle Debugging with @value{GDBN} (@value{HOST}) +@settitle Debugging with @value{GDBN} (@value{TARGET}) @end ifclear @setchapternewpage odd @c %**end of header @iftex -@c @smallbook +@smallbook @c @cropmarks @end iftex @@ -108,7 +108,7 @@ instead of in the original English. @title Debugging with @value{GDBN} @subtitle The GNU Source-Level Debugger @ifclear GENERIC -@subtitle on @value{HOST} Systems +@subtitle on @value{TARGET} Systems @end ifclear @sp 1 @c !!set edition, date, version @@ -156,10 +156,6 @@ This file describes @value{GDBN}, the GNU symbolic debugger. @c !!set edition, date, version This is Edition 4.07, January 1993, 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 @value{GDBN} @ifset NOVEL @@ -179,574 +175,32 @@ This is Edition 4.07, January 1993, for GDB Version @value{GDBVN}. * Languages:: Using @value{GDBN} with different languages @end ifclear @ifset CONLY -* C:: C and C++ -@end ifset -* Symbols:: Examining the symbol table -* Altering:: Altering execution -* GDB Files:: @value{GDBN} 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 does not 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} 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 +* C:: C language support @end ifset +@c remnant makeinfo bug, blank line needed after two end-ifs? -@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} 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} 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} 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} 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} 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 -* GDB Files:: @value{GDBN} 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 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} 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} 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} 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} 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} 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} 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} +@ifclear PRECONFIGURED * 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} 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} 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 +@ifclear AGGLOMERATION * 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} 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 @@ -833,10 +287,12 @@ stability, and capabilities of the entire debugger. Richard Stallman, assisted at various times by Pete TerMaat, Chris Hanson, and Richard Mlynarik, handled releases through 2.8. +@ifclear CONLY Michael Tiemann is the author of most of the GNU C++ support in GDB, with significant additional contributions from Per Bothner. James Clark wrote the GNU C++ demangler. Early work on C++ was by Peter TerMaat (who also did much general update work leading to release 3.0). +@end ifclear GDB 4 uses the BFD subroutine library to examine multiple object-file formats; BFD was a joint project of David V. @@ -876,8 +332,13 @@ Andrew Beers of SUNY Buffalo wrote the language-switching code and the Modula-2 support, and contributed the Languages chapter of this manual. -Fred Fish wrote most of the support for Unix System Vr4, and enhanced -the command-completion support to cover C++ overloaded symbols. +Fred Fish wrote most of the support for Unix System Vr4. +@ifclear CONLY +He also enhanced the command-completion support to cover C++ overloaded +symbols. +@end ifclear + +Hitachi America, Ltd. sponsored the support for the H8/300 and H8/500. @ifset NOVEL @node New Features @@ -1243,8 +704,6 @@ 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 GDB:: How to start @value{GDBN} * Quitting GDB:: How to quit @value{GDBN} @@ -1252,30 +711,14 @@ or @kbd{C-d} to exit.) * Shell Commands:: How to use shell commands inside @value{GDBN} @end ifclear @end menu -@end ignore - -@ifclear BARETARGET -@menu -* Invoking GDB:: How to start @value{GDBN} -* Quitting GDB:: How to quit @value{GDBN} -* Shell Commands:: How to use shell commands inside @value{GDBN} -@end menu -@end ifclear - -@ifset BARETARGET -@menu -* Invoking GDB:: How to start @value{GDBN} -* Quitting GDB:: How to quit @value{GDBN} -@end menu -@end ifset @node Invoking GDB @section Invoking @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,,@value{GDBN} and the Hitachi H8/300}. +remote debugger attached to a Hitachi H8/300 or H8/500 board, see @ref{Hitachi +H8 Remote,,@value{GDBN} and the Hitachi H8/300 and H8/500}. @end ifset Invoke @value{GDBN} by running the program @code{@value{GDBP}}. Once started, @@ -1343,8 +786,6 @@ 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 @ifclear GENERIC @ifset REMOTESTUB @@ -1364,53 +805,17 @@ in sequential order. The order makes a difference when the * ST2000 Remote:: @value{GDBN} with a Tandem ST2000 @end ifset @ifset Hviii -* Hitachi H8/300 Remote:: @value{GDBN} and the Hitachi H8/300 +* Hitachi H8 Remote:: @value{GDBN} and the Hitachi H8/300 and H8/500 @end ifset @ifset SIMS * Simulator:: Simulated CPU target @end ifset @end ifclear -* File Options:: Choosing files -* Mode Options:: Choosing modes -@end menu -@end ignore - -@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 remnant makeinfo bug requires this blank line after *two* end-ifblahs: -@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 -* Simulator:: Simulated CPU target * 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 @@ -1449,8 +854,13 @@ Read symbol table from file @var{file}. @item -exec=@var{file} @itemx -e @var{file} Use file @var{file} as the executable file to execute when +@ifset BARETARGET +appropriate. +@end ifset +@ifclear BARETARGET appropriate, and for examining pure data in conjunction with a core dump. +@end ifclear @item -se=@var{file} Read symbol table from file @var{file} and use it as the executable @@ -1485,9 +895,10 @@ 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 @value{GDBN} is run. -It holds an exact image of the internal @value{GDBN} symbol table. It cannot be -shared across multiple host platforms. +@c FIXME! Really host, not target? +The @file{.syms} file is specific to the host machine where @value{GDBN} +is run. It holds an exact image of the internal @value{GDBN} symbol +table. It cannot be shared across multiple host platforms. @end ifclear @item -r @@ -1560,6 +971,7 @@ as a client in the Energize environment. Avoid this option when you run @value{GDBN} with Energize} for more discussion of using @value{GDBN} with Energize. @end ifset +@ifclear DOSHOST @item -fullname @itemx -f Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells @value{GDBN} @@ -1570,6 +982,7 @@ like two @samp{\032} characters, followed by the file name, line number and character position separated by colons, and a newline. The Emacs-to-@value{GDBN} interface program uses the two @samp{\032} characters as a signal to display the source code for the frame. +@end ifclear @ifset SERIAL @item -b @var{bps} @@ -1778,6 +1191,7 @@ 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 @value{GDBN} commands. +@ifclear CONLY 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 (multiple definitions of the same function, distinguished by argument @@ -1811,6 +1225,7 @@ place: 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. +@end ifclear @node Help @@ -1943,32 +1358,17 @@ Display the GNU ``NO WARRANTY'' statement. @chapter Running Programs Under @value{GDBN} When you run a program under @value{GDBN}, you must first generate -debugging information when you compile it. You may start it with its -arguments, if any, in an environment of your choice. You may redirect -your program's input and output, debug an already running process, or -kill a child process. - -@ignore -@c pre-unfolding: -@menu -* Compilation:: Compiling for debugging -* Starting:: Starting your program +debugging information when you compile it. @ifclear BARETARGET -* 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 +You may start it with its arguments, if any, in an environment of your +choice. You may redirect your program's input and output, debug an +already running process, or kill a child process. @end ifclear -@end menu -@end ignore -@ifclear BARETARGET @menu * Compilation:: Compiling for debugging * Starting:: Starting your program +@ifclear BARETARGET * Arguments:: Your program's arguments * Environment:: Your program's environment * Working Directory:: Your program's working directory @@ -1976,15 +1376,8 @@ kill a child process. * 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 @@ -2306,12 +1699,11 @@ for @value{GDBN} still comes from your terminal. @table @code @item attach @var{process-id} -This command -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} -shell command. +This command 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} shell command. @code{attach} will not repeat if you press @key{RET} a second time after executing the command. @@ -2429,7 +1821,11 @@ program before it terminates; or so that, if your program runs into trouble, you can investigate and find out why. 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} +as +@ifclear BARETARGET +a signal, +@end ifclear +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 @value{GDBN} provide ample @@ -2440,11 +1836,13 @@ request this information at any time. @item info program @kindex info program Display information about the status of your program: whether it is -running or not, what process it is, and why it stopped. +running or not, +@ifclear BARETARGET +what process it is, +@end ifclear +and why it stopped. @end table -@ignore -@c original menu @menu @ifclear CONLY * Breakpoints:: Breakpoints, watchpoints, and exceptions @@ -2452,56 +1850,15 @@ running or not, what process it is, and why it stopped. @ifset CONLY * Breakpoints:: Breakpoints and watchpoints @end ifset -* Continuing and Stepping:: Resuming execution -@ifset POSIX -* Signals:: Signals -@end ifset -@end menu -@end ignore +@c Remnant makeinfo bug requires blank line after *successful* end-if in menu: -@c !CONLY && POSIX -@ifclear CONLY -@ifset POSIX -@menu -* Breakpoints:: Breakpoints, watchpoints, and exceptions * 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 -* Continuing and Stepping:: Resuming execution * Signals:: Signals -@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 makeinfo node-defaulting requires adjacency of @node and sectioning cmds @c ...hence distribute @node Breakpoints over two possible @if expansions. @c @ifclear CONLY @@ -2554,13 +1911,19 @@ no effect on your program until you enable it again. @menu * Set Breaks:: Setting breakpoints * Set Watchpoints:: Setting watchpoints +@ifclear CONLY * Exception Handling:: Breakpoints and exceptions +@end ifclear * Delete Breaks:: Deleting breakpoints * Disabling:: Disabling breakpoints * Conditions:: Break conditions * Break Commands:: Breakpoint command lists +@ifclear CONLY * Breakpoint Menus:: Breakpoint menus +@end ifclear +@ifclear BARETARGET * Error in Breakpoints:: ``Cannot insert breakpoints'' +@end ifclear @end menu @node Set Breaks @@ -2776,6 +2139,7 @@ This command prints a list of watchpoints and breakpoints; it is the same as @code{info break}. @end table +@ifclear CONLY @node Exception Handling @subsection Breakpoints and exceptions @cindex exception handlers @@ -2835,18 +2199,14 @@ which has the following ANSI C interface: @noindent To make the debugger catch all exceptions before any stack unwinding takes place, set a breakpoint on @code{__raise_exception} -@ifclear CONLY (@pxref{Breakpoints, ,Breakpoints; watchpoints; and exceptions}). -@end ifclear -@ifset CONLY -(@pxref{Breakpoints, ,Breakpoints and watchpoints}). -@end ifset With a conditional breakpoint (@pxref{Conditions, ,Break conditions}) that depends on the value of @var{id}, you can stop your program when a specific exception is raised. You can use multiple conditional breakpoints to stop your program when any of a number of exceptions are raised. +@end ifclear @node Delete Breaks @subsection Deleting breakpoints @@ -3185,6 +2545,7 @@ 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. +@ifclear CONLY @node Breakpoint Menus @subsection Breakpoint menus @cindex overloading @@ -3227,7 +2588,9 @@ Multiple breakpoints were set. Use the "delete" command to delete unwanted breakpoints. (@value{GDBP}) @end example +@end ifclear +@ifclear BARETARGET @node Error in Breakpoints @subsection ``Cannot insert breakpoints'' @@ -3260,6 +2623,7 @@ Relink your program so that the text segment is nonsharable, using the linker option @samp{-N}. The operating system limitation may not apply to nonsharable executables. @end enumerate +@end ifclear @node Continuing and Stepping @section Continuing and stepping @@ -3326,8 +2690,11 @@ execution will proceed until control reaches another function. @item step @var{count} Continue running as in @code{step}, but do so @var{count} times. If a -breakpoint is reached or a signal not related to stepping occurs before -@var{count} steps, stepping stops right away. +breakpoint is reached, +@ifclear BARETARGET +or a signal not related to stepping occurs before @var{count} steps, +@end ifclear +stepping stops right away. @item next @r{[}@var{count}@r{]} @kindex next @@ -3797,6 +3164,7 @@ Print the local variables of the selected frame, each on a separate line. These are all variables (declared either static or automatic) accessible at the point of execution of the selected frame. +@ifclear CONLY @item info catch @kindex info catch @cindex catch exceptions @@ -3806,6 +3174,7 @@ current stack frame at the current point of execution. To see other exception handlers, visit the associated frame (using the @code{up}, @code{down}, or @code{frame} commands); then type @code{info catch}. @xref{Exception Handling, ,Breakpoints and exceptions}. +@end ifclear @end table @node Source @@ -3825,8 +3194,6 @@ Emacs facilities to view source; @pxref{Emacs, ,Using @value{GDBN} under GNU Emacs}. @end ifclear -@ignore -@c pre-unfolded menu @menu * List:: Printing source lines @ifclear DOSHOST @@ -3835,24 +3202,6 @@ Emacs}. * 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 @@ -4203,29 +3552,13 @@ It examines data in memory at a specified address and prints it in a specified format. @xref{Memory, ,Examining memory}. If you are interested in information about types, or about how the fields -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 +of a struct +@ifclear CONLY +or class @end ifclear -@end menu -@end ignore +are declared, use the @code{ptype @var{exp}} +command rather than @code{print}. @xref{Symbols, ,Examining the Symbol Table}. -@ifclear HviiiEXCLUSIVE @menu * Expressions:: Expressions * Variables:: Program variables @@ -4237,24 +3570,10 @@ command rather than @code{print}. @xref{Symbols, ,Examining the Symbol Table}. * Value History:: Value history * Convenience Vars:: Convenience variables * Registers:: Registers +@ifclear HviiiEXCLUSIVE * Floating Point Hardware:: Floating point hardware -@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 @@ -4902,6 +4221,7 @@ symbolic address. @end table +@ifclear CONLY @noindent These settings are of interest when debugging C++ programs: @@ -4984,6 +4304,7 @@ Do not pretty print C++ virtual function tables. @kindex show print vtbl Show whether C++ virtual function tables are pretty printed, or not. @end table +@end ifclear @node Value History @section Value history @@ -5260,6 +4581,7 @@ processors. @section Floating point hardware @cindex floating point +@c FIXME! Really host, not target? Depending on the host machine architecture, @value{GDBN} may be able to give you more information about the status of the floating point hardware. @@ -6003,7 +5325,11 @@ that is not itself an array. 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 -inside a @code{struct} or @code{class} will also be printed. +inside a @code{struct} +@ifclear CONLY +or @code{class} +@end ifclear +will also be printed. Otherwise, it will appear as @samp{@{...@}}. The @code{@@} operator aids in the debugging of dynamic arrays, formed @@ -6702,43 +6028,26 @@ 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 +locations, @ifclear BARETARGET -* Signaling:: Giving your program a signal +give your program a signal, restart it @end ifclear -* Returning:: Returning from a function -* Calling:: Calling your program's functions -* Patching:: Patching your program -@end menu -@end ignore +@ifset BARETARGET +restart your program +@end ifset +at a different address, or even return prematurely from a function to +its caller. -@ifclear BARETARGET @menu * Assignment:: Assignment to variables * Jumping:: Continuing at a different address +@ifclear BARETARGET * 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 @@ -6934,10 +6243,16 @@ the value history, if it is not void. @section Patching programs @cindex patching binaries @cindex writing into executables +@ifclear BARETARGET @cindex writing into corefiles +@end ifclear By default, @value{GDBN} opens the file containing your program's executable -code (or the corefile) read-only. This prevents accidental alterations +code +@ifclear BARETARGET +(or the corefile) +@end ifclear +read-only. This prevents accidental alterations to machine code; but it also prevents you from intentionally patching your program's binary. @@ -6957,9 +6272,13 @@ and core files for both reading and writing; if you specify @samp{set write 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 -changing @code{set write}, for your new setting to take effect. +If you have already loaded a file, you must load it again (using the +@code{exec-file} +@ifclear BARETARGET +or @code{core-file} +@end ifclear +command) after changing @code{set write}, for your new setting to take +effect. @item show write @kindex show write @@ -7170,13 +6489,13 @@ download @var{filename} to the 960 as well as adding its symbols in @end ifset @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,,@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 @value{GDBN} on your host (like the -@code{file} command). +@cindex download to H8/300 or H8/500 +@cindex H8/300 or H8/500 download +When you select remote debugging to a Hitachi H8/300 or H8/500 board +(@pxref{Hitachi H8 Remote,,@value{GDBN} and the Hitachi H8/300 and H8/500}), +the @code{load} command downloads your program to the Hitachi board and also +opens it as the current executable target for @value{GDBN} on your host +(like the @code{file} command). @end ifset @code{load} will not repeat if you press @key{RET} again after using it. @@ -7210,11 +6529,17 @@ table information for @var{filename}. @kindex info files @kindex 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 @value{GDBN}, and the files from which symbols were loaded. The command -@code{help targets} lists all possible targets rather than current -ones. +the current target (@pxref{Targets, ,Specifying a Debugging Target}), +including the +@ifclear BARETARGET +names of the executable and core dump files +@end ifclear +@ifset BARETARGET +name of the executable file +@end ifset +currently in 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 @@ -7327,13 +6652,21 @@ debugging it, you can debug @code{@value{GDBP}} with itself, breakpoint on examine @code{*bufp} to see the symbol. @item stub type has NULL name -@value{GDBN} could not find the full definition for a struct or class. +@value{GDBN} could not find the full definition for +@ifclear CONLY +a struct or class. +@end ifclear +@ifset CONLY +a struct. +@end ifset +@ifclear CONLY @item const/volatile indicator missing (ok if using g++ v1.x), got@dots{} The symbol information for a C++ member function is missing some information that recent versions of the compiler should have output for it. +@end ifclear @item info mismatch between compiler and debugger @@ -7418,14 +6751,19 @@ already-running process}). @table @code @item target @var{type} @var{parameters} -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. +Connects the @value{GDBN} host environment to a target +@ifset BARETARGET +machine. +@end ifset +@ifclear BARETARGET +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. Further @var{parameters} are interpreted by the target protocol, but typically include things like device names or host names to connect with, process numbers, and baud rates. +@end ifclear The @code{target} command will not repeat if you press @key{RET} again after executing the command. @@ -7450,10 +6788,12 @@ configuration): An executable file. @samp{target exec @var{program}} is the same as @samp{exec-file @var{program}}. +@ifclear BARETARGET @item target core @var{filename} @kindex target core A core dump file. @samp{target core @var{filename}} is the same as @samp{core-file @var{filename}}. +@end ifclear @ifset REMOTESTUB @item target remote @var{dev} @@ -7489,10 +6829,10 @@ name of the program to be debugged, as it appears to DOS on the PC. @ifset Hviii @item target hms @kindex target hms -A Hitachi H8/300 board, attached via serial line to your host. Use +A Hitachi H8/300 or H8/500 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,,@value{GDBN} and the Hitachi H8/300}. +line and the communications speed used. @xref{Hitachi H8 +Remote,,@value{GDBN} and the Hitachi H8/300 and H8/500}. @end ifset @ifset Icmlx @@ -7551,8 +6891,6 @@ configuration of GDB; use @code{help targets} to list them. @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 @@ -7571,28 +6909,12 @@ configuration of GDB; use @code{help targets} to list them. * ST2000 Remote:: @value{GDBN} with a Tandem ST2000 @end ifset @ifset Hviii -* Hitachi H8/300 Remote:: @value{GDBN} and the Hitachi H8/300 +* Hitachi H8 Remote:: @value{GDBN} and the Hitachi H8/300 and H8/500 @end ifset @ifset SIMS * Simulator:: Simulated CPU target @end ifset @end menu -@end ignore - -@c Unfolded menus: -@c add as configs require, while unfolding remains necessary. -@c -@c All target details: -@menu -* Remote Serial:: @value{GDBN} remote serial protocol -* i960-Nindy Remote:: @value{GDBN} with a remote i960 (Nindy) -* UDI29K Remote:: @value{GDBN} and the UDI protocol for AMD29K -* 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 -* Simulator:: Simulated CPUs -@end menu @include gdbinv-s.texi @end ifset @@ -8009,14 +7331,15 @@ command. Whenever you run the command @samp{foo}, if the user-defined command @samp{hook-foo} exists, it is executed (with no arguments) before that command. -In addition, a pseudo-command, @samp{stop} exists. Hooking this command -will cause your hook to be executed every time execution stops in the -inferior program, before breakpoint commands are run, displays are -printed, or the stack frame is printed. +In addition, a pseudo-command, @samp{stop} exists. Defining +(@samp{hook-stop}) makes the associated commands execute every time +execution stops in your program: before breakpoint commands are run, +displays are printed, or the stack frame is printed. -For example, to cause @code{SIGALRM} signals to be ignored while -single-stepping, but cause them to be resumed during normal execution, -you could do: +@ifclear BARETARGET +For example, to ignore @code{SIGALRM} signals while +single-stepping, but treat them normally during normal execution, +you could define: @example define hook-stop @@ -8031,12 +7354,16 @@ define hook-continue handle SIGLARM pass end @end example +@end ifclear -Any single-word command in GDB can be hooked. Aliases for other commands -cannot be hooked (you should hook the basic command name, e.g. @code{backtrace} -rather than @code{bt}). If an error occurs during the execution of your -hook, execution of GDB commands stops and you are returned to the GDB -prompt (before the command that you actually typed had a chance to run). +You can define a hook for any single-word command in @value{GDBN}, but +not for command aliases; you should define a hook for the basic command +name, e.g. @code{backtrace} rather than @code{bt}. +@c FIXME! So how does Joe User discover whether a command is an alias +@c or not? +If an error occurs during the execution of your hook, execution of +@value{GDBN} commands stops and @value{GDBN} issues a prompt +(before the command that you actually typed had a chance to run). If you try to define a hook which does not match any known command, you will get a warning from the @code{define} command. @@ -8380,7 +7707,8 @@ If you are not sure whether you have found a bug, here are some guidelines: @itemize @bullet @item @cindex fatal signal -@cindex core dump +@cindex debugger crash +@cindex crash of debugger If the debugger gets a fatal signal, for any input whatever, that is a @value{GDBN} bug. Reliable debuggers never crash. diff --git a/gdb/doc/gdbinv-s.texi b/gdb/doc/gdbinv-s.texi index d220a947ef8..e3c625abfea 100644 --- a/gdb/doc/gdbinv-s.texi +++ b/gdb/doc/gdbinv-s.texi @@ -837,19 +837,19 @@ the time of attachment. @end ifset @ifset Hviii -@node Hitachi H8/300 Remote -@subsection @value{GDBN} and the Hitachi H8/300 -@value{GDBN} needs to know these things to talk to your H8/300: +@node Hitachi H8 Remote +@subsection @value{GDBN} and the Hitachi H8/300 and H8/500 +@value{GDBN} needs to know these things to talk to your H8/300 or H8/500: @enumerate @item that you want to use @samp{target hms}, the remote debugging -interface for the H8/300 (this is the default when -GDB is configured specifically for the H8/300); +interface for the H8/300 and H8/500 (this is the default when +GDB is configured specifically for the H8/300 or H8/500); @item -what serial device connects your host to your H8/300 (the first serial -device available on your host is the default); +what serial device connects your host to your Hitachi board (the first +serial device available on your host is the default); @ignore @c this is only for Unix hosts, not currently of interest. @@ -858,34 +858,34 @@ what speed to use over the serial device. @end ignore @end enumerate -@kindex device -@cindex serial device for H8/300 @ignore @c only for Unix hosts -Use the special @code{gdb83} command @samp{device @var{port}} if you +@kindex device +@cindex serial device, H8/300 or H8/500 +Use the special @code{@value{GDBP}} command @samp{device @var{port}} if you need to explicitly set the serial device. The default @var{port} is the first available port on your host. This is only necessary on Unix hosts, where it is typically something like @file{/dev/ttya}. @kindex speed -@cindex serial line speed for H8/300 -@code{gdb83} has another special command to set the communications speed -for the H8/300: @samp{speed @var{bps}}. This command also is only used -from Unix hosts; on DOS hosts, set the line speed as usual from outside -GDB with the DOS @kbd{mode} command (for instance, @w{@samp{mode +@cindex serial line speed, H8/300 or H8/500 +@code{@value{GDBP}} has another special command to set the communications +speed: @samp{speed @var{bps}}. This command also is only used from Unix +hosts; on DOS hosts, set the line speed as usual from outside GDB with +the DOS @kbd{mode} command (for instance, @w{@samp{mode com2:9600,n,8,1,p}} for a 9600 bps connection). @end ignore @value{GDBN} depends on an auxiliary terminate-and-stay-resident program -called @code{asynctsr} to communicate with the H8/300 development board +called @code{asynctsr} to communicate with the development board through a PC serial port. You must also use the DOS @code{mode} command to set up the serial port on the DOS side. The following sample session illustrates the steps needed to start a -program under @value{GDBN} control on your H8/300. The example uses a sample +program under @value{GDBN} control on an H8/300. The example uses a sample H8/300 program called @file{t.x}. -First hook up your H8/300 development board. In this example, we use a +First hook up your development board. In this example, we use a board attached to serial port @code{COM2}; if you use a different serial port, substitute its name in the argument of the @code{mode} command. When you call @code{asynctsr}, the auxiliary comms program used by the @@ -907,21 +907,22 @@ COM2: 9600, n, 8, 1, p @emph{Warning:} We have noticed a bug in PC-NFS that conflicts with @code{asynctsr}. If you also run PC-NFS on your DOS host, you may need to disable it, or even boot without it, to use @code{asynctsr} to control -your H8/300 board. +your development board. @end quotation -Now that serial communications are set up, and the H8/300 is connected, -you can start up @value{GDBN}. Call @code{@value{GDBP}} with the name of your -program as the argument. @code{@value{GDBP}} prompts you, as usual, with the -prompt @samp{(@value{GDBP})}. Use two special commands to begin your debugging -session: @samp{target hms} to specify cross-debugging to the Hitachi board, -and the @code{load} command to download your program to the board. -@code{load} displays the names of the -program's sections, and a @samp{*} for each 2K of data downloaded. (If -you want to refresh @value{GDBN} data on symbols or on the executable file -without downloading, use the @value{GDBN} commands @code{file} or -@code{symbol-file}. These commands, and @code{load} itself, are -described in @ref{Files,,Commands to specify files}.) +@kindex target hms +Now that serial communications are set up, and the development board is +connected, you can start up @value{GDBN}. Call @code{@value{GDBP}} with +the name of your program as the argument. @code{@value{GDBP}} prompts +you, as usual, with the prompt @samp{(@value{GDBP})}. Use two special +commands to begin your debugging session: @samp{target hms} to specify +cross-debugging to the Hitachi board, and the @code{load} command to +download your program to the board. @code{load} displays the names of +the program's sections, and a @samp{*} for each 2K of data downloaded. +(If you want to refresh @value{GDBN} data on symbols or on the +executable file without downloading, use the @value{GDBN} commands +@code{file} or @code{symbol-file}. These commands, and @code{load} +itself, are described in @ref{Files,,Commands to specify files}.) @smallexample (eg-C:\H8300\TEST) @value{GDBP} t.x @@ -947,14 +948,14 @@ resumes execution after stopping at a breakpoint. You can use the @code{help} command at any time to find out more about @value{GDBN} commands. Remember, however, that @emph{operating system} facilities aren't -available on your H8/300; for example, if your program hangs, you can't -send an interrupt---but you can press the @sc{reset} switch! +available on your development board; for example, if your program hangs, +you can't send an interrupt---but you can press the @sc{reset} switch! -Use the @sc{reset} button on the H8/300 board +Use the @sc{reset} button on the development board @itemize @bullet @item to interrupt your program (don't use @kbd{ctl-C} on the DOS host---it has -no way to pass an interrupt signal to the H8/300); and +no way to pass an interrupt signal to the development board); and @item to return to the @value{GDBN} command prompt after your program finishes @@ -963,7 +964,7 @@ to detect program completion. @end itemize In either case, @value{GDBN} will see the effect of a @sc{reset} on the -H8/300 board as a ``normal exit'' of your program. +development board as a ``normal exit'' of your program. @end ifset @ifset SIMS @@ -973,22 +974,22 @@ H8/300 board as a ``normal exit'' of your program. @ifset GENERIC @cindex simulator @cindex simulator, Z8000 -@cindex simulator, H8/300 +@cindex simulator, H8/300 or H8/500 @cindex Z8000 simulator -@cindex H8/300 simulator +@cindex H8/300 or H8/500 simulator @cindex CPU simulator For some configurations, @value{GDBN} includes a CPU simulator that you can use instead of a hardware CPU to debug your programs. Currently, a simulator is available when @value{GDBN} is configured to debug Zilog -Z8000 or Hitachi H8/300 targets. +Z8000 or Hitachi H8/300 or H8/500 targets. @end ifset @ifclear GENERIC @ifset Hviii -@cindex simulator, H8/300 -@cindex Hitachi H8/300 simulator -When configured for debugging Hitachi H8/300 targets, @value{GDBN} includes -an H8/300 CPU simulator. +@cindex simulator, H8/300 or H8/500 +@cindex Hitachi H8/300 or H8/500 simulator +When configured for debugging Hitachi H8/300 or H8/500 targets, +@value{GDBN} includes an H8/300 or H8/500 CPU simulator. @end ifset @ifset ZviiiK diff --git a/gdb/doc/h8-config.texi b/gdb/doc/h8-config.texi index 05728b05f2c..83c9ba135e3 100644 --- a/gdb/doc/h8-config.texi +++ b/gdb/doc/h8-config.texi @@ -1,18 +1,42 @@ -@set Hviii -@set HviiiEXCLUSIVE -@clear NOVEL -@set BARETARGET -@set CONLY -@set DOSHOST -@set SIMS -@set AGGLOMERATION -@clear SERIAL -@clear VXWORKS -@clear POSIX -@clear SPARC +@c GDB version number is recorded in the variable GDBVN +@include GDBvn.texi +@c +@set AGGLOMERATION @clear AMDxxixK +@set BARETARGET +@set CONLY +@set DOSHOST +@clear FSFDOC +@set Hviii +@set HviiiEXCLUSIVE @clear Icmlx +@clear NOVEL +@clear POSIX +@set PRECONFIGURED @clear REMOTESTUB +@set SIMS +@clear SERIAL +@clear SPARC @clear STmm -@set PRECONFIGURED +@clear VXWORKS @clear ZviiiK +@c ---------------------------------------------------------------------- +@c STRINGS: +@c +@c Name of GDB program. Used also for (gdb) prompt string. +@set GDBP gdb +@c +@c Name of GDB product. Used in running text. +@set GDBN GDB +@c +@c Name of GDB initialization file. +@set GDBINIT .gdbinit +@c +@c Name of target. +@set TARGET Hitachi H/300 and H/500 +@c +@c Name of GCC product +@set NGCC GCC +@c +@c Name of GCC program +@set GCC gcc -- 2.34.1