diff options
author | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
commit | ab124e78b0271ddb904b761b31e5c9a0cf24e070 (patch) | |
tree | 0cf1447720c45721ed3d214a4eaaa6834bda155d /gnu/usr.bin/gdb/doc | |
parent | 15748830d0fcd29294a1969a1012655e74908c1e (diff) | |
download | FreeBSD-src-ab124e78b0271ddb904b761b31e5c9a0cf24e070.zip FreeBSD-src-ab124e78b0271ddb904b761b31e5c9a0cf24e070.tar.gz |
recording cvs-1.6 file death
Diffstat (limited to 'gnu/usr.bin/gdb/doc')
-rw-r--r-- | gnu/usr.bin/gdb/doc/ChangeLog | 783 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/Makefile.in | 327 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/a4rc.sed | 11 | ||||
-rwxr-xr-x | gnu/usr.bin/gdb/doc/config.status | 5 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/configure.in | 7 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info | 213 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-1 | 1304 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-2 | 1165 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-3 | 1264 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-4 | 1349 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-5 | 1215 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-6 | 1220 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-7 | 1233 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/gdb.info-8 | 657 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/libgdb.texinfo | 1471 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/lpsrc.sed | 13 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/psrc.sed | 13 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/refcard.ps | 798 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/doc/refcard.tex | 646 |
19 files changed, 0 insertions, 13694 deletions
diff --git a/gnu/usr.bin/gdb/doc/ChangeLog b/gnu/usr.bin/gdb/doc/ChangeLog deleted file mode 100644 index fb86719..0000000 --- a/gnu/usr.bin/gdb/doc/ChangeLog +++ /dev/null @@ -1,783 +0,0 @@ -Tue Oct 19 14:21:18 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo (Sourc Path): index entries for $cwd, $pdir - - * a4rc.sed: update to work with Andreas Vogel papersize params - - * refcard.tex: use Andreas Vogel simplifications of papersize - params; remove useless version info; update copyright date. - -Tue Oct 19 10:46:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdb.texinfo (Symbols): Add class NAME to doc for ptype. - -Tue Oct 12 09:11:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdb.texinfo (Files): Say what address the load command loads it at. - - * stabs.texinfo (Common Blocks): Minor cleanups. - - * stabs.texinfo: Update ld stabs in elf relocation to reflect the fact - that Sun has backed away from the linker kludge and thus the relevant - issue is changes to the SunPRO tools, not the Solaris linker. - - * stabs.texinfo (Traditional Integer Types): Clean up description - of octal bounds a little bit. Document extra leading zeroes. - -Thu Oct 7 16:15:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdb.texinfo (Signaling): Update for symbolic symbol names - and add a section explaining the difference between the GDB - signal command and the shell kill utility. - -Wed Oct 6 13:23:01 1993 Tom Lord (lord@rtl.cygnus.com) - - * libgdb.texinfo: added `@' to braces that were unescaped. - -Mon Oct 4 10:42:18 1993 Tom Lord (lord@rtl.cygnus.com) - - * libgdb.texinfo: new file. Spec for the gdb library. - -Sun Oct 3 15:26:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Include Files): Fix typo (start -> end). - -Thu Sep 30 18:24:56 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo, remote.texi: assorted small improvements, mostly - from Melissa at FSF's editing pass. - -Thu Sep 30 11:54:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdb.texinfo: Remove stuff about ar and 14 character filenames. - I believe this was fixed by the 13 Sep 89 change to print_frame_info. - Also, modern versions of ar like BSD 4.4 or SVR4 don't have this bug. - -Wed Sep 22 21:22:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * remote.texi (Bootstrapping): Discuss 386 call gates. - -Sat Sep 18 17:10:44 1993 Jim Kingdon (kingdon@poseidon.cygnus.com) - - * stabs.texinfo (Based Variables): New node. - -Thu Sep 16 17:48:55 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) - - * stabs.texinfo (Negative Type Numbers): Re-write discussions of - names, sizes, and formats to suggest how not to lose. - -Sat Sep 11 09:35:11 1993 Jim Kingdon (kingdon@poseidon.cygnus.com) - - * stabs.texinfo (Methods): Fix typo. - -Fri Sep 10 06:34:20 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * gdb.texinfo: Fix a few typos. - -Wed Sep 8 09:11:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdb.texinfo: Clarify how well it works with Fortran. - - * stabs.texinfo (Stabs In ELF, Statics, ELF Transformations): - More on relocating stabs in ELF files. - -Tue Sep 7 13:45:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Stabs In ELF): Talk about N_FUN value. - -Mon Sep 6 19:23:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Local Variable Parameters): Talk about nameless - parameters on VAX. - -Fri Sep 3 17:06:08 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo: @up/@down -> @raisesections/@lowersections - -Fri Sep 3 12:04:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Make info author notice match the TeX author notice. - -Tue Aug 31 13:21:06 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * stabs.texinfo: Initial-caps all words in node names and - non-trivial words in section names. - -Mon Aug 30 11:13:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Many minor cleanups. - - * stabs.texinfo: Remove @deffn except from Expanded Reference node. - -Sat Aug 28 12:08:09 1993 David J. MacKenzie (djm@edison.eng.umd.edu) - - * stabs.texinfo: Remove full description of big example. - It's not really helpful; just use pieces of it where appropriate. - Add more Texinfo formatting directives (@samp, etc.). - Use @deffn to define stab types. - Eliminate some wordiness. Break up some nodes. - Add an (alphabetized) index of symbol types. - Use consistent capitalization style in node and section names. - -Thu Aug 26 06:36:31 1993 Fred Fish (fnf@deneb.cygnus.com) - - * gdb.texinfo: Change typo "Two two" to "The two". - -Sun Aug 22 12:15:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (XCOFF-differences): Remove references to - non-existent types N_DECL and N_RPSYM. - - * stabs.texinfo (String Field): Say that type attributes bug is - fixed in GDB 4.10, since it is. - - * stabs.texinfo: Clean up djm cleanups, and more cleanups of my own. - -Sat Aug 21 04:32:28 1993 David MacKenzie (djm@cygnus.com) - - * stabs.texinfo: Formatting cleanups. - -Fri Aug 20 20:49:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: When explaining the n_type of a stab, standardize - how we do it ('#' as a comment indicator, "36 is N_FUN" as text, - no tabs, use @r). - (Global Variables): Clean up. - -Tue Aug 17 15:57:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Stack Variables): Re-write. - -Mon Aug 16 21:20:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Stabs-in-elf): Talk about getting the start - addresses of a source file. Also revise formatting. - Change "object module" or "object file" to "source file". - Various: Miscellaneous cleanups. - -Thu Aug 12 15:11:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Point to mangling info in gcc's gpcompare.texi. - -Tue Aug 10 16:57:49 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * gdbint.texinfo: Removed many nonsensical machine-collected - host and target conditionals, described some of the remainder. - -Tue Aug 10 13:28:30 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdbint.texinfo (Getting Started): Use @itemize, not @table. - - * gdbint.texinfo (Top): Add name to @top line, and re-write the - paragraph which follows. - - * gdbint.texinfo (Host): Use @code not @samp for Makefile - variables. Looks better and avoids overful hbox. - -Fri Jul 30 18:26:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Procedures): Improve stuff on nested functions. - -Thu Jul 29 15:10:58 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * remote.texi: (MIPS Remote) clearer doc for set/show timeout, - retransmit-timeout - -Thu Jul 29 13:16:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdbint.texinfo: Update statement about `some ancient Unix - systems, like Ultrix 4.0' to Ultrix 4.2. - -Wed Jul 28 15:26:53 1993 Roland H. Pesch (pesch@el_bosque.cygnus.com) - - * h8-cfg.texi, all-cfg.texi: new flag GDBSERVER - - * Makefile.in: depend on remote.texi rather than gdbinv-s.texi - - * remote.texi: (Server) New node on gdbserver. (Remote Serial, - ST2000 Remote, MIPS Remote): mention `host:port' syntax for TCP. - - * remote.texi: new name for former gdbinv-s.texi - - * gdb.texinfo: use remote.texi rather than gdbinv-s.texi - -Wed Jul 28 08:26:24 1993 Ian Lance Taylor (ian@cygnus.com) - - * gdbinv-s.texi: Documented timeout and retransmit-timeout - variables for MIPS remote debugging protocol. - -Mon Jul 26 13:00:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Negative Type Numbers): FORTRAN LOGICAL fix. - -Tue Jul 20 16:30:41 1993 Jim Kingdon (kingdon@deneb.cygnus.com) - - * Makefile.in (refcard.dvi): Use srcdir where necessary. - -Mon Jul 19 12:02:50 1993 Roland H. Pesch (pesch@cygnus.com) - - * gdb.texinfo: repair conditional bugs in text markup - -Fri Jul 16 18:57:50 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo, all-cfg.texi, h8-cfg.texi: introduce MOD2 switch - to select Modula-2 material. - -Thu Jul 15 13:15:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Cleanups regarding statics. - - * gdbinv-s.texi (Bootstrapping): Document exceptionHandler. - (Debug Session): Mention exceptionHandler. Add xref to Bootstrapping. - -Mon Jul 12 13:37:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: N_MAIN is sometimes used for C. - -Fri Jul 9 09:47:02 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * gdbint.texinfo (Host, Target Conditionals): Remove TM_FILE_OVERRIDE. - -Tue Jul 6 12:41:28 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo (Target Conditionals): Remove NO_TYPEDEFS, - removed from the code by Kingdon. - -Tue Jul 6 12:24:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * gdb.texinfo (Break Commands): Remove stuff about flushing terminal - input when evaluating breakpoint conditions; the bug has been fixed. - - * gdb.texinfo (Continuing and Stepping): Argument to "continue" - sets the ignore count to N-1, not to N. - -Thu Jul 1 14:57:42 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * refcard.tex (\hoffset): correct longstanding error to match - intended offset; avoids cutting off edge on some printers - -Wed Jun 30 18:23:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Parameters): Say that order of stabs is significant. - -Fri Jun 25 21:34:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Common Blocks): Say what Sun FORTRAN does. - -Fri Jun 25 16:15:10 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * Makefile.in: (REFEDITS) new var to control whether PS or CM - fonts and whether US or A4 paper for GDB refcard; (refcard.dvi) - collect sed edits if any, apply to refcard before formatting; - (refcard.ps) stop implying PS fonts if PS output requested; - (lrefcard.ps) delete extra target for variant PS fonts - - * refcard.tex: parametrize papersize dependent info, collect - in easily replaced spot - - * a4rc.sed: new file, edits to refcard for A4 paper - -Fri Jun 25 14:21:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Negative Type Numbers): Type -16 is 4 bytes. - -Wed Jun 23 15:02:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Negative Type Numbers): Minor character cleanups. - -Tue Jun 22 16:31:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Express disapproval of 'D' symbol descriptor - politely rather than rudely. - -Fri Jun 18 19:42:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Document common blocks. - -Fri Jun 18 12:12:57 1993 Fred Fish (fnf@cygnus.com) - - * stabs.texinfo: Add some basic info about stabs-in-elf. - -Fri Jun 18 13:57:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Top): Minor cleanup. - -Mon Jun 14 16:16:51 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) - - * Makefile.in (install-info): remove parentdir support - -Tue Jun 15 18:11:39 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo (Copying): delete this node and references to it; - RMS says this manual need not carry GPL. (passim): Improvements - from last round at FSF, largely due to Ian Taylor review, and - minor formatting improvements. - - * gdbinv-s.texi (passim): Improvements from last round at FSF, - largely due to Ian Taylor review. (Debug Session): minor edits to - new text. - -Sun Jun 13 12:52:39 1993 Jim Kingdon (kingdon@cygnus.com) - - * Makefile.in (realclean): Remove info and dvi files too. - -Sat Jun 12 16:09:22 1993 Jim Kingdon (kingdon@cygnus.com) - - * {all,h8}-config.texi: Rename to *-cfg.texi for 14 char filenames. - * Makefile.in: Change accordingly. gdb-config.texi -> gdb-cfg.texi. - * gdb.texinfo: Change accordingly. - - * stabs.texinfo: Clean up N_{L,R}BRAC. Discuss what addresses of - N_{L,R}BRAC,N_SLINE are relative to. - -Fri Jun 11 15:15:55 1993 Jim Kingdon (kingdon@cygnus.com) - - * Makefile.in (GDBvn.texi): Update atomically. - -Wed Jun 9 10:58:16 1993 Jim Kingdon (kingdon@cygnus.com) - - * gdbinv-s.texi (Debug Session): Document exceptionHook. - -Tue Jun 8 13:42:04 1993 Jim Kingdon (kingdon@cygnus.com) - - * gdb.texinfo (Print Settings): Move all stuff relating to symbolic - addresses together. Also motivate the set print symbol-filename - command and suggest other solutions. - -Tue Jun 1 22:46:43 1993 Fred Fish (fnf@cygnus.com) - - * gdb.texinfo (set print elements): Note that the number of - elements is set to unlimited by "set print elements 0". - -Mon May 31 08:06:55 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo (Builtin Type Descriptors): Try to clarify what - NF_LDOUBLE means. - (Stab Types): Include Solaris stab types. - (Procedures): Document Solaris extensions. - -Thu May 27 06:20:42 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * gdb.texinfo: Add `set print symbol-filename' doc. - -Wed May 26 00:26:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Arrays): Talk about type definition vs. type - information. - - * stabs.texinfo (Builtin Type Descriptors): Talk about omitting - the trailing semicolon. - -Tue May 25 14:49:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Line Numbers, Source Files): Re-write these two nodes - and merge in other parts of the document addressing these subjects. - gdbint.texinfo (XCOFF): Remove info which is now in stabs.texinfo. - - * stabs.texinfo (Subranges, Arrays): Try to explain about the semicolon - at the end of a range type. - - * stabs.texinfo (Subranges): "A offset" and "T offset" are not - AIX extensions. - -Mon May 24 09:00:33 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Stabs Format): Misc fixes. - -Sat May 22 10:40:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Constants): Allow an `e' constant to be non-enum. - (Traditional builtin types): Document convex convention for long long. - (Negative builtin types): Discuss type names, and misc fixes. - -Fri May 21 11:20:31 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Builtin Type Descriptors): Document the floating - point types used with @samp{R} type descriptor. - (Symbol Descriptors): Describe how to handle conflict between - different meanings of @samp{P} symbol descriptor. - -Thu May 20 13:35:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo: Remove node Quick Reference and put its children - directly under the main menu. - - * stabs.texinfo: Many more changes to bring it into line with - AIX documentation and reality. I think it now has all the - information from the AIX documentation, except that I burned - out when I got to variant records (Pascal and Modula-2) and - all the COBOL types. Oh well, we can add them later when we're - worrying more about those languages. - - * stabs.texinfo (Automatic variables): Talk about what it means - to omit the symbol descriptor. - -Tue May 18 17:59:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * stabs.texinfo (Parameters): Add "(sometimes)" when describing - gcc2 behavior with promoted args. - -Fri May 14 21:35:29 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo: include readline appendices in info version of manual - -Fri May 7 11:56:18 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdbinv-s.texi (Remote Serial): describe new ^C behavior in - target remote. - - * gdb.texinfo (Machine Code): more index entries for disassemble - -Fri May 7 10:12:30 1993 Fred Fish (fnf@cygnus.com) - - * Clarify the intended use of the gdb-testers and gdb-patches - mailing lists, and shrink gzip comment. - -Thu May 6 16:39:50 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo (Shell Commands): do not mention SHELL env var in - DOSHOST configuration of manual. - - * gdb.texinfo (MIPS Stack): new node. - - * all-config.texi (MIPS) new switch. - - * gdbinv-s.texi (Nindy Options) Remove two instances of future - tense; (MIPS Remote) new node. - - * gdb.texinfo (passim) rephrases to work around makeinfo @value - bug; (Environment) less passive, other small cleanups in text about - .cshrc/.bashrc; (Invoking GDB) new MIPS Remote menu entry; - (Remote) new MIPS Remote menu entry. - -Thu Apr 29 09:36:25 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo: Many changes to include information from the - AIX documentation. - - * gdb.texinfo (Environment): Mention pitfall with .cshrc. - -Tue Apr 27 14:02:57 1993 Jim Kingdon (kingdon@cygnus.com) - - * gdbint.texinfo (new node Debugging GDB, elsewhere): - Move a bunch of information from ../README. - (Getting Started): New node. - -Fri Apr 23 17:21:13 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdbinv-s.texi, gdb.texinfo: include Hitachi SH target - - * gdb.texinfo: advance manual revision dates to present - - * gdbinv-s.texi, gdb.texinfo, all-config.texi, h8-config.texi: - stop using silly Roman numerals in @set variable names - -Fri Apr 23 07:30:01 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo (Parameters): Keep trying to get this right. - -Wed Apr 21 15:18:47 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo (Parameters): More on "local parameters". - -Mon Apr 19 08:00:51 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo (Parameters): Re-do "local parameters" section. - -Sun Apr 18 09:47:45 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo (Symbol descriptors): Re-do using @table and @xref. - (Parameters): Rewrite. - (xcoff-differences, Sun-differences): Minor changes. - -Thu Apr 15 02:35:24 1993 John Gilmore (gnu@cacophony.cygnus.com) - - * stabs.texinfo: Minor cleanup. - -Wed Apr 14 17:31:00 1993 Jim Kingdon (kingdon@cygnus.com) - - * gdbint.texinfo: Minor xcoff stuff. - -Wed Apr 7 14:11:07 1993 Fred Fish (fnf@cygnus.com) - - * gdbint.texinfo: Update for new config directory structure. - Add info about internal type data structures. - -Mon Apr 5 09:06:30 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (SFILES_INCLUDED): gdb-config.texi is no longer in - $(srcdir). - (gdb-config.texi): Depend on file in $(srcdir). - -Fri Apr 2 16:55:13 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo: Fixes about N_SO. - -Fri Mar 26 18:00:35 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo: include list of nonstandard init file names - - * *-config.texi: new switch GENERIC for text that applies *only* - to (usual) multiple-target version of manual - - * gdb.texinfo, gdbinv-s.texi: Update conditional markup to correct - h8 config - - * gdb.texinfo: depend on latest fixed makeinfo, use conditionals - in menus (rather than conditionally selected multiple alternative - menus). - - * Makefile.in: define and use DOC_CONFIG var to select - configuration for GDB user manual. - - * gdb-config.texi: delete from repository, generate from Makefile. - - * all-config.texi: normal `generic' configuration file, formerly - stored as gdb-config.texi - -Wed Mar 24 14:03:19 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com) - - * Makefile.in: add dvi target to build all .dvi files - -Tue Mar 23 16:03:24 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo, gdvinv-s.texinfo: formatting improvements. - -Fri Mar 19 21:46:50 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Doc NO_MMALLOC and NO_MMALLOC_CHECK as - host conditionals. - * stabs.texinfo: More array fixes inspired by Jim's. - -Fri Mar 19 10:23:34 1993 Jim Kingdon (kingdon@cygnus.com) - - * stabs.texinfo: Fixes re arrays and continuations. - - * gdbint.texinfo: Add XCOFF node. - -Mon Mar 8 15:52:18 1993 John Gilmore (gnu@cygnus.com) - - * gdb.texinfo: Add `set print max-symbolic-offset' doc. - -Sun Feb 21 17:09:38 1993 Per Bothner (bothner@rtl.cygnus.com) - - * stabs.texinfo: Fix for array types to mention lower bounds. - -Thu Feb 18 01:19:49 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Update PTRACE_ARG3_TYPE doc, pull PT_*. - -Wed Feb 17 08:15:24 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Remove SET_STACK_LIMIT_HUGE from target defines. - -Thu Feb 11 10:38:40 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Fix thinko (NM_FILE => NAT_FILE). Found - by Michael Ben-Gershon <mybg@CS.HUJI.AC.IL>. - -Wed Feb 10 23:59:19 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Eliminate IBM6000_HOST, document IBM6000_TARGET. - -Tue Feb 9 18:26:21 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo, gdbinv-s.texi: misc updates - -Sat Feb 6 10:25:47 1993 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Brief documentation for longjmp support, - from an email msg by Stu. - -Fri Feb 5 14:10:15 1993 John Gilmore (gnu@cygnus.com) - - * stabs.texinfo: Fix description of floating point "range" - types (which really define basic types). Reported by Jim Meehan, - <meehan@src.dec.com>. - - * gdbint.texinfo: Remove COFF_NO_LONG_FILE_NAMES define, now gone. - -Thu Feb 4 13:56:46 1993 Ian Lance Taylor (ian@cygnus.com) - - * gdbint.texinfo: Slightly expand section on supporting a new - object file format. - -Thu Feb 4 01:49:04 1993 John Gilmore (gnu@cygnus.com) - - * Makefile.in (refcard.ps, lrefcard.ps): Remove psref.tex - intermediate file. - -Tue Feb 2 12:18:06 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo, gdbinv-s.texi: miscellaneous stylistic cleanups - -Mon Feb 1 15:35:47 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdbinv-s.texi: z8000 simulator target name is just "sim" - - * gdbinv-s.texi: Mention that Z8000 simulator can simulate Z8001 - as well as Z8002. - -Sat Nov 28 06:51:35 1992 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Add sections on clean design and on how to send - in changes. - -Mon Nov 9 23:57:02 1992 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Add how to declare the result of make_cleanup. - -Mon Oct 26 11:09:47 1992 John Gilmore (gnu@cygnus.com) - - * gdb.texinfo: Fix typo, reported by Karl Berry. - -Fri Oct 23 00:41:21 1992 John Gilmore (gnu@cygnus.com) - - * gdb.texinfo: Add opcodes dir to GDB distribution description. - -Sat Oct 10 18:04:58 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * gdbint.texinfo: fixed a stray email address (needs @@), - added @table @code to node "Native Conditionals" - -Tue Sep 22 00:34:15 1992 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Describe coding style of GDB. - -Mon Sep 21 19:32:16 1992 John Gilmore (gnu@cygnus.com) - - * stabs.texinfo: Minor wording changes. - -Tue Sep 15 02:57:09 1992 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Improve release doc slightly. - -Fri Sep 11 01:34:25 1992 John Gilmore (gnu@sphagnum.cygnus.com) - - * gdbint.texinfo: Improve doc of GDB config macros. - -Wed Sep 9 16:52:06 1992 John Gilmore (gnu@cygnus.com) - - * stabs.texinfo: Remove Bothner's changes for C++ nested types. - These will be reinserted when examined. - -Mon Aug 24 01:17:55 1992 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Make a start at documenting all the #if macros - in GDB. At least list them all, and start separating them into - host-specific and target-specific. - -Tue Aug 18 15:59:13 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdbinv-s.m4.in: refrain from using @cartouche for just a few - examples (not consistent w others). - gdb.texinfo: issue disclaimer paragraph on cmdline options only - for generic vn of doc - -Tue Aug 18 14:53:27 1992 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in: always create installation directories. - -Tue Aug 18 14:11:50 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo: in h8 config, do not describe searching commands. - -Mon Aug 17 18:07:59 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo, none.m4, h8.m4, gdbinv-s.m4.in: improve H8/300 - conditionals; introduce a few generic switches that may be - useful for other cross-dev or dos-hosted configs. - - * gdb.texinfo: fix typo in "info reg" description - -Sun Aug 16 01:16:18 1992 John Gilmore (gnu@cygnus.com) - - * stabs.texinfo: Minor updates from running TeX over it. - * Makefile.in (stabs.dvi, stabs.ps): Add. - -Sat Aug 15 20:52:24 1992 Per Bothner (bothner@rtl.cygnus.com) - - * stabs.texinfo: Stabs documentation, written by Julia Menapace. - First pass at converting it to texinfo. - -Sat Aug 15 03:14:59 1992 John Gilmore (gnu@cygnus.com) - - * gdb.texinfo, refcard.tex: Document mult args on `info reg'. - * Makefile.in (refcard.ps, lrefcard.ps): Add missing $(srdir). - -Fri Aug 14 21:08:47 1992 John Gilmore (gnu@cygnus.com) - - * gdbint.texinfo: Add section on partial symbol tables. - -Sat Jun 20 16:31:10 1992 John Gilmore (gnu at cygnus.com) - - * gdb.texinfo: document `set remotedebug' and `set - rstack_high_address'. - -Thu May 14 17:09:48 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * gdb.texinfo: slight expansion of new text on reading info files - * gdbinv-s.m4.in: correct and expand info on cross-debugging - H8/300 from DOS. - -Tue May 12 12:22:47 1992 John Gilmore (gnu at cygnus.com) - - * gdb.texinfo: `info user' => `show user'. Noticed by David Taylor. - -Mon May 11 19:06:27 1992 John Gilmore (gnu at cygnus.com) - - * gdb.texinfo: Say how to read the `info' files. - -Tue May 5 12:11:38 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: gm4 -> m4. - -Fri Apr 10 17:50:43 1992 John Gilmore (gnu at rtl.cygnus.com) - - * gdb.texinfo: Update for GDB-4.5. Move `Formatting - Documentation' ahead of `Installing GDB' to match README. - Update shared library doc, -readnow and -mapped, and directory - structure (add glob and mmalloc). Update configure doc. - -Tue Mar 24 23:28:38 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: remove $(srcdir) from gdb.info rule. - -Sat Mar 7 18:44:50 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: commented out gdb-all.texinfo rule. This is - temporary. - -Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in, configure.in: removed traces of namesubdir, - -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced - copyrights to '92, changed some from Cygnus to FSF. - -Fri Dec 13 09:47:31 1991 John Gilmore (gnu at cygnus.com) - - * gdb.texinfo: Improve how we ask for bug reports. - -Tue Dec 10 04:07:21 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: infodir belongs in datadir. - -Fri Dec 6 23:57:34 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: remove spaces following hyphens, bsd make can't - cope. install using INSTALL_DATA. added clean-info. added - standards.text support. - -Thu Dec 5 22:46:12 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: idestdir and ddestdir go away. Added copyrights - and shift gpl to v2. Added ChangeLog if it didn't exist. docdir - and mandir now keyed off datadir by default. - - -Local Variables: -mode: indented-text -left-margin: 8 -fill-column: 74 -version-control: never -End: diff --git a/gnu/usr.bin/gdb/doc/Makefile.in b/gnu/usr.bin/gdb/doc/Makefile.in deleted file mode 100644 index d5ae290..0000000 --- a/gnu/usr.bin/gdb/doc/Makefile.in +++ /dev/null @@ -1,327 +0,0 @@ -##Copyright (C) 1991, 1992 Free Software Foundation, Inc. - -# Makefile for GDB documentation. -# This file is part of GDB. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -srcdir = . - -prefix = /usr/local - -infodir = $(prefix)/info - -SHELL = /bin/sh - -INSTALL = install -c -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) - -# main GDB source directory -gdbdir = $(srcdir)/.. - -# where to find texinfo; GDB dist should include a recent one -TEXIDIR=${gdbdir}/../texinfo - -# where to find makeinfo, preferably one designed for texinfo-2 -MAKEINFO=makeinfo - -# where to find texi2roff, ditto -TEXI2ROFF=texi2roff - -# Where is the source dir for the READLINE library doc? -# Traditionally readline is in .. or . -READLINE_DIR = ${gdbdir}/../readline/doc - -SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS - -# There may be alternate predefined collections of switches to configure -# the GDB manual. Normally this is not done in synch with the software -# config system, since this choice tends to be independent; most people -# want a doc config of `all' for a generic manual, regardless of sw config. -DOC_CONFIG = all - -# This list of sed edits will edit the GDB reference card -# for what fonts and what papersize to use. -# By default (NO edits applied), the refcard uses: -# - Computer Modern (CM) fonts -# - US letter paper (8.5x11in) -# List some of the following files for alternative fonts and paper: -# a4rc.sed use A4 paper (297 x 210 mm) -# psrc.sed use PostScript fonts (Karl Berry short TeX names) -# lpsrc.sed use PostScript fonts (full PostScript names in TeX) -# e.g. for A4, Postscript: REFEDITS = a4rc.sed psrc.sed -# for A4, CM fonts: REFEDITS = a4rc.sed -# for US, PS fonts: REFEDITS = psrc.sed -# for default: -REFEDITS = - -# Don Knuth's TeX formatter -TEX = tex - -# auxiliary program for sorting Texinfo indices -TEXINDEX = texindex - -# Main GDB manual's source files -SFILES_INCLUDED = gdb-cfg.texi $(srcdir)/remote.texi - -SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED) - -SFILES_DOC = $(SFILES_LOCAL) \ - $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texi - -#### Host, target, and site specific Makefile fragments come in here. -### - -all install: - -info: gdb.info gdbint.info stabs.info -dvi: gdb.dvi refcard.dvi gdbint.dvi -all-doc: gdb.info gdb.dvi refcard.dvi gdb-internals gdbint.dvi - -install-info: info - for i in *.info* ; do \ - $(INSTALL_DATA) $$i $(infodir)/$$i ; \ - done - -STAGESTUFF = *.info* gdb-all.texi GDBvn.texi - -# Copy the object files from a particular stage into a subdirectory. -stage1: force - -mkdir stage1 - -mv $(STAGESTUFF) stage1 - -stage2: force - -mkdir stage2 - -mv $(STAGESTUFF) stage2 - -stage3: force - -mkdir stage3 - -mv $(STAGESTUFF) stage3 - -against=stage2 - -comparison: force - for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done - -de-stage1: force - -(cd stage1 ; mv -f * ..) - -rmdir stage1 - -de-stage2: force - -(cd stage2 ; mv -f * ..) - -rmdir stage2 - -de-stage3: force - -(cd stage3 ; mv -f * ..) - -rmdir stage3 - -clean-info: - rm -f gdb.info* gdbint.info* stabs.info* - -clean-dvi: - rm -f gdb.dvi refcard.dvi gdbint.dvi stabs.dvi sedref.dvi - -mostlyclean: clean-info clean-dvi - rm -f gdb.?? gdb.??? gdb.mm gdb.ms gdb.me - rm -f links2roff - rm -f refcard.ps lrefcard.ps refcard.log sedref.* *~ - rm -f gdbint.?? gdbint.??? stabs.?? stabs.??? - -clean: mostlyclean - rm -f GDBvn.texi rluser.texinfo inc-hist.texi - -distclean: clean - rm -f Makefile config.status - -realclean: distclean clean-dvi clean-info - -# GDB QUICK REFERENCE (dvi output) -refcard.dvi : refcard.tex $(REFEDITS) - if [ -z "$(REFEDITS)" ]; then \ - cp $(srcdir)/refcard.tex sedref.tex ; \ - else \ - echo > tmp.sed ; \ - for f in "$(REFEDITS)" ; do \ - cat $(srcdir)/$$f >>tmp.sed ; done ; \ - sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex ; \ - fi - $(SET_TEXINPUTS) $(TEX) sedref.tex - mv sedref.dvi refcard.dvi - rm -f sedref.log sedref.tex tmp.sed - -refcard.ps : refcard.dvi - dvips -t landscape refcard.dvi -o - -# File to record current GDB version number (copied from main dir Makefile.in) -GDBvn.texi : ${gdbdir}/Makefile.in - echo "@set GDBVN `sed <$(srcdir)/../Makefile.in -n 's/VERSION = //p'`" > ./GDBvn.new - mv GDBvn.new GDBvn.texi - -# Updated atomically -.PRECIOUS: 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-cfg.texi: ${srcdir}/${DOC_CONFIG}-cfg.texi - ln -s ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \ - ln ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \ - cp ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.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 -# -# The nonsense with GDBvn.texi gets this to run with both Sun and GNU make. -# Note that we can *generate* GDBvn.texi, but since we distribute one in the -# source directory for the benefit of people who *don't* use this makefile, -# VPATH will often tell make not to bother building it, because the one -# in the srcdir is up to date. (if not, then make should build one here). - -# GDB MANUAL: TeX dvi file -gdb.dvi: ${SFILES_DOC} - if [ ! -f ./GDBvn.texi ]; then \ - ln -s $(srcdir)/GDBvn.texi . || \ - ln $(srcdir)/GDBvn.texi . || \ - cp $(srcdir)/GDBvn.texi . ; else true; fi - $(SET_TEXINPUTS) $(TEX) gdb.texinfo - $(SET_TEXINPUTS) $(TEX) gdb.texinfo - $(TEXINDEX) gdb.?? - $(SET_TEXINPUTS) $(TEX) gdb.texinfo - rm -f gdb.?? gdb.log gdb.aux gdb.toc gdb.??s - -# GDB MANUAL: info file -# We're using texinfo2, and older makeinfo's may not be able to -# cope with all the markup. -gdb.info: ${SFILES_DOC} - $(MAKEINFO) -I ${READLINE_DIR} -I $(srcdir) -o ./gdb.info gdb.texinfo - -# GDB MANUAL: roff translations -# Try to use a recent texi2roff. v2 was put on prep in jan91. -# If you want an index, see texi2roff doc for postprocessing -# and add -i to texi2roff invocations below. -# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete -# corresponding -e lines when later texi2roff's are current) -# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. -# + @c's deleted explicitly because texi2roff sees texinfo commands in them -# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank -# + @alphaenumerate is ridiculously new, turned into @enumerate - -# texi2roff doesn't have a notion of include dirs, so we have to fake -# it out for gdb manual's include files---but only if not configured -# in main sourcedir. -links2roff: $(SFILES_INCLUDED) - if [ ! -f gdb.texinfo ]; then \ - ln -s $(SFILES_INCLUDED) . || \ - ln $(SFILES_INCLUDED) . || \ - cp $(SFILES_INCLUDED) . ; \ - fi - touch links2roff - -# "Readline" appendices. Get them also due to lack of includes, -# regardless of whether or not configuring in main sourcedir. -# @ftable removed due to bug in texi2roff-2; if your texi2roff -# is newer, try just ln or cp -rluser.texinfo: ${READLINE_DIR}/rluser.texinfo - sed -e 's/^@ftable/@table/g' \ - -e 's/^@end ftable/@end table/g' \ - ${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo - -inc-hist.texi: ${READLINE_DIR}/inc-hist.texi - ln -s ${READLINE_DIR}/inc-hist.texi . || \ - ln ${READLINE_DIR}/inc-hist.texi . || \ - cp ${READLINE_DIR}/inc-hist.texi . - -# gdb manual suitable for [gtn]roff -me -gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi - sed -e '/\\input texinfo/d' \ - -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ - -e '/^@ifinfo/,/^@end ifinfo/d' \ - -e '/^@c /d' \ - -e 's/{.*,,/{/' \ - -e 's/@ / /g' \ - -e 's/^@alphaenumerate/@enumerate/g' \ - -e 's/^@end alphaenumerate/@end enumerate/g' \ - $(srcdir)/gdb.texinfo | \ - $(TEXI2ROFF) -me | \ - sed -e 's/---/\\(em/g' \ - >gdb.me - -# gdb manual suitable for [gtn]roff -ms -gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi - sed -e '/\\input texinfo/d' \ - -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ - -e '/^@ifinfo/,/^@end ifinfo/d' \ - -e '/^@c /d' \ - -e 's/{.*,,/{/' \ - -e 's/@ / /g' \ - -e 's/^@alphaenumerate/@enumerate/g' \ - -e 's/^@end alphaenumerate/@end enumerate/g' \ - $(srcdir)/gdb.texinfo | \ - $(TEXI2ROFF) -ms | \ - sed -e 's/---/\\(em/g' \ - >gdb.ms - -# gdb manual suitable for [tn]roff -mm -# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, -# try leaving them in -gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi - sed -e '/\\input texinfo/d' \ - -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ - -e '/^@ifinfo/,/^@end ifinfo/d' \ - -e '/^@c /d' \ - -e 's/{.*,,/{/' \ - -e '/@noindent/d' \ - -e 's/@ / /g' \ - -e 's/^@alphaenumerate/@enumerate/g' \ - -e 's/^@end alphaenumerate/@end enumerate/g' \ - $(srcdir)/gdb.texinfo | \ - $(TEXI2ROFF) -mm | \ - sed -e 's/---/\\(em/g' \ - >gdb.mm - -# GDB INTERNALS MANUAL: TeX dvi file -gdbint.dvi : gdbint.texinfo - $(SET_TEXINPUTS) $(TEX) gdbint.texinfo - $(TEXINDEX) gdbint.?? - $(SET_TEXINPUTS) $(TEX) gdbint.texinfo - rm -f gdbint.?? gdbint.aux gdbint.cps gdbint.fns gdbint.kys \ - gdbint.log gdbint.pgs gdbint.toc gdbint.tps gdbint.vrs - -# GDB INTERNALS MANUAL: info file -gdb-internals: gdbint.info - -gdbint.info: gdbint.texinfo - $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo - -stabs.info: stabs.texinfo - $(MAKEINFO) -o stabs.info $(srcdir)/stabs.texinfo - -# STABS DOCUMENTATION: TeX dvi file -stabs.dvi : stabs.texinfo - $(SET_TEXINPUTS) $(TEX) stabs.texinfo - $(TEXINDEX) stabs.?? - $(SET_TEXINPUTS) $(TEX) stabs.texinfo - rm -f stabs.?? stabs.aux stabs.cps stabs.fns stabs.kys \ - stabs.log stabs.pgs stabs.toc stabs.tps stabs.vrs - -stabs.ps: stabs.dvi - dvips -o stabs.ps stabs - -force: - -Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) - $(SHELL) ./config.status diff --git a/gnu/usr.bin/gdb/doc/a4rc.sed b/gnu/usr.bin/gdb/doc/a4rc.sed deleted file mode 100644 index 2292290..0000000 --- a/gnu/usr.bin/gdb/doc/a4rc.sed +++ /dev/null @@ -1,11 +0,0 @@ -/--- Papersize params:/,/--- end papersize params/c\ -%------- Papersize params:\ -%% A4 paper (297x210mm)\ -%%\ -\\totalwidth=297mm % total width of paper\ -\\totalheight=210mm % total height of paper\ -\\hmargin=5mm % horizontal margin width\ -\\vmargin=10mm % vertical margin width\ -\\secskip=.6pc % space between refcard secs\ -\\lskip=1pt % extra skip between \\sec entries\ -%------- end papersize params diff --git a/gnu/usr.bin/gdb/doc/config.status b/gnu/usr.bin/gdb/doc/config.status deleted file mode 100755 index 5d2c6dd..0000000 --- a/gnu/usr.bin/gdb/doc/config.status +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# This file was generated automatically by configure. Do not edit. -# This directory was configured as follows: -../../configure --host=i386-unknown-freebsd --target=i386-unknown-freebsd -norecursion -# diff --git a/gnu/usr.bin/gdb/doc/configure.in b/gnu/usr.bin/gdb/doc/configure.in deleted file mode 100644 index 1d2b47e..0000000 --- a/gnu/usr.bin/gdb/doc/configure.in +++ /dev/null @@ -1,7 +0,0 @@ -srcname="GDB doc" -srctrigger=gdb.texinfo -# per-host: -# per-target: - -files="" -links="" diff --git a/gnu/usr.bin/gdb/doc/gdb.info b/gnu/usr.bin/gdb/doc/gdb.info deleted file mode 100644 index c326469..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info +++ /dev/null @@ -1,213 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -Indirect: -gdb.info-1: 992 -gdb.info-2: 50863 -gdb.info-3: 98423 -gdb.info-4: 145674 -gdb.info-5: 194815 -gdb.info-6: 244253 -gdb.info-7: 290141 -gdb.info-8: 335234 - -Tag Table: -(Indirect) -Node: Top992 -Node: Summary2561 -Node: Free Software3754 -Node: Contributors4492 -Node: New Features8199 -Node: Sample Session12215 -Node: Invocation19094 -Node: Invoking GDB19559 -Node: File Options21298 -Node: Mode Options24476 -Node: Quitting GDB26641 -Node: Shell Commands27359 -Node: Commands28106 -Node: Command Syntax28739 -Node: Completion30598 -Node: Help34666 -Node: Running38442 -Node: Compilation39426 -Node: Starting41224 -Node: Arguments44411 -Node: Environment45412 -Node: Working Directory48518 -Node: Input/Output49258 -Node: Attach50863 -Node: Kill Process53122 -Node: Process Information54097 -Node: Stopping55350 -Node: Breakpoints56423 -Node: Set Breaks58622 -Node: Set Watchpoints65221 -Node: Exception Handling66051 -Node: Delete Breaks68610 -Node: Disabling70238 -Node: Conditions72881 -Node: Break Commands77378 -Node: Breakpoint Menus80225 -Node: Error in Breakpoints81935 -Node: Continuing and Stepping82839 -Node: Signals89318 -Node: Stack92940 -Node: Frames94414 -Node: Backtrace96691 -Node: Selection98423 -Node: Frame Info100917 -Node: MIPS Stack102984 -Node: Source103857 -Node: List104806 -Node: Search108286 -Node: Source Path109085 -Node: Machine Code111763 -Node: Data114236 -Node: Expressions116111 -Node: Variables117793 -Node: Arrays120314 -Node: Output Formats122397 -Node: Memory124456 -Node: Auto Display128727 -Node: Print Settings132474 -Node: Value History140630 -Node: Convenience Vars143017 -Node: Registers145674 -Node: Floating Point Hardware150276 -Node: Languages150781 -Node: Setting151949 -Node: Manually152483 -Node: Automatically153663 -Node: Show154980 -Node: Checks155888 -Node: Type Checking157244 -Node: Range Checking159924 -Node: Support162265 -Node: C163185 -Node: C Operators164016 -Node: C Constants168071 -Node: Cplus expressions169974 -Node: C Defaults172597 -Node: C Checks173215 -Node: Debugging C173926 -Node: Debugging C plus plus174404 -Node: Modula-2176416 -Node: M2 Operators177308 -Node: Built-In Func/Proc180308 -Node: M2 Constants183051 -Node: M2 Defaults184640 -Node: Deviations185239 -Node: M2 Checks186330 -Node: M2 Scope187130 -Node: GDB/M2188142 -Node: Symbols189081 -Node: Altering194815 -Node: Assignment195797 -Node: Jumping197907 -Node: Signaling199914 -Node: Returning201034 -Node: Calling202226 -Node: Patching202700 -Node: GDB Files203782 -Node: Files204247 -Node: Symbol Errors214466 -Node: Targets218064 -Node: Active Targets218954 -Node: Target Commands220530 -Node: Remote223904 -Node: Remote Serial225315 -Node: Stub Contents227768 -Node: Bootstrapping229877 -Node: Debug Session233057 -Node: Protocol236218 -Node: Server239069 -Node: i960-Nindy Remote242748 -Node: Nindy Startup243568 -Node: Nindy Options244253 -Node: Nindy Reset245867 -Node: UDI29K Remote246251 -Node: EB29K Remote247172 -Node: Comms (EB29K)248006 -Node: gdb-EB29K251189 -Node: Remote Log252555 -Node: ST2000 Remote253030 -Node: VxWorks Remote254499 -Node: VxWorks Connection256224 -Node: VxWorks Download257150 -Node: VxWorks Attach258886 -Node: Hitachi Remote259281 -Node: MIPS Remote260790 -Node: Simulator262861 -Node: Controlling GDB264351 -Node: Prompt264962 -Node: Editing265571 -Node: History266338 -Node: Screen Size269024 -Node: Numbers270420 -Node: Messages/Warnings271538 -Node: Sequences274587 -Node: Define275147 -Node: Hooks277144 -Node: Command Files278547 -Node: Output280302 -Node: Emacs282714 -Node: GDB Bugs288669 -Node: Bug Criteria289387 -Node: Bug Reporting290141 -Node: Command Line Editing297342 -Node: Introduction and Notation297763 -Node: Readline Interaction298780 -Node: Readline Bare Essentials299914 -Node: Readline Movement Commands301417 -Node: Readline Killing Commands302303 -Node: Readline Arguments303941 -Node: Readline Init File304887 -Node: Readline Init Syntax305708 -Node: Commands For Moving309640 -Node: Commands For History310260 -Node: Commands For Text311330 -Node: Commands For Killing313046 -Node: Numeric Arguments314168 -Node: Commands For Completion314606 -Node: Miscellaneous Commands315325 -Node: Readline Vi Mode316077 -Node: Using History Interactively316784 -Node: History Interaction317141 -Node: Event Designators318189 -Node: Word Designators318828 -Node: Modifiers319724 -Node: Renamed Commands320469 -Node: Formatting Documentation322131 -Node: Installing GDB325465 -Node: Separate Objdir328945 -Node: Config Names331490 -Node: configure Options332918 -Node: Index335234 - -End Tag Table diff --git a/gnu/usr.bin/gdb/doc/gdb.info-1 b/gnu/usr.bin/gdb/doc/gdb.info-1 deleted file mode 100644 index a1d7120..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-1 +++ /dev/null @@ -1,1304 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Top, Next: Summary, Prev: (DIR), Up: (DIR) - -Debugging with GDB -****************** - - This file describes GDB, the GNU symbolic debugger. - - This is Edition 4.09, August 1993, for GDB Version 4.11. - -* Menu: - -* Summary:: Summary of GDB - -* New Features:: New features since GDB version 3.5 - -* Sample Session:: A sample GDB session - -* Invocation:: Getting in and out of GDB -* Commands:: GDB commands -* Running:: Running programs under GDB -* Stopping:: Stopping and continuing -* Stack:: Examining the stack -* Source:: Examining source files -* Data:: Examining data - -* Languages:: Using GDB with different languages - - -* Symbols:: Examining the symbol table -* Altering:: Altering execution -* GDB Files:: GDB files -* Targets:: Specifying a debugging target -* Controlling GDB:: Controlling GDB -* Sequences:: Canned sequences of commands - -* Emacs:: Using GDB under GNU Emacs - -* GDB Bugs:: Reporting bugs in GDB -* Command Line Editing:: Facilities of the readline library -* Using History Interactively:: - -* Renamed Commands:: - -* Formatting Documentation:: How to format and print GDB documentation -* Installing GDB:: Installing GDB - -* Index:: Index - - -File: gdb.info, Node: Summary, Next: New Features, Prev: Top, Up: Top - -Summary of GDB -************** - - The purpose of a debugger such as GDB is to allow you to see what is -going on "inside" another program while it executes--or what another -program was doing at the moment it crashed. - - GDB can do four main kinds of things (plus other things in support of -these) to help you catch bugs in the act: - - * Start your program, specifying anything that might affect its - behavior. - - * Make your program stop on specified conditions. - - * Examine what has happened, when your program has stopped. - - * Change things in your program, so you can experiment with - correcting the effects of one bug and go on to learn about another. - - You can use GDB to debug programs written in C, C++, and Modula-2. -G{No Value For "DBN"} can be used to debug programs written in Fortran, -although it does not yet support entering expressions, printing values, -etc. using Fortran syntax. It may be necessary to refer to some -variables with a trailing underscore. - -* Menu: - -* Free Software:: Freely redistributable software -* Contributors:: Contributors to GDB - - -File: gdb.info, Node: Free Software, Next: Contributors, Up: Summary - -Free software -============= - - GDB is "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 the -source code), and the freedom to distribute further copies. Typical -software companies use copyrights to limit your freedoms; the Free -Software Foundation uses the GPL to preserve these freedoms. - - Fundamentally, the General Public License is a license which says -that you have these freedoms and that you cannot take these freedoms -away from anyone else. - - -File: gdb.info, Node: Contributors, Prev: Free Software, Up: Summary - -Contributors to GDB -=================== - - Richard Stallman was the original author of GDB, and of many other -GNU programs. Many others have contributed to its development. This -section attempts to credit major contributors. One of the virtues of -free software is that everyone is free to contribute to it; with -regret, we cannot actually acknowledge everyone here. The file -`ChangeLog' in the GDB distribution approximates a blow-by-blow account. - - Changes much prior to version 2.0 are lost in the mists of time. - - *Plea:* Additions to this section are particularly welcome. If you - or your friends (or enemies, to be evenhanded) have been unfairly - omitted from this list, we would like to add your names! - - So that they may not regard their long labor as thankless, we -particularly thank those who shepherded GDB through major releases: Fred -Fish (releases 4.11, 4.10, 4.9), Stu Grossman and John Gilmore (releases -4.8, 4.7, 4.6, 4.5, 4.4), John Gilmore (releases 4.3, 4.2, 4.1, 4.0, and -3.9); Jim Kingdon (releases 3.5, 3.4, 3.3); and Randy Smith (releases -3.2, 3.1, 3.0). As major maintainer of GDB for some period, each -contributed significantly to the structure, stability, and capabilities -of the entire debugger. - - Richard Stallman, assisted at various times by Peter TerMaat, Chris -Hanson, and Richard Mlynarik, handled releases through 2.8. - - 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). - - GDB 4 uses the BFD subroutine library to examine multiple -object-file formats; BFD was a joint project of David V. -Henkel-Wallace, Rich Pixley, Steve Chamberlain, and John Gilmore. - - David Johnson wrote the original COFF support; Pace Willison did the -original support for encapsulated COFF. - - Adam de Boor and Bradley Davis contributed the ISI Optimum V support. -Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS -support. Jean-Daniel Fekete contributed Sun 386i support. Chris -Hanson improved the HP9000 support. Noboyuki Hikichi and Tomoyuki -Hasei contributed Sony/News OS 3 support. David Johnson contributed -Encore Umax support. Jyrki Kuoppala contributed Altos 3068 support. -Keith Packard contributed NS32K support. Doug Rabson contributed Acorn -Risc Machine support. Chris Smith contributed Convex support (and -Fortran debugging). Jonathan Stone contributed Pyramid support. -Michael Tiemann contributed SPARC support. Tim Tucker contributed -support for the Gould NP1 and Gould Powernode. Pace Willison -contributed Intel 386 support. Jay Vosburgh contributed Symmetry -support. - - Rich Schaefer and Peter Schauer helped with support of SunOS shared -libraries. - - Jay Fenlason and Roland McGrath ensured that GDB and GAS agree about -several machine instruction sets. - - Patrick Duval, Ted Goldstein, Vikram Koka and Glenn Engel helped -develop remote debugging. Intel Corporation and Wind River Systems -contributed remote debugging modules for their products. - - Brian Fox is the author of the readline libraries providing -command-line editing and command history. - - Andrew Beers of SUNY Buffalo wrote the language-switching code, the -Modula-2 support, and contributed the Languages chapter of this manual. - - Fred Fish wrote most of the support for Unix System Vr4. He also -enhanced the command-completion support to cover C++ overloaded symbols. - - Hitachi America, Ltd. sponsored the support for Hitachi -microprocessors. - - -File: gdb.info, Node: New Features, Next: Sample Session, Prev: Summary, Up: Top - -New Features since GDB Version 3.5 -********************************** - -*Targets* - Using the new command `target', you can select at runtime whether - you are debugging local files, local processes, standalone systems - over a serial port, realtime systems over a TCP/IP connection, - etc. The command `load' can download programs into a remote - system. Serial stubs are available for Motorola 680x0, Intel - 80386, and Sparc remote systems; GDB also supports debugging - realtime processes running under VxWorks, using SunRPC Remote - Procedure Calls over TCP/IP to talk to a debugger stub on the - target system. Internally, GDB now uses a function vector to - mediate access to different targets; if you need to add your own - support for a remote protocol, this makes it much easier. - -*Watchpoints* - GDB now sports watchpoints as well as breakpoints. You can use a - watchpoint to stop execution whenever the value of an expression - changes, without having to predict a particular place in your - program where this may happen. - -*Wide Output* - Commands that issue wide output now insert newlines at places - designed to make the output more readable. - -*Object Code Formats* - GDB uses a new library called the Binary File Descriptor (BFD) - Library to permit it to switch dynamically, without - reconfiguration or recompilation, between different object-file - formats. Formats currently supported are COFF, ELF, a.out, Intel - 960 b.out, MIPS ECOFF, HPPA SOM (with stabs debugging), and - S-records; files may be read as .o files, archive libraries, or - core dumps. BFD is available as a subroutine library so that - other programs may take advantage of it, and the other GNU binary - utilities are being converted to use it. - -*Configuration and Ports* - Compile-time configuration (to select a particular architecture and - operating system) is much easier. The script `configure' now - allows you to configure GDB as either a native debugger or a - cross-debugger. *Note Installing GDB::, for details on how to - configure. - -*Interaction* - The user interface to the GDB control variables is simpler, and is - consolidated in two commands, `set' and `show'. Output lines are - now broken at readable places, rather than overflowing onto the - next line. You can suppress output of machine-level addresses, - displaying only source language information. - -*C++* - GDB now supports C++ multiple inheritance (if used with a GCC - version 2 compiler), and also has limited support for C++ exception - handling, with the commands `catch' and `info catch': GDB can - break when an exception is raised, before the stack is peeled back - to the exception handler's context. - -*Modula-2* - GDB now has preliminary support for the GNU Modula-2 compiler, - currently under development at the State University of New York at - Buffalo. Coordinated development of both GDB and the GNU Modula-2 - compiler will continue. Other Modula-2 compilers are currently - not supported, and attempting to debug programs compiled with them - will likely result in an error as the symbol table of the - executable is read in. - -*Command Rationalization* - Many GDB commands have been renamed to make them easier to remember - and use. In particular, the subcommands of `info' and - `show'/`set' are grouped to make the former refer to the state of - your program, and the latter refer to the state of GDB itself. - *Note Renamed Commands::, for details on what commands were - renamed. - -*Shared Libraries* - GDB 4 can debug programs and core files that use SunOS, SVR4, or - IBM RS/6000 shared libraries. - -*Reference Card* - GDB 4 has a reference card. *Note Formatting the Documentation: - Formatting Documentation, for instructions about how to print it. - - -File: gdb.info, Node: Sample Session, Next: Invocation, Prev: New Features, Up: Top - -A Sample GDB Session -******************** - - You can use this manual at your leisure to read all about GDB. -However, a handful of commands are enough to get started using the -debugger. This chapter illustrates those commands. - - One of the preliminary versions of GNU `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 -definition within another stop working. In the following short `m4' -session, we define a macro `foo' which expands to `0000'; we then use -the `m4' built-in `defn' to define `bar' as the same thing. However, -when we change the open quote string to `<QUOTE>' and the close quote -string to `<UNQUOTE>', the same procedure fails to define a new synonym -`baz': - - $ cd gnu/m4 - $ ./m4 - define(foo,0000) - - foo - 0000 - define(bar,defn(`foo')) - - bar - 0000 - changequote(<QUOTE>,<UNQUOTE>) - - define(baz,defn(<QUOTE>foo<UNQUOTE>)) - baz - C-d - m4: End of input: 0: fatal error: EOF in string - -Let us use GDB to try to see what is going on. - - $ gdb m4 - GDB is free software and you are welcome to distribute copies - of it under certain conditions; type "show copying" to see - the conditions. - There is absolutely no warranty for GDB; type "show warranty" - for details. - GDB 4.11, Copyright 1993 Free Software Foundation, Inc... - (gdb) - -GDB 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 GDB to use a narrower display width than usual, so that examples -will fit in this manual. - - (gdb) set width 70 - -We need to see how the `m4' built-in `changequote' works. Having -looked at the source, we know the relevant subroutine is -`m4_changequote', so we set a breakpoint there with the GDB `break' -command. - - (gdb) break m4_changequote - Breakpoint 1 at 0x62f4: file builtin.c, line 879. - -Using the `run' command, we start `m4' running under GDB control; as -long as control does not reach the `m4_changequote' subroutine, the -program runs as usual: - - (gdb) run - Starting program: /work/Editorial/gdb/gnu/m4/m4 - define(foo,0000) - - foo - 0000 - -To trigger the breakpoint, we call `changequote'. GDB suspends -execution of `m4', displaying information about the context where it -stops. - - changequote(<QUOTE>,<UNQUOTE>) - - Breakpoint 1, m4_changequote (argc=3, argv=0x33c70) - at builtin.c:879 - 879 if (bad_argc(TOKEN_DATA_TEXT(argv[0]),argc,1,3)) - -Now we use the command `n' (`next') to advance execution to the next -line of the current function. - - (gdb) n - 882 set_quotes((argc >= 2) ? TOKEN_DATA_TEXT(argv[1])\ - : nil, - -`set_quotes' looks like a promising subroutine. We can go into it by -using the command `s' (`step') instead of `next'. `step' goes to the -next line to be executed in *any* subroutine, so it steps into -`set_quotes'. - - (gdb) s - set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>") - at input.c:530 - 530 if (lquote != def_lquote) - -The display that shows the subroutine where `m4' is now suspended (and -its arguments) is called a stack frame display. It shows a summary of -the stack. We can use the `backtrace' command (which can also be -spelled `bt'), to see where we are in the stack as a whole: the -`backtrace' command displays a stack frame for each active subroutine. - - (gdb) bt - #0 set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>") - at input.c:530 - #1 0x6344 in m4_changequote (argc=3, argv=0x33c70) - at builtin.c:882 - #2 0x8174 in expand_macro (sym=0x33320) at macro.c:242 - #3 0x7a88 in expand_token (obs=0x0, t=209696, td=0xf7fffa30) - at macro.c:71 - #4 0x79dc in expand_input () at macro.c:40 - #5 0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195 - -We will step through a few more lines to see what happens. The first -two times, we can use `s'; the next two times we use `n' to avoid -falling into the `xstrdup' subroutine. - - (gdb) s - 0x3b5c 532 if (rquote != def_rquote) - (gdb) s - 0x3b80 535 lquote = (lq == nil || *lq == '\0') ? \ - def_lquote : xstrdup(lq); - (gdb) n - 536 rquote = (rq == nil || *rq == '\0') ? def_rquote\ - : xstrdup(rq); - (gdb) n - 538 len_lquote = strlen(rquote); - -The last line displayed looks a little odd; we can examine the variables -`lquote' and `rquote' to see if they are in fact the new left and right -quotes we specified. We use the command `p' (`print') to see their -values. - - (gdb) p lquote - $1 = 0x35d40 "<QUOTE>" - (gdb) p rquote - $2 = 0x35d50 "<UNQUOTE>" - -`lquote' and `rquote' are indeed the new left and right quotes. To -look at some context, we can display ten lines of source surrounding -the current line with the `l' (`list') command. - - (gdb) l - 533 xfree(rquote); - 534 - 535 lquote = (lq == nil || *lq == '\0') ? def_lquote\ - : xstrdup (lq); - 536 rquote = (rq == nil || *rq == '\0') ? def_rquote\ - : xstrdup (rq); - 537 - 538 len_lquote = strlen(rquote); - 539 len_rquote = strlen(lquote); - 540 } - 541 - 542 void - -Let us step past the two lines that set `len_lquote' and `len_rquote', -and then examine the values of those variables. - - (gdb) n - 539 len_rquote = strlen(lquote); - (gdb) n - 540 } - (gdb) p len_lquote - $3 = 9 - (gdb) p len_rquote - $4 = 7 - -That certainly looks wrong, assuming `len_lquote' and `len_rquote' are -meant to be the lengths of `lquote' and `rquote' respectively. We can -set them to better values using the `p' command, since it can print the -value of any expression--and that expression can include subroutine -calls and assignments. - - (gdb) p len_lquote=strlen(lquote) - $5 = 7 - (gdb) p len_rquote=strlen(rquote) - $6 = 9 - -Is that enough to fix the problem of using the new quotes with the `m4' -built-in `defn'? We can allow `m4' to continue executing with the `c' -(`continue') command, and then try the example that caused trouble -initially: - - (gdb) c - Continuing. - - define(baz,defn(<QUOTE>foo<UNQUOTE>)) - - baz - 0000 - -Success! The new quotes now work just as well as the default ones. The -problem seems to have been just the two typos defining the wrong -lengths. We allow `m4' exit by giving it an EOF as input: - - C-d - Program exited normally. - -The message `Program exited normally.' is from GDB; it indicates `m4' -has finished executing. We can end our GDB session with the GDB `quit' -command. - - (gdb) quit - - -File: gdb.info, Node: Invocation, Next: Commands, Prev: Sample Session, Up: Top - -Getting In and Out of GDB -************************* - - This chapter discusses how to start GDB, and how to get out of it. -(The essentials: type `gdb' to start GDB, and type `quit' or `C-d' to -exit.) - -* Menu: - -* Invoking GDB:: How to start GDB -* Quitting GDB:: How to quit GDB -* Shell Commands:: How to use shell commands inside GDB - - -File: gdb.info, Node: Invoking GDB, Next: Quitting GDB, Up: Invocation - -Invoking GDB -============ - - Invoke GDB by running the program `gdb'. Once started, GDB reads -commands from the terminal until you tell it to exit. - - You can also run `gdb' with a variety of arguments and options, to -specify more of your debugging environment at the outset. - - 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. - - The most usual way to start GDB is with one argument, specifying an -executable program: - - gdb PROGRAM - -You can also start with both an executable program and a core file -specified: - - gdb PROGRAM CORE - - You can, instead, specify a process ID as a second argument, if you -want to debug a running process: - - gdb PROGRAM 1234 - -would attach GDB to process `1234' (unless you also have a file named -`1234'; GDB does check for a core file first). - - Taking advantage of the second command-line argument requires a -fairly complete operating system; when you use GDB 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. - -You can further control how GDB starts up by using command-line -options. GDB itself can remind you of the options available. - -Type - - gdb -help - -to display all available options and briefly describe their use (`gdb --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 `-x' option is -used. - -* Menu: - - - -* File Options:: Choosing files -* Mode Options:: Choosing modes - - -File: gdb.info, Node: File Options, Next: Mode Options, Up: Invoking GDB - -Choosing files --------------- - - When GDB 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 `-se' and `-c' -options respectively. (GDB reads the first argument that does not have -an associated option flag as equivalent to the `-se' option followed by -that argument; and the second argument that does not have an associated -option flag, if any, as equivalent to the `-c' option followed by that -argument.) - - Many options have both long and short forms; both are shown in the -following list. GDB 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 `--' rather than -`-', though we illustrate the more usual convention.) - -`-symbols FILE' -`-s FILE' - Read symbol table from file FILE. - -`-exec FILE' -`-e FILE' - Use file FILE as the executable file to execute when appropriate, - and for examining pure data in conjunction with a core dump. - -`-se FILE' - Read symbol table from file FILE and use it as the executable file. - -`-core FILE' -`-c FILE' - Use file FILE as a core dump to examine. - -`-c NUMBER' - Connect to process ID NUMBER, as with the `attach' command (unless - there is a file in core-dump format named NUMBER, in which case - `-c' specifies that file as a core dump to read). - -`-command FILE' -`-x FILE' - Execute GDB commands from file FILE. *Note Command files: Command - Files. - -`-directory DIRECTORY' -`-d DIRECTORY' - Add DIRECTORY to the path to search for source files. - -`-m' -`-mapped' - *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 - `mmap' system call, you can use this option to have GDB write the - symbols from your program into a reusable file in the current - directory. If the program you are debugging is called - `/tmp/fred', the mapped symbol file will be `./fred.syms'. Future - GDB 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 `.syms' file is specific to the host machine where GDB is run. - It holds an exact image of the internal GDB symbol table. It - cannot be shared across multiple host platforms. - -`-r' -`-readnow' - Read each symbol file's entire symbol table immediately, rather - than the default, which is to read it incrementally as it is - needed. This makes startup slower, but makes future operations - faster. - - The `-mapped' and `-readnow' options are typically combined in order -to build a `.syms' file that contains complete symbol information. -(*Note Commands to specify files: Files, for information on `.syms' -files.) A simple GDB invocation to do nothing but build a `.syms' file -for future use is: - - gdb -batch -nx -mapped -readnow programname - - -File: gdb.info, Node: Mode Options, Prev: File Options, Up: Invoking GDB - -Choosing modes --------------- - - You can run GDB in various alternative modes--for example, in batch -mode or quiet mode. - -`-nx' -`-n' - Do not execute commands from any initialization files (normally - called `.gdbinit'). Normally, the commands in these files are - executed after all the command options and arguments have been - processed. *Note Command files: Command Files. - -`-quiet' -`-q' - "Quiet". Do not print the introductory and copyright messages. - These messages are also suppressed in batch mode. - -`-batch' - Run in batch mode. Exit with status `0' after processing all the - command files specified with `-x' (and all commands from - initialization files, if not inhibited with `-n'). Exit with - nonzero status if an error occurs in executing the GDB commands in - the command files. - - Batch mode may be useful for running GDB as a filter, for example - to download and run a program on another computer; in order to - make this more useful, the message - - Program exited normally. - - (which is ordinarily issued whenever a program running under GDB - control terminates) is not issued when running in batch mode. - -`-cd DIRECTORY' - Run GDB using DIRECTORY as its working directory, instead of the - current directory. - -`-fullname' -`-f' - Emacs sets this option when it runs GDB as a subprocess. It tells - GDB 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 `\032' characters, followed by the file name, line - number and character position separated by colons, and a newline. - The Emacs-to-GDB interface program uses the two `\032' characters - as a signal to display the source code for the frame. - -`-b BPS' - Set the line speed (baud rate or bits per second) of any serial - interface used by GDB for remote debugging. - -`-tty DEVICE' - Run using DEVICE for your program's standard input and output. - - -File: gdb.info, Node: Quitting GDB, Next: Shell Commands, Prev: Invoking GDB, Up: Invocation - -Quitting GDB -============ - -`quit' - To exit GDB, use the `quit' command (abbreviated `q'), or type an - end-of-file character (usually `C-d'). - - An interrupt (often `C-c') will not exit from GDB, but rather will -terminate the action of any GDB command that is in progress and return -to GDB command level. It is safe to type the interrupt character at -any time because GDB does not allow it to take effect until a time when -it is safe. - - If you have been using GDB to control an attached process or device, -you can release it with the `detach' command (*note Debugging an -already-running process: Attach.). - - -File: gdb.info, Node: Shell Commands, Prev: Quitting GDB, Up: Invocation - -Shell commands -============== - - If you need to execute occasional shell commands during your -debugging session, there is no need to leave or suspend GDB; you can -just use the `shell' command. - -`shell COMMAND STRING' - Invoke a the standard shell to execute COMMAND STRING. If it - exists, the environment variable `SHELL' determines which shell to - run. Otherwise GDB uses `/bin/sh'. - - The utility `make' is often needed in development environments. You -do not have to use the `shell' command for this purpose in GDB: - -`make MAKE-ARGS' - Execute the `make' program with the specified arguments. This is - equivalent to `shell make MAKE-ARGS'. - - -File: gdb.info, Node: Commands, Next: Running, Prev: Invocation, Up: Top - -GDB Commands -************ - - You can abbreviate a GDB command to the first few letters of the -command name, if that abbreviation is unambiguous; and you can repeat -certain GDB commands by typing just RET. You can also use the TAB key -to get GDB to fill out the rest of a word in a command (or to show you -the alternatives available, if there is more than one possibility). - -* Menu: - -* Command Syntax:: How to give commands to GDB -* Completion:: Command completion -* Help:: How to ask GDB for help - - -File: gdb.info, Node: Command Syntax, Next: Completion, Up: Commands - -Command syntax -============== - - A GDB 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 `step' accepts an argument which is the number of times to -step, as in `step 5'. You can also use the `step' command with no -arguments. Some command names do not allow any arguments. - - GDB 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, `s' is specially defined as -equivalent to `step' even though there are other commands whose names -start with `s'. You can test abbreviations by using them as arguments -to the `help' command. - - A blank line as input to GDB (typing just RET) means to repeat the -previous command. Certain commands (for example, `run') will not repeat -this way; these are commands for which unintentional repetition might -cause trouble and which you are unlikely to want to repeat. - - The `list' and `x' commands, when you repeat them with RET, -construct new arguments rather than repeating exactly as typed. This -permits easy scanning of source or memory. - - GDB can also use RET in another way: to partition lengthy output, in -a way similar to the common utility `more' (*note Screen size: Screen -Size.). Since it is easy to press one RET too many in this situation, -GDB disables command repetition after any command that generates this -sort of display. - - Any text from a `#' to the end of the line is a comment; it does -nothing. This is useful mainly in command files (*note Command files: -Command Files.). - - -File: gdb.info, Node: Completion, Next: Help, Prev: Command Syntax, Up: Commands - -Command completion -================== - - GDB can fill in the rest of a word in a command for you, if there is -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 GDB -commands, GDB subcommands, and the names of symbols in your program. - - Press the TAB key whenever you want GDB to fill out the rest of a -word. If there is only one possibility, GDB will fill in the word, and -wait for you to finish the command (or press RET to enter it). For -example, if you type - - (gdb) info bre TAB - -GDB fills in the rest of the word `breakpoints', since that is the only -`info' subcommand beginning with `bre': - - (gdb) info breakpoints - -You can either press RET at this point, to run the `info breakpoints' -command, or backspace and enter something else, if `breakpoints' does -not look like the command you expected. (If you were sure you wanted -`info breakpoints' in the first place, you might as well just type RET -immediately after `info bre', to exploit command abbreviations rather -than command completion). - - If there is more than one possibility for the next word when you -press TAB, GDB will sound a bell. You can either supply more -characters and try again, or just press TAB a second time, and GDB 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 -`make_', but when you type `b make_TAB' GDB just sounds the bell. -Typing TAB again will display all the function names in your program -that begin with those characters, for example: - - (gdb) b make_ TAB -GDB sounds bell; press 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 - (gdb) b make_ - -After displaying the available possibilities, GDB copies your partial -input (`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 `M-?' rather than pressing TAB twice. `M-?' means `META -?'. You can type this either by holding down a key designated as the -META shift on your keyboard (if there is one) while typing `?', or as -ESC followed by `?'. - - Sometimes the string you need, while logically a "word", may contain -parentheses or other characters that GDB normally excludes from its -notion of a word. To permit word completion to work in this situation, -you may enclose words in `'' (single quote marks) in GDB 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 -(multiple definitions of the same function, distinguished by argument -type). For example, when you want to set a breakpoint you may need to -distinguish whether you mean the version of `name' that takes an `int' -parameter, `name(int)', or the version that takes a `float' parameter, -`name(float)'. To use the word-completion facilities in this -situation, type a single quote `'' at the beginning of the function -name. This alerts GDB that it may need to consider more information -than usual when you press TAB or `M-?' to request word completion: - - (gdb) b 'bubble( M-? - bubble(double,double) bubble(int,int) - (gdb) b 'bubble( - - In some cases, GDB can tell that completing a name will require -quotes. When this happens, GDB will insert the quote for you (while -completing as much as it can) if you do not type the quote in the first -place: - - (gdb) b bub TAB -GDB alters your input line to the following, and rings a bell: - (gdb) b 'bubble( - -In general, GDB 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. - - -File: gdb.info, Node: Help, Prev: Completion, Up: Commands - -Getting help -============ - - You can always ask GDB itself for information on its commands, using -the command `help'. - -`help' -`h' - You can use `help' (abbreviated `h') with no arguments to display - a short list of named classes of commands: - - (gdb) help - List of classes of commands: - - running -- Running the program - stack -- Examining the stack - data -- Examining data - breakpoints -- Making program stop at certain points - files -- Specifying and examining files - status -- Status inquiries - support -- Support facilities - user-defined -- User-defined commands - aliases -- Aliases of other commands - obscure -- Obscure features - - Type "help" followed by a class name for a list of - commands in that class. - Type "help" followed by command name for full - documentation. - Command name abbreviations are allowed if unambiguous. - (gdb) - -`help CLASS' - Using one of the general help classes as an argument, you can get a - list of the individual commands in that class. For example, here - is the help display for the class `status': - - (gdb) help status - Status inquiries. - - List of commands: - - show -- Generic command for showing things set - with "set" - info -- Generic command for printing status - - Type "help" followed by command name for full - documentation. - Command name abbreviations are allowed if unambiguous. - (gdb) - -`help COMMAND' - With a command name as `help' argument, GDB will display a short - paragraph on how to use that command. - - In addition to `help', you can use the GDB commands `info' and -`show' to inquire about the state of your program, or the state of GDB -itself. Each command supports many topics of inquiry; this manual -introduces each of them in the appropriate context. The listings under -`info' and under `show' in the Index point to all the sub-commands. -*Note Index::. - -`info' - This command (abbreviated `i') is for describing the state of your - program. For example, you can list the arguments given to your - program with `info args', list the registers currently in use with - `info registers', or list the breakpoints you have set with `info - breakpoints'. You can get a complete list of the `info' - sub-commands with `help info'. - -`show' - In contrast, `show' is for describing the state of GDB itself. - You can change most of the things you can `show', by using the - related command `set'; for example, you can control what number - system is used for displays with `set radix', or simply inquire - which is currently in use with `show radix'. - - To display all the settable parameters and their current values, - you can use `show' with no arguments; you may also use `info set'. - Both commands produce the same display. - - Here are three miscellaneous `show' subcommands, all of which are -exceptional in lacking corresponding `set' commands: - -`show version' - Show what version of GDB is running. You should include this - information in GDB bug-reports. If multiple versions of GDB are in - use at your site, you may occasionally want to determine which - version of GDB you are running; as GDB evolves, new commands are - introduced, and old ones may wither away. The version number is - also announced when you start GDB. - -`show copying' - Display information about permission for copying GDB. - -`show warranty' - Display the GNU "NO WARRANTY" statement. - - -File: gdb.info, Node: Running, Next: Stopping, Prev: Commands, Up: Top - -Running Programs Under GDB -************************** - - When you run a program under GDB, 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. - -* 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 - - -File: gdb.info, Node: Compilation, Next: Starting, Up: Running - -Compiling for debugging -======================= - - In order to debug a program effectively, you need to generate -debugging information when you compile it. This debugging information -is stored in the object file; it describes the data type of each -variable or function and the correspondence between source line numbers -and addresses in the executable code. - - To request debugging information, specify the `-g' option when you -run the compiler. - - Many C compilers are unable to handle the `-g' and `-O' options -together. Using those compilers, you cannot generate optimized -executables containing debugging information. - - GCC, the GNU C compiler, supports `-g' with or without `-O', making -it possible to debug optimized code. We recommend that you *always* -use `-g' whenever you compile a program. You may think your program is -correct, but there is no sense in pushing your luck. - - When you debug a program compiled with `-g -O', remember that the -optimizer is rearranging your code; the debugger will show you what is -really there. Do not be too surprised when the execution path does not -exactly match your source file! An extreme example: if you define a -variable, but never use it, GDB will never see that variable--because -the compiler optimizes it out of existence. - - Some things do not work as well with `-g -O' as with just `-g', -particularly on machines with instruction scheduling. If in doubt, -recompile with `-g' alone, and if this fixes the problem, please report -it as a bug (including a test case!). - - Older versions of the GNU C compiler permitted a variant option -`-gg' for debugging information. GDB no longer supports this format; -if your GNU C compiler has this option, do not use it. - - -File: gdb.info, Node: Starting, Next: Arguments, Prev: Compilation, Up: Running - -Starting your program -===================== - -`run' -`r' - Use the `run' command to start your program under GDB. You must - first specify the program name (except on VxWorks) with an - argument to GDB (*note Getting In and Out of GDB: Invocation.), or - by using the `file' or `exec-file' command (*note Commands to - specify files: Files.). - - If you are running your program in an execution environment that -supports processes, `run' creates an inferior process and makes that -process run your program. (In environments without processes, `run' -jumps to the start of your program.) - - The execution of a program is affected by certain information it -receives from its superior. GDB provides ways to specify this -information, which you must do *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 divided into four categories: - -The *arguments.* - Specify the arguments to give your program as the arguments of the - `run' command. If a shell is available on your target, the shell - is used to pass the arguments, so that you may use normal - conventions (such as wildcard expansion or variable substitution) - in describing the arguments. In Unix systems, you can control - which shell is used with the `SHELL' environment variable. *Note - Your program's arguments: Arguments. - -The *environment.* - Your program normally inherits its environment from GDB, but you - can use the GDB commands `set environment' and `unset environment' - to change parts of the environment that will be given to your - program. *Note Your program's environment: Environment. - -The *working directory.* - Your program inherits its working directory from GDB. You can set - the GDB working directory with the `cd' command in GDB. *Note - Your program's working directory: Working Directory. - -The *standard input and output.* - Your program normally uses the same device for standard input and - standard output as GDB is using. You can redirect input and output - in the `run' command line, or you can use the `tty' command to set - a different device for your program. *Note Your program's input - and output: Input/Output. - - *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, GDB is likely to wind up - debugging the wrong program. - - When you issue the `run' command, your program begins to execute -immediately. *Note Stopping and continuing: Stopping, for discussion -of how to arrange for your program to stop. Once your program has -stopped, you may call functions in your program, using the `print' or -`call' commands. *Note Examining Data: Data. - - If the modification time of your symbol file has changed since the -last time GDB read its symbols, GDB will discard its symbol table and -re-read it. When it does this, GDB tries to retain your current -breakpoints. - - -File: gdb.info, Node: Arguments, Next: Environment, Prev: Starting, Up: Running - -Your program's arguments -======================== - - The arguments to your program can be specified by the arguments of -the `run' command. They are passed to a shell, which expands wildcard -characters and performs redirection of I/O, and thence to your program. -Your `SHELL' environment variable (if it exists) specifies what shell -GDB if you do not define `SHELL', GDB uses `/bin/sh'. - - `run' with no arguments uses the same arguments used by the previous -`run', or those set by the `set args' command. - -`set args' - Specify the arguments to be used the next time your program is - run. If `set args' has no arguments, `run' will execute your - program with no arguments. Once you have run your program with - arguments, using `set args' before the next `run' is the only way - to run it again without arguments. - -`show args' - Show the arguments to give your program when it is started. - - -File: gdb.info, Node: Environment, Next: Working Directory, Prev: Arguments, Up: Running - -Your program's environment -========================== - - The "environment" consists of a set of environment variables and -their values. Environment variables conventionally record such things -as your user name, your home directory, your terminal type, and your -search 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 GDB over -again. - -`path DIRECTORY' - Add DIRECTORY to the front of the `PATH' environment variable (the - search path for executables), for both GDB and your program. You - may specify several directory names, separated by `:' or - whitespace. If DIRECTORY is already in the path, it is moved to - the front, so it will be searched sooner. - - You can use the string `$cwd' to refer to whatever is the current - working directory at the time GDB searches the path. If you use - `.' instead, it refers to the directory where you executed the - `path' command. GDB replaces `.' in the DIRECTORY argument (with - the current path) before adding DIRECTORY to the search path. - -`show paths' - Display the list of search paths for executables (the `PATH' - environment variable). - -`show environment [VARNAME]' - Print the value of environment variable VARNAME to be given to - your program when it starts. If you do not supply VARNAME, print - the names and values of all environment variables to be given to - your program. You can abbreviate `environment' as `env'. - -`set environment VARNAME [=] VALUE' - Set environment variable VARNAME to VALUE. The value changes for - your program only, not for GDB itself. VALUE may be any string; - the values of environment variables are just strings, and any - interpretation is supplied by your program itself. The VALUE - parameter is optional; if it is eliminated, the variable is set to - a null value. - - For example, this command: - - set env USER = foo - - tells a Unix program, when subsequently run, that its user is named - `foo'. (The spaces around `=' are used for clarity here; they are - not actually required.) - -`unset environment VARNAME' - Remove variable VARNAME from the environment to be passed to your - program. This is different from `set env VARNAME ='; `unset - environment' removes the variable from the environment, rather - than assigning it an empty value. - - *Warning:* GDB runs your program using the shell indicated by your -`SHELL' environment variable if it exists (or `/bin/sh' if not). If -your `SHELL' variable names a shell that runs an initialization -file--such as `.cshrc' for C-shell, or `.bashrc' for BASH--any -variables you set in that file will affect your program. You may wish -to move setting of environment variables to files that are only run -when you sign on, such as `.login' or `.profile'. - - -File: gdb.info, Node: Working Directory, Next: Input/Output, Prev: Environment, Up: Running - -Your program's working directory -================================ - - Each time you start your program with `run', it inherits its working -directory from the current working directory of GDB. The GDB working -directory is initially whatever it inherited from its parent process -(typically the shell), but you can specify a new working directory in -GDB with the `cd' command. - - The GDB working directory also serves as a default for the commands -that specify files for GDB to operate on. *Note Commands to specify -files: Files. - -`cd DIRECTORY' - Set the GDB working directory to DIRECTORY. - -`pwd' - Print the GDB working directory. - - -File: gdb.info, Node: Input/Output, Next: Attach, Prev: Working Directory, Up: Running - -Your program's input and output -=============================== - - By default, the program you run under GDB does input and output to -the same terminal that GDB uses. GDB 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. - -`info terminal' - Displays information recorded by GDB about the terminal modes your - program is using. - - You can redirect your program's input and/or output using shell -redirection with the `run' command. For example, - - run > outfile - -starts your program, diverting its output to the file `outfile'. - - Another way to specify where your program should do input and output -is with the `tty' command. This command accepts a file name as -argument, and causes this file to be the default for future `run' -commands. It also resets the controlling terminal for the child -process, for future `run' commands. For example, - - tty /dev/ttyb - -directs that processes started with subsequent `run' commands default -to do input and output on the terminal `/dev/ttyb' and have that as -their controlling terminal. - - An explicit redirection in `run' overrides the `tty' command's -effect on the input/output device, but not its effect on the controlling -terminal. - - When you use the `tty' command or redirect input in the `run' -command, only the input *for your program* is affected. The input for -GDB still comes from your terminal. - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-2 b/gnu/usr.bin/gdb/doc/gdb.info-2 deleted file mode 100644 index e8be2fa..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-2 +++ /dev/null @@ -1,1165 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Attach, Next: Kill Process, Prev: Input/Output, Up: Running - -Debugging an already-running process -==================================== - -`attach PROCESS-ID' - This command attaches to a running process--one that was started - outside GDB. (`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 `ps' utility, or with - the `jobs -l' shell command. - - `attach' will not repeat if you press RET a second time after - executing the command. - - To use `attach', your program must be running in an environment -which supports processes; for example, `attach' does not work for -programs on bare-board targets that lack an operating system. You must -also have permission to send the process a signal. - - When using `attach', you should first use the `file' command to -specify the program running in the process and load its symbol table. -*Note Commands to Specify Files: Files. - - The first thing GDB does after arranging to debug the specified -process is to stop it. You can examine and modify an attached process -with all the GDB commands that are ordinarily available when you start -processes with `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 `continue' command after attaching -GDB to the process. - -`detach' - When you have finished debugging the attached process, you can use - the `detach' command to release it from GDB control. Detaching - the process continues its execution. After the `detach' command, - that process and GDB become completely independent once more, and - you are ready to `attach' another process or start one with `run'. - `detach' will not repeat if you press RET again after executing - the command. - - If you exit GDB or use the `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 `set confirm' command -(*note Optional warnings and messages: Messages/Warnings.). - - -File: gdb.info, Node: Kill Process, Next: Process Information, Prev: Attach, Up: Running - -Killing the child process -========================= - -`kill' - Kill the child process in which your program is running under GDB. - - This command is useful if you wish to debug a core dump instead of a -running process. GDB ignores any core dump file while your program is -running. - - On some operating systems, a program cannot be executed outside GDB -while you have breakpoints set on it inside GDB. You can use the -`kill' command in this situation to permit running your program outside -the debugger. - - The `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 `run', GDB will notice that the file has changed, and -will re-read the symbol table (while trying to preserve your current -breakpoint settings). - - -File: gdb.info, Node: Process Information, Prev: Kill Process, Up: Running - -Additional process information -============================== - - Some operating systems provide a facility called `/proc' that can be -used to examine the image of a running process using file-system -subroutines. If GDB is configured for an operating system with this -facility, the command `info proc' is available to report on several -kinds of information about the process running your program. - -`info proc' - Summarize available information about the process. - -`info proc mappings' - Report on the address ranges accessible in the program, with - information on whether your program may read, write, or execute - each range. - -`info proc times' - Starting time, user CPU time, and system CPU time for your program - and its children. - -`info proc id' - Report on the process IDs related to your program: its own process - ID, the ID of its parent, the process group ID, and the session ID. - -`info proc status' - General information on the state of the process. If the process is - stopped, this report includes the reason for stopping, and any - signal received. - -`info proc all' - Show all the above information about the process. - - -File: gdb.info, Node: Stopping, Next: Stack, Prev: Running, Up: Top - -Stopping and Continuing -*********************** - - The principal purposes of using a debugger are so that you can stop -your program before it terminates; or so that, if your program runs into -trouble, you can investigate and find out why. - - Inside GDB, your program may stop for any of several reasons, such as -a signal, a breakpoint, or reaching a new line after a GDB command such -as `step'. You may then examine and change variables, set new -breakpoints or remove old ones, and then continue execution. Usually, -the messages shown by GDB provide ample explanation of the status of -your program--but you can also explicitly request this information at -any time. - -`info program' - Display information about the status of your program: whether it is - running or not, what process it is, and why it stopped. - -* Menu: - - -* Breakpoints:: Breakpoints, watchpoints, and exceptions - - -* Continuing and Stepping:: Resuming execution - -* Signals:: Signals - - -File: gdb.info, Node: Breakpoints, Next: Continuing and Stepping, Up: Stopping - -Breakpoints, watchpoints, and exceptions -======================================== - - A "breakpoint" makes your program stop whenever a certain point in -the program is reached. For each breakpoint, you can add various -conditions to control in finer detail whether your program will stop. -You can set breakpoints with the `break' command and its variants -(*note Setting breakpoints: Set Breaks.), to specify the place where -your program should stop by line number, function name or exact address -in the program. In languages with exception handling (such as GNU -C++), you can also set breakpoints where an exception is raised (*note -Breakpoints and exceptions: Exception Handling.). - - A "watchpoint" is a special breakpoint that stops your program when -the value of an expression changes. You must use a different command -to set watchpoints (*note Setting watchpoints: Set Watchpoints.), but -aside from that, you can manage a watchpoint like any other breakpoint: -you enable, disable, and delete both breakpoints and watchpoints using -the same commands. - - You can arrange to have values from your program displayed -automatically whenever GDB stops at a breakpoint. *Note Automatic -display: Auto Display. - - GDB 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. -Each breakpoint may be "enabled" or "disabled"; if disabled, it has no -effect on your program until you enable it again. - -* Menu: - -* Set Breaks:: Setting breakpoints -* Set Watchpoints:: Setting watchpoints - -* Exception Handling:: Breakpoints and exceptions - -* Delete Breaks:: Deleting breakpoints -* Disabling:: Disabling breakpoints -* Conditions:: Break conditions -* Break Commands:: Breakpoint command lists - -* Breakpoint Menus:: Breakpoint menus - -* Error in Breakpoints:: "Cannot insert breakpoints" - - -File: gdb.info, Node: Set Breaks, Next: Set Watchpoints, Up: Breakpoints - -Setting breakpoints -------------------- - - Breakpoints are set with the `break' command (abbreviated `b'). The -debugger convenience variable `$bpnum' records the number of the -beakpoint you've set most recently; see *Note Convenience variables: -Convenience Vars, for a discussion of what you can do with convenience -variables. - - You have several ways to say where the breakpoint should go. - -`break FUNCTION' - Set a breakpoint at entry to function FUNCTION. When using source - languages that permit overloading of symbols, such as C++, - FUNCTION may refer to more than one possible place to break. - *Note Breakpoint menus: Breakpoint Menus, for a discussion of that - situation. - -`break +OFFSET' -`break -OFFSET' - Set a breakpoint some number of lines forward or back from the - position at which execution stopped in the currently selected - frame. - -`break LINENUM' - Set a breakpoint at line LINENUM in the current source file. That - file is the last file whose source text was printed. This - breakpoint will stop your program just before it executes any of - the code on that line. - -`break FILENAME:LINENUM' - Set a breakpoint at line LINENUM in source file FILENAME. - -`break FILENAME:FUNCTION' - Set a breakpoint at entry to function FUNCTION found in file - FILENAME. Specifying a file name as well as a function name is - superfluous except when multiple files contain similarly named - functions. - -`break *ADDRESS' - Set a breakpoint at address ADDRESS. You can use this to set - breakpoints in parts of your program which do not have debugging - information or source files. - -`break' - When called without any arguments, `break' sets a breakpoint at - the next instruction to be executed in the selected stack frame - (*note Examining the Stack: Stack.). In any selected frame but the - innermost, this will cause your program to stop as soon as control - returns to that frame. This is similar to the effect of a - `finish' command in the frame inside the selected frame--except - that `finish' does not leave an active breakpoint. If you use - `break' without an argument in the innermost frame, GDB will stop - the next time it reaches the current location; this may be useful - inside loops. - - GDB 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 existed when your program stopped. - -`break ... if COND' - Set a breakpoint with condition COND; evaluate the expression COND - each time the breakpoint is reached, and stop only if the value is - nonzero--that is, if COND evaluates as true. `...' stands for one - of the possible arguments described above (or no argument) - specifying where to break. *Note Break conditions: Conditions, - for more information on breakpoint conditions. - -`tbreak ARGS' - Set a breakpoint enabled only for one stop. ARGS are the same as - for the `break' command, and the breakpoint is set in the same - way, but the breakpoint is automatically disabled after the first - time your program stops there. *Note Disabling breakpoints: - Disabling. - -`rbreak REGEX' - Set breakpoints on all functions matching the regular expression - REGEX. This command sets an unconditional breakpoint on all - matches, printing a list of all breakpoints it set. Once these - breakpoints are set, they are treated just like the breakpoints - set with the `break' command. They can be deleted, disabled, made - conditional, etc., in the standard ways. - - When debugging C++ programs, `rbreak' is useful for setting - breakpoints on overloaded functions that are not members of any - special classes. - -`info breakpoints [N]' -`info break [N]' -`info watchpoints [N]' - Print a table of all breakpoints and watchpoints set and not - deleted, with the following columns for each breakpoint: - - *Breakpoint Numbers* - *Type* - Breakpoint or watchpoint. - - *Disposition* - Whether the breakpoint is marked to be disabled or deleted - when hit. - - *Enabled or Disabled* - Enabled breakpoints are marked with `y'. `n' marks - breakpoints that are not enabled. - - *Address* - Where the breakpoint is in your program, as a memory address - - *What* - Where the breakpoint is in the source for your program, as a - file and line number. - - If a breakpoint is conditional, `info break' shows the condition on - the line following the affected breakpoint; breakpoint commands, - if any, are listed after that. - - `info break' with a breakpoint number N as argument lists only - that breakpoint. The convenience variable `$_' and the default - examining-address for the `x' command are set to the address of - the last breakpoint listed (*note Examining memory: Memory.). - - GDB 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 (*note Break -conditions: Conditions.). - - GDB itself sometimes sets breakpoints in your program for special -purposes, such as proper handling of `longjmp' (in C programs). These -internal breakpoints are assigned negative numbers, starting with `-1'; -`info breakpoints' does not display them. - - You can see these breakpoints with the GDB maintenance command -`maint info breakpoints'. - -`maint info breakpoints' - Using the same format as `info breakpoints', display both the - breakpoints you've set explicitly, and those GDB is using for - internal purposes. Internal breakpoints are shown with negative - breakpoint numbers. The type column identifies what kind of - breakpoint is shown: - - `breakpoint' - Normal, explicitly set breakpoint. - - `watchpoint' - Normal, explicitly set watchpoint. - - `longjmp' - Internal breakpoint, used to handle correctly stepping through - `longjmp' calls. - - `longjmp resume' - Internal breakpoint at the target of a `longjmp'. - - `until' - Temporary internal breakpoint used by the GDB `until' command. - - `finish' - Temporary internal breakpoint used by the GDB `finish' - command. - - -File: gdb.info, Node: Set Watchpoints, Next: Exception Handling, Prev: Set Breaks, Up: Breakpoints - -Setting watchpoints -------------------- - - You can use a watchpoint to stop execution whenever the value of an -expression changes, without having to predict a particular place where -this may happen. - - Watchpoints currently execute two orders of magnitude more slowly -than other breakpoints, but this can be well 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 GDB will use such hardware if it is available. - -`watch EXPR' - Set a watchpoint for an expression. - -`info watchpoints' - This command prints a list of watchpoints and breakpoints; it is - the same as `info break'. - - -File: gdb.info, Node: Exception Handling, Next: Delete Breaks, Prev: Set Watchpoints, Up: Breakpoints - -Breakpoints and exceptions --------------------------- - - Some languages, such as GNU C++, implement exception handling. You -can use GDB 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. - -`catch EXCEPTIONS' - You can set breakpoints at active exception handlers by using the - `catch' command. EXCEPTIONS is a list of names of exceptions to - catch. - - You can use `info catch' to list active exception handlers. *Note -Information about a frame: Frame Info. - - There are currently some limitations to exception handling in GDB. -These will be corrected in a future release. - - * If you call a function interactively, GDB 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 - GDB is listening for, or exits. - - * You cannot raise an exception interactively. - - * You cannot interactively install an exception handler. - - Sometimes `catch' is not the best way to debug exception handling: -if you need to know exactly where an exception is raised, it is better -to stop *before* the exception handler is called, since that way you -can see the stack before any unwinding takes place. If you set a -breakpoint in an exception handler instead, it may not be easy to find -out where the exception was raised. - - To stop just before an exception handler is called, you need some -knowledge of the implementation. In the case of GNU C++, exceptions are -raised by calling a library function named `__raise_exception' which -has the following ANSI C interface: - - /* ADDR is where the exception identifier is stored. - ID is the exception identifier. */ - void __raise_exception (void **ADDR, void *ID); - -To make the debugger catch all exceptions before any stack unwinding -takes place, set a breakpoint on `__raise_exception' (*note -Breakpoints; watchpoints; and exceptions: Breakpoints.). - - With a conditional breakpoint (*note Break conditions: Conditions.) -that depends on the value of 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. - - -File: gdb.info, Node: Delete Breaks, Next: Disabling, Prev: Exception Handling, Up: Breakpoints - -Deleting breakpoints --------------------- - - It is often necessary to eliminate a breakpoint or watchpoint once it -has done its job and you no longer want your program to stop there. -This is called "deleting" the breakpoint. A breakpoint that has been -deleted no longer exists; it is forgotten. - - With the `clear' command you can delete breakpoints according to -where they are in your program. With the `delete' command you can -delete individual breakpoints or watchpoints by specifying their -breakpoint numbers. - - It is not necessary to delete a breakpoint to proceed past it. GDB -automatically ignores breakpoints on the first instruction to be -executed when you continue execution without changing the execution -address. - -`clear' - Delete any breakpoints at the next instruction to be executed in - the selected stack frame (*note Selecting a frame: Selection.). - When the innermost frame is selected, this is a good way to delete - a breakpoint where your program just stopped. - -`clear FUNCTION' -`clear FILENAME:FUNCTION' - Delete any breakpoints set at entry to the function FUNCTION. - -`clear LINENUM' -`clear FILENAME:LINENUM' - Delete any breakpoints set at or within the code of the specified - line. - -`delete [breakpoints] [BNUMS...]' - Delete the breakpoints or watchpoints of the numbers specified as - arguments. If no argument is specified, delete all breakpoints - (GDB asks confirmation, unless you have `set confirm off'). You - can abbreviate this command as `d'. - - -File: gdb.info, Node: Disabling, Next: Conditions, Prev: Delete Breaks, Up: Breakpoints - -Disabling breakpoints ---------------------- - - Rather than deleting a breakpoint or watchpoint, you might prefer to -"disable" it. This makes the breakpoint inoperative as if it had been -deleted, but remembers the information on the breakpoint so that you -can "enable" it again later. - - You disable and enable breakpoints and watchpoints with the `enable' -and `disable' commands, optionally specifying one or more breakpoint -numbers as arguments. Use `info break' or `info watch' to print a list -of breakpoints or watchpoints if you do not know which numbers to use. - - A breakpoint or watchpoint can have any of four different states of -enablement: - - * Enabled. The breakpoint will stop your program. A breakpoint set - with the `break' command starts out in this state. - - * Disabled. The breakpoint has no effect on your program. - - * Enabled once. The breakpoint will stop your program, but when it - does so it will become disabled. A breakpoint set with the - `tbreak' command starts out in this state. - - * Enabled for deletion. The breakpoint will stop your program, but - immediately after it does so it will be deleted permanently. - - You can use the following commands to enable or disable breakpoints -and watchpoints: - -`disable [breakpoints] [BNUMS...]' - Disable the specified breakpoints--or all breakpoints, if none are - listed. A disabled breakpoint has no effect but is not forgotten. - All options such as ignore-counts, conditions and commands are - remembered in case the breakpoint is enabled again later. You may - abbreviate `disable' as `dis'. - -`enable [breakpoints] [BNUMS...]' - Enable the specified breakpoints (or all defined breakpoints). - They become effective once again in stopping your program. - -`enable [breakpoints] once BNUMS...' - Enable the specified breakpoints temporarily. Each will be - disabled again the next time it stops your program. - -`enable [breakpoints] delete BNUMS...' - Enable the specified breakpoints to work once and then die. Each - of the breakpoints will be deleted the next time it stops your - program. - - Save for a breakpoint set with `tbreak' (*note Setting breakpoints: -Set Breaks.), breakpoints that you set are initially enabled; -subsequently, they become disabled or enabled only when you use one of -the commands above. (The command `until' can set and delete a -breakpoint of its own, but it will not change the state of your other -breakpoints; see *Note Continuing and stepping: Continuing and -Stepping.) - - -File: gdb.info, Node: Conditions, Next: Break Commands, Prev: Disabling, Up: Breakpoints - -Break conditions ----------------- - - The simplest sort of breakpoint breaks every time your program -reaches a specified place. You can also specify a "condition" for a -breakpoint. A condition is just a Boolean expression in your -programming language (*note Expressions: Expressions.). A breakpoint -with a condition evaluates the expression each time your program -reaches it, and your program stops only if the condition is *true*. - - This is the converse of using assertions for program validation; in -that situation, you want to stop when the assertion is violated--that -is, when the condition is false. In C, if you want to test an -assertion expressed by the condition ASSERT, you should set the -condition `! ASSERT' on the appropriate breakpoint. - - Conditions are also accepted for watchpoints; you may not need them, -since a watchpoint is inspecting the value of an expression anyhow--but -it might be simpler, say, to just set a watchpoint on a variable name, -and specify a condition that tests whether the new value is an -interesting one. - - Break conditions can have side effects, and may even call functions -in your program. This can be useful, for example, to activate functions -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, GDB 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 (*note Breakpoint -command lists: Break Commands.). - - Break conditions can be specified when a breakpoint is set, by using -`if' in the arguments to the `break' command. *Note Setting -breakpoints: Set Breaks. They can also be changed at any time with the -`condition' command. The `watch' command does not recognize the `if' -keyword; `condition' is the only way to impose a further condition on a -watchpoint. - -`condition BNUM EXPRESSION' - Specify EXPRESSION as the break condition for breakpoint or - watchpoint number BNUM. From now on, this breakpoint will stop - your program only if the value of EXPRESSION is true (nonzero, in - C). When you use `condition', GDB checks EXPRESSION immediately - for syntactic correctness, and to determine whether symbols in it - have referents in the context of your breakpoint. GDB does not - actually evaluate EXPRESSION at the time the `condition' command - is given, however. *Note Expressions: Expressions. - -`condition BNUM' - Remove the condition from breakpoint number BNUM. It becomes an - ordinary unconditional breakpoint. - - A special case of a breakpoint condition is to stop only when the -breakpoint has been reached a certain number of times. This is so -useful that there is a special way to do it, using the "ignore count" -of the breakpoint. Every breakpoint has an ignore count, which is an -integer. Most of the time, the ignore count is zero, and therefore has -no effect. But if your program reaches a breakpoint whose ignore count -is positive, then instead of stopping, it just decrements the ignore -count by one and continues. As a result, if the ignore count value is -N, the breakpoint will not stop the next N times it is reached. - -`ignore BNUM COUNT' - Set the ignore count of breakpoint number BNUM to COUNT. The next - COUNT times the breakpoint is reached, your program's execution - will not stop; other than to decrement the ignore count, GDB takes - no action. - - To make the breakpoint stop the next time it is reached, specify a - count of zero. - - When you use `continue' to resume execution of your program from a - breakpoint, you can specify an ignore count directly as an - argument to `continue', rather than using `ignore'. *Note - Continuing and stepping: Continuing and Stepping. - - If a breakpoint has a positive ignore count and a condition, the - condition is not checked. Once the ignore count reaches zero, the - condition will be checked. - - You could achieve the effect of the ignore count with a condition - such as `$foo-- <= 0' using a debugger convenience variable that - is decremented each time. *Note Convenience variables: - Convenience Vars. - - -File: gdb.info, Node: Break Commands, Next: Breakpoint Menus, Prev: Conditions, Up: Breakpoints - -Breakpoint command lists ------------------------- - - You can give any breakpoint (or watchpoint) a series of commands to -execute when your program stops due to that breakpoint. For example, -you might want to print the values of certain expressions, or enable -other breakpoints. - -`commands [BNUM]' -`... COMMAND-LIST ...' -`end' - Specify a list of commands for breakpoint number BNUM. The - commands themselves appear on the following lines. Type a line - containing just `end' to terminate the commands. - - To remove all commands from a breakpoint, type `commands' and - follow it immediately with `end'; that is, give no commands. - - With no BNUM argument, `commands' refers to the last breakpoint or - watchpoint set (not to the breakpoint most recently encountered). - - Pressing RET as a means of repeating the last GDB command is -disabled within a COMMAND-LIST. - - You can use breakpoint commands to start your program up again. -Simply use the `continue' command, or `step', or any other command that -resumes execution. - - Any other commands in the command list, after a command that resumes -execution, are ignored. This is because any time you resume execution -(even with a simple `next' or `step'), you may encounter another -breakpoint--which could have its own command list, leading to -ambiguities about which list to execute. - - If the first command you specify in a command list is `silent', the -usual message about stopping at a breakpoint is not printed. This may -be desirable for breakpoints that are to print a specific message and -then continue. If none of the remaining commands print anything, you -will see no sign that the breakpoint was reached. `silent' is -meaningful only at the beginning of a breakpoint command list. - - The commands `echo', `output', and `printf' allow you to print -precisely controlled output, and are often useful in silent -breakpoints. *Note Commands for controlled output: Output. - - For example, here is how you could use breakpoint commands to print -the value of `x' at entry to `foo' whenever `x' is positive. - - break foo if x>0 - commands - silent - printf "x is %d\n",x - cont - end - - 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 of code, give it a condition to detect the case in which something -erroneous has been done, and give it commands to assign correct values -to any variables that need them. End with the `continue' command so -that your program does not stop, and start with the `silent' command so -that no output is produced. Here is an example: - - break 403 - commands - silent - set x = y + 4 - cont - end - - -File: gdb.info, Node: Breakpoint Menus, Next: Error in Breakpoints, Prev: Break Commands, Up: Breakpoints - -Breakpoint menus ----------------- - - Some programming languages (notably C++) permit a single function -name to be defined several times, for application in different contexts. -This is called "overloading". When a function name is overloaded, -`break FUNCTION' is not enough to tell GDB where you want a breakpoint. -If you realize this will be a problem, you can use something like -`break FUNCTION(TYPES)' to specify which particular version of the -function you want. Otherwise, GDB offers you a menu of numbered -choices for different possible breakpoints, and waits for your -selection with the prompt `>'. The first two options are always `[0] -cancel' and `[1] all'. Typing `1' sets a breakpoint at each definition -of FUNCTION, and typing `0' aborts the `break' command without setting -any new breakpoints. - - For example, the following session excerpt shows an attempt to set a -breakpoint at the overloaded symbol `String::after'. We choose three -particular definitions of that function name: - - (gdb) b String::after - [0] cancel - [1] all - [2] file:String.cc; line number:867 - [3] file:String.cc; line number:860 - [4] file:String.cc; line number:875 - [5] file:String.cc; line number:853 - [6] file:String.cc; line number:846 - [7] file:String.cc; line number:735 - > 2 4 6 - Breakpoint 1 at 0xb26c: file String.cc, line 867. - Breakpoint 2 at 0xb344: file String.cc, line 875. - Breakpoint 3 at 0xafcc: file String.cc, line 846. - Multiple breakpoints were set. - Use the "delete" command to delete unwanted - breakpoints. - (gdb) - - -File: gdb.info, Node: Error in Breakpoints, Prev: Breakpoint Menus, Up: Breakpoints - -"Cannot insert breakpoints" ---------------------------- - - 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 GDB to stop the other process. - - When this happens, you have three ways to proceed: - - 1. Remove or disable the breakpoints, then continue. - - 2. Suspend GDB, and copy the file containing your program to a new - name. Resume GDB and use the `exec-file' command to specify that - GDB should run your program under that name. Then start your - program again. - - 3. Relink your program so that the text segment is nonsharable, using - the linker option `-N'. The operating system limitation may not - apply to nonsharable executables. - - -File: gdb.info, Node: Continuing and Stepping, Next: Signals, Prev: Breakpoints, Up: Stopping - -Continuing and stepping -======================= - - "Continuing" means resuming program execution until your program -completes normally. In contrast, "stepping" means executing just one -more "step" of your program, where "step" may mean either one 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 a breakpoint or a signal. (If due -to a signal, you may want to use `handle', or use `signal 0' to resume -execution. *Note Signals: Signals.) - -`continue [IGNORE-COUNT]' -`c [IGNORE-COUNT]' -`fg [IGNORE-COUNT]' - Resume program execution, at the address where your program last - stopped; any breakpoints set at that address are bypassed. The - optional argument IGNORE-COUNT allows you to specify a further - number of times to ignore a breakpoint at this location; its - effect is like that of `ignore' (*note Break conditions: - Conditions.). - - The argument IGNORE-COUNT is meaningful only when your program - stopped due to a breakpoint. At other times, the argument to - `continue' is ignored. - - The synonyms `c' and `fg' are provided purely for convenience, and - have exactly the same behavior as `continue'. - - To resume execution at a different place, you can use `return' -(*note Returning from a function: Returning.) to go back to the calling -function; or `jump' (*note Continuing at a different address: Jumping.) -to go to an arbitrary location in your program. - - A typical technique for using stepping is to set a breakpoint (*note -Breakpoints; watchpoints; and exceptions: Breakpoints.) at the -beginning of the function or the section of your program where a -problem is believed to lie, run your program until it stops at that -breakpoint, and then step through the suspect area, examining the -variables that are interesting, until you see the problem happen. - -`step' - Continue running your program until control reaches a different - source line, then stop it and return control to GDB. This command - is abbreviated `s'. - - *Warning:* If you use the `step' command while control is - within a function that was compiled without debugging - information, execution proceeds until control reaches a - function that does have debugging information. - -`step COUNT' - Continue running as in `step', but do so COUNT times. If a - breakpoint is reached, or a signal not related to stepping occurs - before COUNT steps, stepping stops right away. - -`next [COUNT]' - Continue to the next source line in the current (innermost) stack - frame. Similar to `step', but any function calls appearing within - the line of code are executed without stopping. Execution stops - when control reaches a different line of code at the stack level - which was executing when the `next' command was given. This - command is abbreviated `n'. - - An argument COUNT is a repeat count, as for `step'. - - `next' within a function that lacks debugging information acts like - `step', but any function calls appearing within the code of the - function are executed without stopping. - -`finish' - Continue running until just after function in the selected stack - frame returns. Print the returned value (if any). - - Contrast this with the `return' command (*note Returning from a - function: Returning.). - -`until' -`u' - Continue running until a source line past the current line, in the - current stack frame, is reached. This command is used to avoid - single stepping through a loop more than once. It is like the - `next' command, except that when `until' encounters a jump, it - automatically continues execution until the program counter is - greater than the address of the jump. - - This means that when you reach the end of a loop after single - stepping though it, `until' will cause your program to continue - execution until the loop is exited. In contrast, a `next' command - at the end of a loop will simply step back to the beginning of the - loop, which would force you to step through the next iteration. - - `until' always stops your program if it attempts to exit the - current stack frame. - - `until' may produce somewhat counterintuitive results if the order - of machine code does not match the order of the source lines. For - example, in the following excerpt from a debugging session, the `f' - (`frame') command shows that execution is stopped at line `206'; - yet when we use `until', we get to line `195': - - (gdb) f - #0 main (argc=4, argv=0xf7fffae8) at m4.c:206 - 206 expand_input(); - (gdb) until - 195 for ( ; argc > 0; NEXTARG) { - - This happened because, for execution efficiency, the compiler had - generated code for the loop closure test at the end, rather than - the start, of the loop--even though the test in a C `for'-loop is - written before the body of the loop. The `until' command appeared - to step back to the beginning of the loop when it advanced to this - expression; however, it has not really gone to an earlier - statement--not in terms of the actual machine code. - - `until' with no argument works by means of single instruction - stepping, and hence is slower than `until' with an argument. - -`until LOCATION' -`u LOCATION' - Continue running your program until either the specified location - is reached, or the current stack frame returns. LOCATION is any of - the forms of argument acceptable to `break' (*note Setting - breakpoints: Set Breaks.). This form of the command uses - breakpoints, and hence is quicker than `until' without an argument. - -`stepi' -`si' - Execute one machine instruction, then stop and return to the - debugger. - - It is often useful to do `display/i $pc' when stepping by machine - instructions. This will cause the next instruction to be executed - to be displayed automatically at each stop. *Note Automatic - display: Auto Display. - - An argument is a repeat count, as in `step'. - -`nexti' -`ni' - Execute one machine instruction, but if it is a function call, - proceed until the function returns. - - An argument is a repeat count, as in `next'. - - -File: gdb.info, Node: Signals, Prev: Continuing and Stepping, Up: Stopping - -Signals -======= - - A signal is an asynchronous event that can happen in a program. The -operating system defines the possible kinds of signals, and gives each -kind a name and a number. For example, in Unix `SIGINT' is the signal -a program gets when you type an interrupt (often `C-c'); `SIGSEGV' is -the signal a program gets from referencing a place in memory far away -from all the areas in use; `SIGALRM' occurs when the alarm clock timer -goes off (which happens only if your program has requested an alarm). - - Some signals, including `SIGALRM', are a normal part of the -functioning of your program. Others, such as `SIGSEGV', indicate -errors; these signals are "fatal" (kill your program immediately) if the -program has not specified in advance some other way to handle the -signal. `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. - - GDB has the ability to detect any occurrence of a signal in your -program. You can tell GDB in advance what to do for each kind of -signal. - - Normally, GDB is set up to ignore non-erroneous signals like -`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 `handle' -command. - -`info signals' - Print a table of all the kinds of signals and how GDB has been - told to handle each one. You can use this to see the signal - numbers of all the defined types of signals. - -`handle SIGNAL KEYWORDS...' - Change the way GDB handles signal SIGNAL. SIGNAL can be the - number of a signal or its name (with or without the `SIG' at the - beginning). The KEYWORDS say what change to make. - - The keywords allowed by the `handle' command can be abbreviated. -Their full names are: - -`nostop' - GDB should not stop your program when this signal happens. It may - still print a message telling you that the signal has come in. - -`stop' - GDB should stop your program when this signal happens. This - implies the `print' keyword as well. - -`print' - GDB should print a message when this signal happens. - -`noprint' - GDB should not mention the occurrence of the signal at all. This - implies the `nostop' keyword as well. - -`pass' - GDB 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. - -`nopass' - GDB should not allow your program to see this signal. - - When a signal stops your program, the signal is not visible until you -continue. Your program will see the signal then, if `pass' is in -effect for the signal in question *at that time*. In other words, -after GDB reports a signal, you can use the `handle' command with -`pass' or `nopass' to control whether that signal will be seen by your -program when you later continue it. - - You can also use the `signal' command to prevent your program from -seeing a signal, or cause it to see a signal it normally would not see, -or to give it any signal at any time. For example, if your program -stopped due to some sort of memory reference error, you might store -correct values into the erroneous variables and continue, hoping to see -more execution; but your program would probably terminate immediately as -a result of the fatal signal once it saw the signal. To prevent this, -you can continue with `signal 0'. *Note Giving your program a signal: -Signaling. - - -File: gdb.info, Node: Stack, Next: Source, Prev: Stopping, Up: Top - -Examining the Stack -******************* - - When your program has stopped, the first thing you need to know is -where it stopped and how it got there. - - Each time your program performs a function call, the information -about where in your program the call was made from is saved in a block -of data called a "stack frame". The frame also contains the arguments -of the call and the local variables of the function that was called. -All the stack frames are allocated in a region of memory called the -"call stack". - - When your program stops, the GDB commands for examining the stack -allow you to see all of this information. - - One of the stack frames is "selected" by GDB and many GDB commands -refer implicitly to the selected frame. In particular, whenever you -ask GDB for the value of a variable in your program, the value is found -in the selected frame. There are special GDB commands to select -whichever frame you are interested in. - - When your program stops, GDB automatically selects the currently -executing frame and describes it briefly as the `frame' command does -(*note Information about a frame: Frame Info.). - -* Menu: - -* Frames:: Stack frames -* Backtrace:: Backtraces -* Selection:: Selecting a frame -* Frame Info:: Information on a frame - -* MIPS Stack:: MIPS machines and the function stack - - -File: gdb.info, Node: Frames, Next: Backtrace, Up: Stack - -Stack frames -============ - - The call stack is divided up into contiguous pieces called "stack -frames", or "frames" for short; each frame is the data associated with -one call to one function. The frame contains the arguments given to -the function, the function's local variables, and the address at which -the function is executing. - - When your program is started, the stack has only one frame, that of -the function `main'. This is called the "initial" frame or the -"outermost" frame. Each time a function is called, a new frame is -made. Each time a function returns, the frame for that function -invocation is eliminated. If a function is recursive, there can be -many frames for the same function. The frame for the function in which -execution is actually occurring is called the "innermost" frame. This -is the most recently created of all the stack frames that still exist. - - Inside your program, stack frames are identified by their addresses. -A stack frame consists of many bytes, each of which has its own -address; each kind of computer has a convention for choosing one of -those bytes whose address serves as the address of the frame. Usually -this address is kept in a register called the "frame pointer register" -while execution is going on in that frame. - - GDB 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 GDB to give you a way of designating stack frames in GDB -commands. - - Some compilers provide a way to compile functions so that they -operate without stack frames. (For example, the `gcc' option -`-fomit-frame-pointer' will generate functions without a frame.) This -is occasionally done with heavily used library functions to save the -frame setup time. GDB has limited facilities for dealing with these -function invocations. If the innermost function invocation has no -stack frame, GDB 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, GDB has no provision for -frameless functions elsewhere in the stack. - - -File: gdb.info, Node: Backtrace, Next: Selection, Prev: Frames, Up: Stack - -Backtraces -========== - - A backtrace is a summary of how your program got where it is. It -shows one line per frame, for many frames, starting with the currently -executing frame (frame zero), followed by its caller (frame one), and -on up the stack. - -`backtrace' -`bt' - Print a backtrace of the entire stack: one line per frame for all - frames in the stack. - - You can stop the backtrace at any time by typing the system - interrupt character, normally `C-c'. - -`backtrace N' -`bt N' - Similar, but print only the innermost N frames. - -`backtrace -N' -`bt -N' - Similar, but print only the outermost N frames. - - The names `where' and `info stack' (abbreviated `info s') are -additional aliases for `backtrace'. - - Each line in the backtrace shows the frame number and the function -name. The program counter value is also shown--unless you use `set -print address off'. The backtrace also shows the source file name and -line number, as well as the arguments to the function. The program -counter value is omitted if it is at the beginning of the code for that -line number. - - Here is an example of a backtrace. It was made with the command `bt -3', so it shows the innermost three frames. - - #0 m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8) - at builtin.c:993 - #1 0x6e38 in expand_macro (sym=0x2b600) at macro.c:242 - #2 0x6840 in expand_token (obs=0x0, t=177664, td=0xf7fffb08) - at macro.c:71 - (More stack frames follow...) - -The display for frame zero does not begin with a program counter value, -indicating that your program has stopped at the beginning of the code -for line `993' of `builtin.c'. - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-3 b/gnu/usr.bin/gdb/doc/gdb.info-3 deleted file mode 100644 index aea5862..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-3 +++ /dev/null @@ -1,1264 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Selection, Next: Frame Info, Prev: Backtrace, Up: Stack - -Selecting a frame -================= - - Most commands for examining the stack and other data in your program -work on whichever stack frame is selected at the moment. Here are the -commands for selecting a stack frame; all of them finish by printing a -brief description of the stack frame just selected. - -`frame N' -`f N' - Select frame number N. Recall that frame zero is the innermost - (currently executing) frame, frame one is the frame that called the - innermost one, and so on. The highest-numbered frame is the one - for `main'. - -`frame ADDR' -`f ADDR' - Select the frame at address ADDR. This is useful mainly if the - chaining of stack frames has been damaged by a bug, making it - impossible for GDB to assign numbers properly to all frames. In - addition, this can be useful when your program has multiple stacks - and switches between them. - - On the SPARC architecture, `frame' needs two addresses to select - an arbitrary frame: a frame pointer and a stack pointer. - -`up N' - Move N frames up the stack. For positive numbers N, this advances - toward the outermost frame, to higher frame numbers, to frames - that have existed longer. N defaults to one. - -`down N' - Move N frames down the stack. For positive numbers N, this - advances toward the innermost frame, to lower frame numbers, to - frames that were created more recently. N defaults to one. You - may abbreviate `down' as `do'. - - All of these commands end by printing two lines of output describing -the frame. The first line shows the frame number, the function name, -the arguments, and the source file and line number of execution in that -frame. The second line shows the text of that source line. - - For example: - (gdb) up - #1 0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc) - at env.c:10 - 10 read_input_file (argv[i]); - - After such a printout, the `list' command with no arguments will -print ten lines centered on the point of execution in the frame. *Note -Printing source lines: List. - -`up-silently N' -`down-silently N' - These two commands are variants of `up' and `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 - GDB command scripts, where the output might be unnecessary and - distracting. - - -File: gdb.info, Node: Frame Info, Next: MIPS Stack, Prev: Selection, Up: Stack - -Information about a frame -========================= - - There are several other commands to print information about the -selected stack frame. - -`frame' -`f' - When used without any argument, this command does not change which - frame is selected, but prints a brief description of the currently - selected stack frame. It can be abbreviated `f'. With an - argument, this command is used to select a stack frame. *Note - Selecting a frame: Selection. - -`info frame' -`info f' - This command prints a verbose description of the selected stack - frame, including the address of the frame, the addresses of the - next frame down (called by this frame) and the next frame up - (caller of this frame), the language that the source code - corresponding to this frame was written in, the address of the - frame's arguments, the program counter saved in it (the address of - execution in the caller frame), and which registers were saved in - the frame. The verbose description is useful when something has - gone wrong that has made the stack format fail to fit the usual - conventions. - -`info frame ADDR' -`info f ADDR' - Print a verbose description of the frame at address ADDR, without - selecting that frame. The selected frame remains unchanged by - this command. - -`info args' - Print the arguments of the selected frame, each on a separate line. - -`info locals' - 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. - -`info catch' - Print a list of all the exception handlers that are active in the - current stack frame at the current point of execution. To see - other exception handlers, visit the associated frame (using the - `up', `down', or `frame' commands); then type `info catch'. *Note - Breakpoints and exceptions: Exception Handling. - - -File: gdb.info, Node: MIPS Stack, Prev: Frame Info, Up: Stack - -MIPS machines and the function stack -==================================== - - MIPS based computers use an unusual stack frame, which sometimes -requires GDB to search backward in the object code to find the -beginning of a function. - - To improve response time (especially for embedded applications, where -GDB may be restricted to a slow serial line for this search) you may -want to limit the size of this search, using one of these commands: - -`set heuristic-fence-post LIMIT' - Restrict GDBN to examining at most LIMIT bytes in its search for - the beginning of a function. A value of `0' (the default) means - there is no limit. - -`show heuristic-fence-post' - Display the current limit. - -These commands are available *only* when GDB is configured for -debugging programs on MIPS processors. - - -File: gdb.info, Node: Source, Next: Data, Prev: Stack, Up: Top - -Examining Source Files -********************** - - GDB can print parts of your program's source, since the debugging -information recorded in the program tells GDB what source files were -used to build it. When your program stops, GDB spontaneously prints -the line where it stopped. Likewise, when you select a stack frame -(*note Selecting a frame: Selection.), GDB prints the line where -execution in that frame has stopped. You can print other portions of -source files by explicit command. - - If you use GDB through its GNU Emacs interface, you may prefer to use -Emacs facilities to view source; *note Using GDB under GNU Emacs: -Emacs.. - -* Menu: - -* List:: Printing source lines - -* Search:: Searching source files - -* Source Path:: Specifying source directories -* Machine Code:: Source and machine code - - -File: gdb.info, Node: List, Next: Search, Up: Source - -Printing source lines -===================== - - To print lines from a source file, use the `list' command -(abbreviated `l'). There are several ways to specify what part of the -file you want to print. - - Here are the forms of the `list' command most commonly used: - -`list LINENUM' - Print lines centered around line number LINENUM in the current - source file. - -`list FUNCTION' - Print lines centered around the beginning of function FUNCTION. - -`list' - Print more lines. If the last lines printed were printed with a - `list' command, this prints lines following the last lines - printed; however, if the last line printed was a solitary line - printed as part of displaying a stack frame (*note Examining the - Stack: Stack.), this prints lines centered around that line. - -`list -' - Print lines just before the lines last printed. - - By default, GDB prints ten source lines with any of these forms of -the `list' command. You can change this using `set listsize': - -`set listsize COUNT' - Make the `list' command display COUNT source lines (unless the - `list' argument explicitly specifies some other number). - -`show listsize' - Display the number of lines that `list' will currently display by - default. - - Repeating a `list' command with RET discards the argument, so it is -equivalent to typing just `list'. This is more useful than listing the -same lines again. An exception is made for an argument of `-'; that -argument is preserved in repetition so that each repetition moves up in -the source file. - - In general, the `list' command expects you to supply zero, one or two -"linespecs". Linespecs specify source lines; there are several ways of -writing them but the effect is always to specify some source line. -Here is a complete description of the possible arguments for `list': - -`list LINESPEC' - Print lines centered around the line specified by LINESPEC. - -`list FIRST,LAST' - Print lines from FIRST to LAST. Both arguments are linespecs. - -`list ,LAST' - Print lines ending with LAST. - -`list FIRST,' - Print lines starting with FIRST. - -`list +' - Print lines just after the lines last printed. - -`list -' - Print lines just before the lines last printed. - -`list' - As described in the preceding table. - - Here are the ways of specifying a single source line--all the kinds -of linespec. - -`NUMBER' - Specifies line NUMBER of the current source file. When a `list' - command has two linespecs, this refers to the same source file as - the first linespec. - -`+OFFSET' - Specifies the line OFFSET lines after the last line printed. When - used as the second linespec in a `list' command that has two, this - specifies the line OFFSET lines down from the first linespec. - -`-OFFSET' - Specifies the line OFFSET lines before the last line printed. - -`FILENAME:NUMBER' - Specifies line NUMBER in the source file FILENAME. - -`FUNCTION' - Specifies the line of the open-brace that begins the body of the - function FUNCTION. - -`FILENAME:FUNCTION' - Specifies the line of the open-brace that begins the body of the - function FUNCTION in the file FILENAME. You only need the file - name with a function name to avoid ambiguity when there are - identically named functions in different source files. - -`*ADDRESS' - Specifies the line containing the program address ADDRESS. - ADDRESS may be any expression. - - -File: gdb.info, Node: Search, Next: Source Path, Prev: List, Up: Source - -Searching source files -====================== - - There are two commands for searching through the current source file -for a regular expression. - -`forward-search REGEXP' -`search REGEXP' - The command `forward-search REGEXP' checks each line, starting - with the one following the last line listed, for a match for - REGEXP. It lists the line that is found. You can use synonym - `search REGEXP' or abbreviate the command name as `fo'. - -`reverse-search REGEXP' - The command `reverse-search REGEXP' checks each line, starting - with the one before the last line listed and going backward, for a - match for REGEXP. It lists the line that is found. You can - abbreviate this command as `rev'. - - -File: gdb.info, Node: Source Path, Next: Machine Code, Prev: Search, Up: Source - -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. GDB has a list of directories to search for -source files; this is called the "source path". Each time GDB 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 *not* used for this -purpose. Neither is the current working directory, unless it happens -to be in the source path. - - If GDB cannot find a source file in the source path, and the object -program records a directory, GDB tries that directory too. If the -source path is empty, and there is no record of the compilation -directory, GDB will, as a last resort, look in the current directory. - - Whenever you reset or rearrange the source path, GDB will clear out -any information it has cached about where source files are found, where -each line is in the file, etc. - - When you start GDB, its source path is empty. To add other -directories, use the `directory' command. - -`directory DIRNAME ...' - Add directory DIRNAME to the front of the source path. Several - directory names may be given to this command, separated by `:' or - whitespace. You may specify a directory that is already in the - source path; this moves it forward, so it will be searched sooner. - - You can use the string `$cdir' to refer to the compilation - directory (if one is recorded), and `$cwd' to refer to the current - working directory. `$cwd' is not the same as `.'--the former - tracks the current working directory as it changes during your GDB - session, while the latter is immediately expanded to the current - directory at the time you add an entry to the source path. - -`directory' - Reset the source path to empty again. This requires confirmation. - -`show directories' - Print the source path: show which directories it contains. - - If your source path is cluttered with directories that are no longer -of interest, GDB may sometimes cause confusion by finding the wrong -versions of source. You can correct the situation as follows: - - 1. Use `directory' with no argument to reset the source path to empty. - - 2. Use `directory' with suitable arguments to reinstall the - directories you want in the source path. You can add all the - directories in one command. - - -File: gdb.info, Node: Machine Code, Prev: Source Path, Up: Source - -Source and machine code -======================= - - You can use the command `info line' to map source lines to program -addresses (and vice versa), and the command `disassemble' to display a -range of addresses as machine instructions. - -`info line LINESPEC' - Print the starting and ending addresses of the compiled code for - source line LINESPEC. You can specify source lines in any of the - ways understood by the `list' command (*note Printing source - lines: List.). - - For example, we can use `info line' to discover the location of the -object code for the first line of function `m4_changequote': - - (gdb) info line m4_changecom - Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350. - -We can also inquire (using `*ADDR' as the form for LINESPEC) what -source line covers a particular address: - (gdb) info line *0x63ff - Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404. - - After `info line', the default address for the `x' command is -changed to the starting address of the line, so that `x/i' is -sufficient to begin examining the machine code (*note Examining memory: -Memory.). Also, this address is saved as the value of the convenience -variable `$_' (*note Convenience variables: Convenience Vars.). - -`disassemble' - This specialized command dumps a range of memory as machine - instructions. The default memory range is the function - surrounding the program counter of the selected frame. A single - argument to this command is a program counter value; the function - surrounding this value will be dumped. Two arguments specify a - range of addresses (first inclusive, second exclusive) to dump. - - We can use `disassemble' to inspect the object code range shown in -the last `info line' example (the example shows SPARC machine -instructions): - - (gdb) 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 - 0x63ec <builtin_init+5348>: ld [%i1+4], %o0 - 0x63f0 <builtin_init+5352>: b 0x63fc <builtin_init+5364> - 0x63f4 <builtin_init+5356>: ld [%o0+4], %o0 - 0x63f8 <builtin_init+5360>: or %o0, 0x1a4, %o0 - 0x63fc <builtin_init+5364>: call 0x9288 <path_search> - 0x6400 <builtin_init+5368>: nop - End of assembler dump. - - -File: gdb.info, Node: Data, Next: Languages, Prev: Source, Up: Top - -Examining Data -************** - - The usual way to examine data in your program is with the `print' -command (abbreviated `p'), or its synonym `inspect'. It evaluates and -prints the value of an expression of the language your program is -written in (*note Using GDB with Different Languages: Languages.). - -`print EXP' -`print /F EXP' - EXP is an expression (in the source language). By default the - value of EXP is printed in a format appropriate to its data type; - you can choose a different format by specifying `/F', where F is a - letter specifying the format; *note Output formats: Output - Formats.. - -`print' -`print /F' - If you omit EXP, GDB displays the last value again (from the - "value history"; *note Value history: Value History.). This - allows you to conveniently inspect the same value in an - alternative format. - - A more low-level way of examining data is with the `x' command. It -examines data in memory at a specified address and prints it in a -specified format. *Note Examining memory: Memory. - - If you are interested in information about types, or about how the -fields of a struct or class are declared, use the `ptype EXP' command -rather than `print'. *Note Examining the Symbol Table: Symbols. - -* 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 - -* Floating Point Hardware:: Floating point hardware - - -File: gdb.info, Node: Expressions, Next: Variables, Up: Data - -Expressions -=========== - - `print' and many other GDB commands accept an expression and compute -its value. Any kind of constant, variable or operator defined by the -programming language you are using is valid in an expression in GDB. -This includes conditional expressions, function calls, casts and string -constants. It unfortunately does not include symbols defined by -preprocessor `#define' commands. - - Because C is so widespread, most of the expressions shown in -examples in this manual are in C. *Note Using GDB with Different -Languages: Languages, for information on how to use expressions in other -languages. - - In this section, we discuss operators that you can use in GDB -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. - - GDB supports these operators in addition to those of programming -languages: - -`@' - `@' is a binary operator for treating parts of memory as arrays. - *Note Artificial arrays: Arrays, for more information. - -`::' - `::' allows you to specify a variable in terms of the file or - function where it is defined. *Note Program variables: Variables. - -`{TYPE} ADDR' - Refers to an object of type TYPE stored at address ADDR in memory. - ADDR may be any expression whose value is an integer or pointer - (but parentheses are required around binary operators, just as in - a cast). This construct is allowed regardless of what kind of - data is normally supposed to reside at ADDR. - - -File: gdb.info, Node: Variables, Next: Arrays, Prev: Expressions, Up: Data - -Program variables -================= - - The most common kind of expression to use is the name of a variable -in your program. - - Variables in expressions are understood in the selected stack frame -(*note Selecting a frame: Selection.); they must either be global (or -static) or be visible according to the scope rules of the programming -language from the point of execution in that frame. This means that in -the function - - foo (a) - int a; - { - bar (a); - { - int b = test (); - bar (b); - } - } - -you can examine and use the variable `a' whenever your program is -executing within the function `foo', but you can only use or examine -the variable `b' while your program is executing inside the block where -`b' is declared. - - There is an exception: you can refer to a variable or function whose -scope is a single source file even if the current execution point is not -in this file. But it is possible to have more than one such variable or -function with the same name (in different source files). If that -happens, referring to that name has unpredictable effects. If you wish, -you can specify a static variable in a particular function or file, -using the colon-colon notation: - - FILE::VARIABLE - FUNCTION::VARIABLE - -Here FILE or FUNCTION is the name of the context for the static -VARIABLE. In the case of file names, you can use quotes to make sure -GDB parses the file name as a single word--for example, to print a -global value of `x' defined in `f2.c': - - (gdb) p 'f2.c'::x - - This use of `::' is very rarely in conflict with the very similar -use of the same notation in C++. GDB also supports use of the C++ -scope resolution operator in GDB expressions. - - *Warning:* Occasionally, a local variable may appear to have the - wrong value at certain points in a function--just after entry to a - new scope, and just before exit. - You may see this problem when you are stepping by machine -instructions. This is because on most machines, it takes more than one -instruction to set up a stack frame (including local variable -definitions); if you are stepping by machine instructions, variables -may appear to have the wrong values until the stack frame is completely -built. On exit, it usually also takes more than one machine -instruction to destroy a stack frame; after you begin stepping through -that group of instructions, local variable definitions may be gone. - - -File: gdb.info, Node: Arrays, Next: Output Formats, Prev: Variables, Up: Data - -Artificial arrays -================= - - It is often useful to print out several successive objects of the -same type in memory; a section of an array, or an array of dynamically -determined size for which only a pointer exists in the program. - - You can do this by referring to a contiguous span of memory as an -"artificial array", using the binary operator `@'. The left operand of -`@' should be the first element of the desired array, as an individual -object. The right operand should be the desired length of the array. -The result is an array value whose elements are all of the type of the -left argument. The first element is actually the left argument; the -second element comes from bytes of memory immediately following those -that hold the first element, and so on. Here is an example. If a -program says - - int *array = (int *) malloc (len * sizeof (int)); - -you can print the contents of `array' with - - p *array@len - - The left operand of `@' must reside in memory. Array values made -with `@' in this way behave just like other arrays in terms of -subscripting, and are coerced to pointers when used in expressions. -Artificial arrays most often appear in expressions via the value history -(*note Value history: Value History.), after printing one out. - - Sometimes the artificial array mechanism is not quite enough; in -moderately complex data structures, the elements of interest may not -actually be adjacent--for example, if you are interested in the values -of pointers in an array. One useful work-around in this situation is -to use a convenience variable (*note Convenience variables: Convenience -Vars.) as a counter in an expression that prints the first interesting -value, and then repeat that expression via RET. For instance, suppose -you have an array `dtab' of pointers to structures, and you are -interested in the values of a field `fv' in each structure. Here is an -example of what you might type: - - set $i = 0 - p dtab[$i++]->fv - RET - RET - ... - - -File: gdb.info, Node: Output Formats, Next: Memory, Prev: Arrays, Up: Data - -Output formats -============== - - By default, GDB 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 these things, specify an "output format" when you -print a value. - - The simplest use of output formats is to say how to print a value -already computed. This is done by starting the arguments of the -`print' command with a slash and a format letter. The format letters -supported are: - -`x' - Regard the bits of the value as an integer, and print the integer - in hexadecimal. - -`d' - Print as integer in signed decimal. - -`u' - Print as integer in unsigned decimal. - -`o' - Print as integer in octal. - -`t' - Print as integer in binary. The letter `t' stands for "two". (1) - -`a' - Print as an address, both absolute in hex and as an offset from the - nearest preceding symbol. This format can be used to discover - where (in what function) an unknown address is located: - - (gdb) p/a 0x54320 - $3 = 0x54320 <_initialize_vx+396> - -`c' - Regard as an integer and print it as a character constant. - -`f' - Regard the bits of the value as a floating point number and print - using typical floating point syntax. - - For example, to print the program counter in hex (*note -Registers::.), type - - p/x $pc - -Note that no space is required before the slash; this is because command -names in GDB cannot contain a slash. - - To reprint the last value in the value history with a different -format, you can use the `print' command with just a format and no -expression. For example, `p/x' reprints the last value in hex. - - ---------- Footnotes ---------- - - (1) `b' cannot be used because these format letters are also used -with the `x' command, where `b' stands for "byte"; *note Examining -memory: Memory.. - - -File: gdb.info, Node: Memory, Next: Auto Display, Prev: Output Formats, Up: Data - -Examining memory -================ - - You can use the command `x' (for "examine") to examine memory in any -of several formats, independently of your program's data types. - -`x/NFU ADDR' -`x ADDR' -`x' - Use the `x' command to examine memory. - - N, F, and U are all optional parameters that specify how much memory -to display and how to format it; ADDR is an expression giving the -address where you want to start displaying memory. If you use defaults -for NFU, you need not type the slash `/'. Several commands set -convenient defaults for ADDR. - -N, the repeat count - The repeat count is a decimal integer; the default is 1. It - specifies how much memory (counting by units U) to display. - -F, the display format - The display format is one of the formats used by `print', or `s' - (null-terminated string) or `i' (machine instruction). The - default is `x' (hexadecimal) initially, or the format from the - last time you used either `x' or `print'. - -U, the unit size - The unit size is any of - - `b' - Bytes. - - `h' - Halfwords (two bytes). - - `w' - Words (four bytes). This is the initial default. - - `g' - Giant words (eight bytes). - - Each time you specify a unit size with `x', that size becomes the - default unit the next time you use `x'. (For the `s' and `i' - formats, the unit size is ignored and is normally not written.) - -ADDR, starting display address - ADDR is the address where you want GDB 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. - *Note Expressions: Expressions, for more information on - expressions. The default for ADDR is usually just after the last - address examined--but several other commands also set the default - address: `info breakpoints' (to the address of the last breakpoint - listed), `info line' (to the starting address of a line), and - `print' (if you use it to display a value from memory). - - For example, `x/3uh 0x54320' is a request to display three halfwords -(`h') of memory, formatted as unsigned decimal integers (`u'), starting -at address `0x54320'. `x/4xw $sp' prints the four words (`w') of -memory above the stack pointer (here, `$sp'; *note Registers::.) in -hexadecimal (`x'). - - Since the letters indicating unit sizes are all distinct from the -letters specifying output formats, you do not have to remember whether -unit size or format comes first; either order will work. The output -specifications `4xw' and `4wx' mean exactly the same thing. (However, -the count N must come first; `wx4' will not work.) - - Even though the unit size U is ignored for the formats `s' and `i', -you might still want to use a count N; for example, `3i' specifies that -you want to see three machine instructions, including any operands. -The command `disassemble' gives an alternative way of inspecting -machine instructions; *note Source and machine code: Machine Code.. - - All the defaults for the arguments to `x' are designed to make it -easy to continue scanning memory with minimal specifications each time -you use `x'. For example, after you have inspected three machine -instructions with `x/3i ADDR', you can inspect the next seven with just -`x/7'. If you use RET to repeat the `x' command, the repeat count N is -used again; the other arguments default as for successive uses of `x'. - - The addresses and contents printed by the `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, GDB makes these values available for -subsequent use in expressions as values of the convenience variables -`$_' and `$__'. After an `x' command, the last address examined is -available for use in expressions in the convenience variable `$_'. The -contents of that address, as examined, are available in the convenience -variable `$__'. - - If the `x' command has a repeat count, the address and contents saved -are from the last memory unit printed; this is not the same as the last -address printed if several units were printed on the last line of -output. - - -File: gdb.info, Node: Auto Display, Next: Print Settings, Prev: Memory, Up: Data - -Automatic display -================= - - 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 -"automatic display list" so that GDB 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: - - 2: foo = 38 - 3: bar[5] = (struct hack *) 0x3804 - -This display shows item numbers, expressions and their current values. -As with displays you request manually using `x' or `print', you can -specify the output format you prefer; in fact, `display' decides -whether to use `print' or `x' depending on how elaborate your format -specification is--it uses `x' if you specify a unit size, or one of the -two formats (`i' and `s') that are only supported by `x'; otherwise it -uses `print'. - -`display EXP' - Add the expression EXP to the list of expressions to display each - time your program stops. *Note Expressions: Expressions. - - `display' will not repeat if you press RET again after using it. - -`display/FMT EXP' - For FMT specifying only a display format and not a size or count, - add the expression EXP to the auto-display list but arrange to - display it each time in the specified format FMT. *Note Output - formats: Output Formats. - -`display/FMT ADDR' - For FMT `i' or `s', or including a unit-size or a number of units, - add the expression ADDR as a memory address to be examined each - time your program stops. Examining means in effect doing `x/FMT - ADDR'. *Note Examining memory: Memory. - - For example, `display/i $pc' can be helpful, to see the machine -instruction about to be executed each time execution stops (`$pc' is a -common name for the program counter; *note Registers::.). - -`undisplay DNUMS...' -`delete display DNUMS...' - Remove item numbers DNUMS from the list of expressions to display. - - `undisplay' will not repeat if you press RET after using it. - (Otherwise you would just get the error `No display number ...'.) - -`disable display DNUMS...' - Disable the display of item numbers DNUMS. A disabled display - item is not printed automatically, but is not forgotten. It may be - enabled again later. - -`enable display DNUMS...' - Enable display of item numbers DNUMS. It becomes effective once - again in auto display of its expression, until you specify - otherwise. - -`display' - Display the current values of the expressions on the list, just as - is done when your program stops. - -`info display' - Print the list of expressions previously set up to display - automatically, each one with its item number, but without showing - the values. This includes disabled expressions, which are marked - as such. It also includes expressions which would not be - displayed right now because they refer to automatic variables not - currently available. - - If a display expression refers to local variables, then it does not -make sense outside the lexical context for which it was set up. Such an -expression is disabled when execution enters a context where one of its -variables is not defined. For example, if you give the command -`display last_char' while inside a function with an argument -`last_char', then this argument will be displayed while your program -continues to stop inside that function. When it stops elsewhere--where -there is no variable `last_char'--display is disabled. The next time -your program stops where `last_char' is meaningful, you can enable the -display expression once again. - - -File: gdb.info, Node: Print Settings, Next: Value History, Prev: Auto Display, Up: Data - -Print settings -============== - - GDB provides the following ways to control how arrays, structures, -and symbols are printed. - -These settings are useful for debugging programs in any language: - -`set print address' -`set print address on' - GDB 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 `set print address on': - - (gdb) f - #0 set_quotes (lq=0x34c78 "<<", rq=0x34c88 ">>") - at input.c:530 - 530 if (lquote != def_lquote) - -`set print address off' - Do not print addresses when displaying their contents. For - example, this is the same stack frame displayed with `set print - address off': - - (gdb) set print addr off - (gdb) f - #0 set_quotes (lq="<<", rq=">>") at input.c:530 - 530 if (lquote != def_lquote) - - You can use `set print address off' to eliminate all machine - dependent displays from the GDB interface. For example, with - `print address off', you should get the same text for backtraces on - all machines--whether or not they involve pointer arguments. - -`show print address' - Show whether or not addresses are to be printed. - - When GDB prints a symbolic address, it normally prints the closest -earlier symbol plus an offset. If that symbol does not uniquely -identify the address (for example, it is a name whose scope is a single -source file), you may need to disambiguate. One way to do this is with -`info line', for example `info line *0x4537'. Alternately, you can set -GDB to print the source file and line number when it prints a symbolic -address: - -`set print symbol-filename on' - Tell GDB to print the source file name and line number of a symbol - in the symbolic form of an address. - -`set print symbol-filename off' - Do not print source file name and line number of a symbol. This - is the default. - -`show print symbol-filename' - Show whether or not GDB will print the source file name and line - number of a symbol in the symbolic form of an address. - - Also, you may wish to see the symbolic form only if the address being -printed is reasonably close to the closest earlier symbol: - -`set print max-symbolic-offset MAX-OFFSET' - Tell GDB to only display the symbolic form of an address if the - offset between the closest earlier symbol and the address is less - than MAX-OFFSET. The default is 0, which means to always print the - symbolic form of an address, if any symbol precedes it. - -`show print max-symbolic-offset' - Ask how large the maximum offset is that GDB will print in a - symbolic address. - -`set print array' -`set print array on' - GDB will pretty-print arrays. This format is more convenient to - read, but uses more space. The default is off. - -`set print array off' - Return to compressed format for arrays. - -`show print array' - Show whether compressed or pretty format is selected for displaying - arrays. - -`set print elements NUMBER-OF-ELEMENTS' - If GDB is printing a large array, it will stop printing after it - has printed the number of elements set by the `set print elements' - command. This limit also applies to the display of strings. - Setting the number of elements to zero means that the printing is - unlimited. - -`show print elements' - Display the number of elements of a large array that GDB will print - before losing patience. - -`set print pretty on' - Cause GDB to print structures in an indented format with one - member per line, like this: - - $1 = { - next = 0x0, - flags = { - sweet = 1, - sour = 1 - }, - meat = 0x54 "Pork" - } - -`set print pretty off' - Cause GDB to print structures in a compact format, like this: - - $1 = {next = 0x0, flags = {sweet = 1, sour = 1}, \ - meat = 0x54 "Pork"} - - This is the default format. - -`show print pretty' - Show which format GDB will use to print structures. - -`set print sevenbit-strings on' - Print using only seven-bit characters; if this option is set, GDB - will display any eight-bit characters (in strings or character - values) using the notation `\'NNN. For example, `M-a' is - displayed as `\341'. - -`set print sevenbit-strings off' - Print using either seven-bit or eight-bit characters, as required. - This is the default. - -`show print sevenbit-strings' - Show whether or not GDB will print only seven-bit characters. - -`set print union on' - Tell GDB to print unions which are contained in structures. This - is the default setting. - -`set print union off' - Tell GDB not to print unions which are contained in structures. - -`show print union' - Ask GDB whether or not it will print unions which are contained in - structures. - - For example, given the declarations - - typedef enum {Tree, Bug} Species; - typedef enum {Big_tree, Acorn, Seedling} Tree_forms; - typedef enum {Caterpillar, Cocoon, Butterfly} - Bug_forms; - - struct thing { - Species it; - union { - Tree_forms tree; - Bug_forms bug; - } form; - }; - - struct thing foo = {Tree, {Acorn}}; - - with `set print union on' in effect `p foo' would print - - $1 = {it = Tree, form = {tree = Acorn, bug = Cocoon}} - - and with `set print union off' in effect it would print - - $1 = {it = Tree, form = {...}} - -These settings are of interest when debugging C++ programs: - -`set print demangle' -`set print demangle on' - Print C++ names in their source form rather than in the encoded - ("mangled") form passed to the assembler and linker for type-safe - linkage. The default is `on'. - -`show print demangle' - Show whether C++ names will be printed in mangled or demangled - form. - -`set print asm-demangle' -`set print asm-demangle on' - Print C++ names in their source form rather than their mangled - form, even in assembler code printouts such as instruction - disassemblies. The default is off. - -`show print asm-demangle' - Show whether C++ names in assembly listings will be printed in - mangled or demangled form. - -`set demangle-style STYLE' - Choose among several encoding schemes used by different compilers - to represent C++ names. The choices for STYLE are currently: - - `auto' - Allow GDB to choose a decoding style by inspecting your - program. - - `gnu' - Decode based on the GNU C++ compiler (`g++') encoding - algorithm. - - `lucid' - Decode based on the Lucid C++ compiler (`lcc') encoding - algorithm. - - `arm' - Decode using the algorithm in the `C++ Annotated Reference - Manual'. *Warning:* this setting alone is not sufficient to - allow debugging `cfront'-generated executables. GDB would - require further enhancement to permit that. - -`show demangle-style' - Display the encoding style currently in use for decoding C++ - symbols. - -`set print object' -`set print object on' - When displaying a pointer to an object, identify the *actual* - (derived) type of the object rather than the *declared* type, using - the virtual function table. - -`set print object off' - Display only the declared type of objects, without reference to the - virtual function table. This is the default setting. - -`show print object' - Show whether actual, or declared, object types will be displayed. - -`set print vtbl' -`set print vtbl on' - Pretty print C++ virtual function tables. The default is off. - -`set print vtbl off' - Do not pretty print C++ virtual function tables. - -`show print vtbl' - Show whether C++ virtual function tables are pretty printed, or - not. - - -File: gdb.info, Node: Value History, Next: Convenience Vars, Prev: Print Settings, Up: Data - -Value history -============= - - Values printed by the `print' command are saved in the GDB "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 `file' or `symbol-file' commands). When the symbol table changes, -the value history is discarded, since the values may contain pointers -back to the types defined in the symbol table. - - The values printed are given "history numbers" by which you can -refer to them. These are successive integers starting with one. -`print' shows you the history number assigned to a value by printing -`$NUM = ' before the value; here NUM is the history number. - - To refer to any previous value, use `$' followed by the value's -history number. The way `print' labels its output is designed to -remind you of this. Just `$' refers to the most recent value in the -history, and `$$' refers to the value before that. `$$N' refers to the -Nth value from the end; `$$2' is the value just prior to `$$', `$$1' is -equivalent to `$$', and `$$0' is equivalent to `$'. - - For example, suppose you have just printed a pointer to a structure -and want to see the contents of the structure. It suffices to type - - p *$ - - If you have a chain of structures where the component `next' points -to the next one, you can print the contents of the next one with this: - - p *$.next - -You can print successive links in the chain by repeating this -command--which you can do by just typing RET. - - Note that the history records values, not expressions. If the value -of `x' is 4 and you type these commands: - - print x - set x=5 - -then the value recorded in the value history by the `print' command -remains 4 even though the value of `x' has changed. - -`show values' - Print the last ten values in the value history, with their item - numbers. This is like `p $$9' repeated ten times, except that - `show values' does not change the history. - -`show values N' - Print ten history values centered on history item number N. - -`show values +' - Print ten history values just after the values last printed. If - no more values are available, produces no display. - - Pressing RET to repeat `show values N' has exactly the same effect -as `show values +'. - - -File: gdb.info, Node: Convenience Vars, Next: Registers, Prev: Value History, Up: Data - -Convenience variables -===================== - - GDB provides "convenience variables" that you can use within GDB to -hold on to a value and refer to it later. These variables exist -entirely within GDB; 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. - - Convenience variables are prefixed with `$'. Any name preceded by -`$' can be used for a convenience variable, unless it is one of the -predefined machine-specific register names (*note Registers::.). -(Value history references, in contrast, are *numbers* preceded by `$'. -*Note Value history: Value History.) - - You can save a value in a convenience variable with an assignment -expression, just as you would set a variable in your program. For -example: - - set $foo = *object_ptr - -would save in `$foo' the value contained in the object pointed to by -`object_ptr'. - - Using a convenience variable for the first time creates it, but its -value is `void' until you assign a new value. You can alter the value -with another assignment at any time. - - Convenience variables have no fixed types. You can assign a -convenience variable any type of value, including structures and -arrays, even if that variable already has a value of a different type. -The convenience variable, when used as an expression, has the type of -its current value. - -`show convenience' - Print a list of convenience variables used so far, and their - values. Abbreviated `show con'. - - One of the ways to use a convenience variable is as a counter to be -incremented or a pointer to be advanced. For example, to print a field -from successive elements of an array of structures: - - set $i = 0 - print bar[$i++]->contents - ... repeat that command by typing RET. - - Some convenience variables are created automatically by GDB and given -values likely to be useful. - -`$_' - The variable `$_' is automatically set by the `x' command to the - last address examined (*note Examining memory: Memory.). Other - commands which provide a default address for `x' to examine also - set `$_' to that address; these commands include `info line' and - `info breakpoint'. The type of `$_' is `void *' except when set - by the `x' command, in which case it is a pointer to the type of - `$__'. - -`$__' - The variable `$__' is automatically set by the `x' command to the - value found in the last address examined. Its type is chosen to - match the format in which the data was printed. - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-4 b/gnu/usr.bin/gdb/doc/gdb.info-4 deleted file mode 100644 index b0758fa..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-4 +++ /dev/null @@ -1,1349 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Registers, Next: Floating Point Hardware, Prev: Convenience Vars, Up: Data - -Registers -========= - - You can refer to machine register contents, in expressions, as -variables with names starting with `$'. The names of registers are -different for each machine; use `info registers' to see the names used -on your machine. - -`info registers' - Print the names and values of all registers except floating-point - registers (in the selected stack frame). - -`info all-registers' - Print the names and values of all registers, including - floating-point registers. - -`info registers REGNAME ...' - Print the relativized value of each specified register REGNAME. - rEGNAME may be any register name valid on the machine you are - using, with or without the initial `$'. - - GDB 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 -`$pc' and `$sp' are used for the program counter register and the stack -pointer. `$fp' is used for a register that contains a pointer to the -current stack frame, and `$ps' is used for a register that contains the -processor status. For example, you could print the program counter in -hex with - - p/x $pc - -or print the instruction to be executed next with - - x/i $pc - -or add four to the stack pointer(1) with - - set $sp += 4 - - Whenever possible, these four standard register names are available -on your machine even though the machine has different canonical -mnemonics, so long as there is no conflict. The `info registers' -command shows the canonical names. For example, on the SPARC, `info -registers' displays the processor status register as `$psr' but you can -also refer to it as `$ps'. - - GDB 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 -to refer to the contents of an ordinary register as floating point value -(although you can *print* it as a floating point value with `print/f -$REGNAME'). - - Some registers have distinct "raw" and "virtual" data formats. This -means that the data format in which the register contents are saved by -the operating system is not the same one that your program normally -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, -GDB normally works with the virtual format only (the format that makes -sense for your program), but the `info registers' command prints the -data in both formats. - - Normally, register values are relative to the selected stack frame -(*note Selecting a frame: Selection.). This means that you get the -value that the register would contain if all stack frames farther in -were exited and their saved registers restored. In order to see the -true contents of hardware registers, you must select the innermost -frame (with `frame 0'). - - However, GDB must deduce where registers are saved, from the machine -code generated by your compiler. If some registers are not saved, or if -GDB is unable to locate the saved registers, the selected stack frame -will make no difference. - -`set rstack_high_address ADDRESS' - On AMD 29000 family processors, registers are saved in a separate - "register stack". There is no way for GDB to determine the extent - of this stack. Normally, GDB just assumes that the stack is "large - enough". This may result in GDB referencing memory locations that - do not exist. If necessary, you can get around this problem by - specifying the ending address of the register stack with the `set - rstack_high_address' command. The argument should be an address, - which you will probably want to precede with `0x' to specify in - hexadecimal. - -`show rstack_high_address' - Display the current limit of the register stack, on AMD 29000 - family processors. - - ---------- Footnotes ---------- - - (1) This is a way of removing one word from the stack, on machines -where stacks grow downward in memory (most machines, nowadays). This -assumes that the innermost stack frame is selected; setting `$sp' is -not allowed when other stack frames are selected. To pop entire frames -off the stack, regardless of machine architecture, use `return'; *note -Returning from a function: Returning.. - - -File: gdb.info, Node: Floating Point Hardware, Prev: Registers, Up: Data - -Floating point hardware -======================= - - Depending on the host machine architecture, GDB may be able to give -you more information about the status of the floating point hardware. - -`info float' - Display hardware-dependent information about the floating point - unit. The exact contents and layout vary depending on the - floating point chip; on some platforms, `info float' is not - available at all. - - -File: gdb.info, Node: Languages, Next: Symbols, Prev: Data, Up: Top - -Using GDB with Different Languages -********************************** - - Although programming languages generally have common aspects, they -are rarely expressed in the same manner. For instance, in ANSI C, -dereferencing a pointer `p' is accomplished by `*p', but in Modula-2, -it is accomplished by `p^'. Values can also be represented (and -displayed) differently. Hex numbers in C are written like `0x1ae', -while in Modula-2 they appear as `1AEH'. - - Language-specific information is built into GDB for some languages, -allowing you to express operations like the above in your program's -native language, and allowing GDB 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 "working language", -can be selected manually, or GDB can set it automatically. - -* Menu: - -* Setting:: Switching between source languages -* Show:: Displaying the language - -* Checks:: Type and range checks - -* Support:: Supported languages - - -File: gdb.info, Node: Setting, Next: Show, Up: Languages - -Switching between source languages -================================== - - There are two ways to control the working language--either have GDB -set it automatically, or select it manually yourself. You can use the -`set language' command for either purpose. On startup, GDB defaults to -setting the language automatically. - -* Menu: - -* Manually:: Setting the working language manually -* Automatically:: Having GDB infer the source language - - -File: gdb.info, Node: Manually, Next: Automatically, Up: Setting - -Setting the working language ----------------------------- - - If you allow GDB to set the language automatically, expressions are -interpreted the same way in your debugging session and your program. - - If you wish, you may set the language manually. To do this, issue -the command `set language LANG', where LANG is the name of a language, -such as `c' or `modula-2'. For a list of the supported languages, type -`set language'. - - Setting the language manually prevents GDB 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 GDB was parsing Modula-2, a command such as: - - print a = b + c - -might not have the effect you intended. In C, this means to add `b' -and `c' and place the result in `a'. The result printed would be the -value of `a'. In Modula-2, this means to compare `a' to the result of -`b+c', yielding a `BOOLEAN' value. - - -File: gdb.info, Node: Automatically, Prev: Manually, Up: Setting - -Having GDB infer the source language ------------------------------------- - - To have GDB set the working language automatically, use `set -language local' or `set language auto'. GDB then infers the language -that a program was written in by looking at the name of its source -files, and examining their extensions: - -`*.mod' - Modula-2 source file - -`*.c' - C source file - -`*.C' -`*.cc' - C++ source file - - 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), GDB 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 GDB issues -a warning. - - This may not seem necessary for most programs, which are written -entirely in one source language. However, program modules and libraries -written in one source language can be used by a main program written in -a different source language. Using `set language auto' in this case -frees you from having to set the working language manually. - - -File: gdb.info, Node: Show, Next: Checks, Prev: Setting, Up: Languages - -Displaying the language -======================= - - The following commands will help you find out which language is the -working language, and also what language source files were written in. - -`show language' - Display the current working language. This is the language you - can use with commands such as `print' to build and compute - expressions that may involve variables in your program. - -`info frame' - Among the other information listed here (*note Information about a - frame: Frame Info.) is the source language for this frame. This - is the language that will become the working language if you ever - use an identifier that is in this frame. - -`info source' - Among the other information listed here (*note Examining the - Symbol Table: Symbols.) is the source language of this source file. - - -File: gdb.info, Node: Checks, Next: Support, Prev: Show, Up: Languages - -Type and range checking -======================= - - *Warning:* In this release, the GDB commands for type and range - checking are included, but they do not yet have any effect. This - section documents the intended facilities. - - Some languages are designed to guard you against making seemingly -common errors through a series of compile- and run-time checks. These -include checking the type of arguments to functions and operators, and -making sure mathematical overflows are caught at run time. Checks such -as these help to ensure a program's correctness once it has been -compiled by eliminating type mismatches, and providing active checks -for range errors when your program is running. - - GDB can check for conditions like the above if you wish. Although -GDB will not check the statements in your program, it can check -expressions entered directly into GDB for evaluation via the `print' -command, for example. As with the working language, GDB can also -decide whether or not to check automatically based on your program's -source language. *Note Supported languages: Support, for the default -settings of supported languages. - -* Menu: - -* Type Checking:: An overview of type checking -* Range Checking:: An overview of range checking - - -File: gdb.info, Node: Type Checking, Next: Range Checking, Up: Checks - -An overview of type checking ----------------------------- - - Some languages, such as Modula-2, are strongly typed, meaning that -the arguments to operators and functions have to be of the correct type, -otherwise an error occurs. These checks prevent type mismatch errors -from ever causing any run-time problems. For example, - - 1 + 2 => 3 -but - error--> 1 + 2.3 - - The second example fails because the `CARDINAL' 1 is not -type-compatible with the `REAL' 2.3. - - For expressions you use in GDB commands, you can tell the GDB 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, GDB -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 GDB from evaluating an expression. For instance, GDB does -not know how to add an `int' and a `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 little -sense to evaluate anyway. - - Each language defines to what degree it is strict about type. For -instance, both Modula-2 and C require the arguments to arithmetical -operators to be numbers. In C, enumerated types and pointers can be -represented as numbers, so that they are valid arguments to mathematical -operators. *Note Supported languages: Support, for further details on -specific languages. - - GDB provides some additional commands for controlling the type -checker: - -`set check type auto' - Set type checking on or off based on the current working language. - *Note Supported languages: Support, for the default settings for - each language. - -`set check type on' -`set check type off' - 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 default. If any type mismatches occur in - evaluating an expression while typechecking is on, GDB prints a - message and aborts evaluation of the expression. - -`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, GDB cannot add numbers - and structures. - -`show type' - Show the current setting of the type checker, and whether or not - GDB is setting it automatically. - - -File: gdb.info, Node: Range Checking, Prev: Type Checking, Up: Checks - -An overview of range checking ------------------------------ - - In some languages (such as Modula-2), it is an error to exceed the -bounds of a type; this is enforced with run-time checks. Such range -checking is meant to ensure program correctness by making sure -computations do not overflow, or indices on an array element access do -not exceed the bounds of the array. - - For expressions you use in GDB commands, you can tell GDB to treat -range errors in one of three ways: ignore them, always treat them as -errors and abandon the expression, or issue warnings but evaluate the -expression anyway. - - A range error can result from numerical overflow, from exceeding an -array index bound, or when you type a constant that is not a member of -any type. Some languages, however, do not treat overflows as an error. -In many implementations of C, mathematical overflow causes the result -to "wrap around" to lower values--for example, if M is the largest -integer value, and S is the smallest, then - - M + 1 => S - - This, too, is specific to individual languages, and in some cases -specific to individual compilers or machines. *Note Supported -languages: Support, for further details on specific languages. - - GDB provides some additional commands for controlling the range -checker: - -`set check range auto' - Set range checking on or off based on the current working language. - *Note Supported languages: Support, for the default settings for - each language. - -`set check range on' -`set check range off' - Set range checking on or off, overriding the default setting for - the current working language. A warning is issued if the setting - does not match the language default. If a range error occurs, - then a message is printed and evaluation of the expression is - aborted. - -`set check range warn' - Output messages when the GDB 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 systems). - -`show range' - Show the current setting of the range checker, and whether or not - it is being set automatically by GDB. - - -File: gdb.info, Node: Support, Prev: Checks, Up: Languages - -Supported languages -=================== - - GDB 4 supports C, C++, and Modula-2. Some GDB features may be used -in expressions regardless of the language you use: the GDB `@' and `::' -operators, and the `{type}addr' construct (*note Expressions: -Expressions.) can be used with the constructs of any supported language. - - The following sections detail to what degree each source language is -supported by GDB. These sections are not meant to be language -tutorials or references, but serve only as a reference guide to what the -GDB 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. - -* Menu: - -* C:: C and C++ -* Modula-2:: Modula-2 - - -File: gdb.info, Node: C, Next: Modula-2, Up: Support - -C and C++ ---------- - - Since C and C++ are so closely related, many features of GDB apply -to both languages. Whenever this is the case, we discuss both languages -together. - - The C++ debugging facilities are jointly implemented by the GNU C++ -compiler and GDB. Therefore, to debug your C++ code effectively, you -must compile your C++ programs with the GNU C++ compiler, `g++'. - -* Menu: - -* C Operators:: C and C++ operators -* C Constants:: C and C++ constants -* Cplus expressions:: C++ expressions -* C Defaults:: Default settings for C and C++ - -* C Checks:: C and C++ type and range checks - -* Debugging C:: GDB and C -* Debugging C plus plus:: Special features for C++ - - -File: gdb.info, Node: C Operators, Next: C Constants, Up: C - -C and C++ operators -------------------- - - Operators must be defined on values of specific types. For instance, -`+' is defined on numbers, but not on structures. Operators are often -defined on groups of types. - - For the purposes of C and C++, the following definitions hold: - - * *Integral types* include `int' with any of its storage-class - specifiers; `char'; and `enum'. - - * *Floating-point types* include `float' and `double'. - - * *Pointer types* include all types defined as `(TYPE *)'. - - * *Scalar types* include all of the above. - -The following operators are supported. They are listed here in order -of increasing precedence: - -`,' - 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. - -`=' - Assignment. The value of an assignment expression is the value - assigned. Defined on scalar types. - -`OP=' - Used in an expression of the form `A OP= B', and translated to - `A = A OP B'. `OP=' and `=' have the same precendence. OP is any - one of the operators `|', `^', `&', `<<', `>>', `+', `-', `*', - `/', `%'. - -`?:' - The ternary operator. `A ? B : C' can be thought of as: if A - then B else C. A should be of an integral type. - -`||' - Logical OR. Defined on integral types. - -`&&' - Logical AND. Defined on integral types. - -`|' - Bitwise OR. Defined on integral types. - -`^' - Bitwise exclusive-OR. Defined on integral types. - -`&' - Bitwise AND. Defined on integral types. - -`==, !=' - Equality and inequality. Defined on scalar types. The value of - these expressions is 0 for false and non-zero for true. - -`<, >, <=, >=' - Less than, greater than, less than or equal, greater than or equal. - Defined on scalar types. The value of these expressions is 0 for - false and non-zero for true. - -`<<, >>' - left shift, and right shift. Defined on integral types. - -`@' - The GDB "artificial array" operator (*note Expressions: - Expressions.). - -`+, -' - Addition and subtraction. Defined on integral types, - floating-point types and pointer types. - -`*, /, %' - Multiplication, division, and modulus. Multiplication and - division are defined on integral and floating-point types. - Modulus is defined on integral types. - -`++, --' - Increment and decrement. When appearing before a variable, the - operation is performed before the variable is used in an - expression; when appearing after it, the variable's value is used - before the operation takes place. - -`*' - Pointer dereferencing. Defined on pointer types. Same precedence - as `++'. - -`&' - Address operator. Defined on variables. Same precedence as `++'. - - For debugging C++, GDB implements a use of `&' beyond what is - allowed in the C++ language itself: you can use `&(&REF)' (or, if - you prefer, simply `&&REF') to examine the address where a C++ - reference variable (declared with `&REF') is stored. - -`-' - Negative. Defined on integral and floating-point types. Same - precedence as `++'. - -`!' - Logical negation. Defined on integral types. Same precedence as - `++'. - -`~' - Bitwise complement operator. Defined on integral types. Same - precedence as `++'. - -`., ->' - Structure member, and pointer-to-structure member. For - convenience, GDB regards the two as equivalent, choosing whether - to dereference a pointer based on the stored type information. - Defined on `struct' and `union' data. - -`[]' - Array indexing. `A[I]' is defined as `*(A+I)'. Same precedence - as `->'. - -`()' - Function parameter list. Same precedence as `->'. - -`::' - C++ scope resolution operator. Defined on `struct', `union', and - `class' types. - -`::' - Doubled colons also represent the GDB scope operator (*note - Expressions: Expressions.). Same precedence as `::', above. - - -File: gdb.info, Node: C Constants, Next: Cplus expressions, Prev: C Operators, Up: C - -C and C++ constants -------------------- - - GDB allows you to express the constants of C and C++ in the -following ways: - - * Integer constants are a sequence of digits. Octal constants are - specified by a leading `0' (ie. zero), and hexadecimal constants by - a leading `0x' or `0X'. Constants may also end with a letter `l', - specifying that the constant should be treated as a `long' value. - - * Floating point constants are a sequence of digits, followed by a - decimal point, followed by a sequence of digits, and optionally - followed by an exponent. An exponent is of the form: - `e[[+]|-]NNN', where NNN is another sequence of digits. The `+' - is optional for positive exponents. - - * Enumerated constants consist of enumerated identifiers, or their - integral equivalents. - - * Character constants are a single character surrounded by single - quotes (`''), or a number--the ordinal value of the corresponding - character (usually its ASCII value). Within quotes, the single - character may be represented by a letter or by "escape sequences", - which are of the form `\NNN', where NNN is the octal representation - of the character's ordinal value; or of the form `\X', where `X' - is a predefined special character--for example, `\n' for newline. - - * String constants are a sequence of character constants surrounded - by double quotes (`"'). - - * Pointer constants are an integral value. You can also write - pointers to constants using the C operator `&'. - - * Array constants are comma-separated lists surrounded by braces `{' - and `}'; for example, `{1,2,3}' is a three-element array of - integers, `{{1,2}, {3,4}, {5,6}}' is a three-by-two array, and - `{&"hi", &"there", &"fred"}' is a three-element array of pointers. - - -File: gdb.info, Node: Cplus expressions, Next: C Defaults, Prev: C Constants, Up: C - -C++ expressions ---------------- - - GDB expression handling has a number of extensions to interpret a -significant subset of C++ expressions. - - *Warning:* Most of these extensions depend on the use of additional - debugging information in the symbol table, and thus require a rich, - extendable object code format. In particular, if your system uses - a.out, MIPS ECOFF, RS/6000 XCOFF, or Sun ELF with stabs extensions - to the symbol table, these facilities are all available. Where - the object code format is standard COFF, on the other hand, most - of the C++ support in GDB will *not* work, nor can it. For the - standard SVr4 debugging format, DWARF in ELF, the standard is - still evolving, so the C++ support in GDB is still fragile; when - this debugging format stabilizes, however, C++ support will also - be available on systems that use it. - - 1. Member function calls are allowed; you can use expressions like - - count = aml->GetOriginal(x, y) - - 2. While a member function is active (in the selected stack frame), - your expressions have the same namespace available as the member - function; that is, GDB allows implicit references to the class - instance pointer `this' following the same rules as C++. - - 3. You can call overloaded functions; GDB 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. GDB will not perform conversions requiring constructors or - user-defined type operators. - - 4. GDB 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 GDB 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 *address* of a reference variable is always - shown, unless you have specified `set print address off'. - - 5. GDB supports the C++ name resolution operator `::'--your - expressions can use it just as expressions in your program do. - Since one scope may be defined in another, you can use `::' - repeatedly if necessary, for example in an expression like - `SCOPE1::SCOPE2::NAME'. GDB also allows resolving name scope by - reference to source files, in both C and C++ debugging (*note - Program variables: Variables.). - - -File: gdb.info, Node: C Defaults, Next: C Checks, Prev: Cplus expressions, Up: C - -C and C++ defaults ------------------- - - If you allow GDB to set type and range checking automatically, they -both default to `off' whenever the working language changes to C or -C++. This happens regardless of whether you, or GDB, selected the -working language. - - If you allow GDB 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 `.c', `.C', or `.cc'. *Note Having GDB infer -the source language: Automatically, for further details. - - -File: gdb.info, Node: C Checks, Next: Debugging C, Prev: C Defaults, Up: C - -C and C++ type and range checks -------------------------------- - - By default, when GDB parses C or C++ expressions, type checking is -not used. However, if you turn type checking on, GDB will consider two -variables type equivalent if: - - * The two variables are structured and have the same structure, - union, or enumerated tag. - - * Two two variables have the same type name, or types that have been - declared equivalent through `typedef'. - - 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. - - -File: gdb.info, Node: Debugging C, Next: Debugging C plus plus, Prev: C Checks, Up: C - -GDB and C ---------- - - The `set print union' and `show print union' commands apply to the -`union' type. When set to `on', any `union' that is inside a `struct' -or `class' will also be printed. Otherwise, it will appear as `{...}'. - - The `@' operator aids in the debugging of dynamic arrays, formed -with pointers and a memory allocation function. *Note Expressions: -Expressions. - - -File: gdb.info, Node: Debugging C plus plus, Prev: Debugging C, Up: C - -GDB features for C++ --------------------- - - Some GDB commands are particularly useful with C++, and some are -designed specifically for use with C++. Here is a summary: - -`breakpoint menus' - When you want a breakpoint in a function whose name is overloaded, - GDB breakpoint menus help you specify which function definition - you want. *Note Breakpoint menus: Breakpoint Menus. - -`rbreak REGEX' - Setting breakpoints using regular expressions is helpful for - setting breakpoints on overloaded functions that are not members - of any special classes. *Note Setting breakpoints: Set Breaks. - -`catch EXCEPTIONS' -`info catch' - Debug C++ exception handling using these commands. *Note - Breakpoints and exceptions: Exception Handling. - -`ptype TYPENAME' - Print inheritance relationships as well as other information for - type TYPENAME. *Note Examining the Symbol Table: Symbols. - -`set print demangle' -`show print demangle' -`set print asm-demangle' -`show print asm-demangle' - Control whether C++ symbols display in their source form, both when - displaying code as C++ source and when displaying disassemblies. - *Note Print settings: Print Settings. - -`set print object' -`show print object' - Choose whether to print derived (actual) or declared types of - objects. *Note Print settings: Print Settings. - -`set print vtbl' -`show print vtbl' - Control the format for printing virtual function tables. *Note - Print settings: Print Settings. - -`Overloaded symbol names' - You can specify a particular definition of an overloaded symbol, - using the same notation that is used to declare such symbols in - C++: type `SYMBOL(TYPES)' rather than just SYMBOL. You can also - use the GDB command-line word completion facilities to list the - available choices, or to finish the type list for you. *Note - Command completion: Completion, for details on how to do this. - - -File: gdb.info, Node: Modula-2, Prev: C, Up: Support - -Modula-2 --------- - - The extensions made to GDB to support Modula-2 only 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 GDB reads in the executable's symbol table. - -* Menu: - -* M2 Operators:: Built-in operators -* Built-In Func/Proc:: Built-in functions and procedures -* M2 Constants:: Modula-2 constants -* M2 Defaults:: Default settings for Modula-2 -* Deviations:: Deviations from standard Modula-2 -* M2 Checks:: Modula-2 type and range checks -* M2 Scope:: The scope operators `::' and `.' -* GDB/M2:: GDB and Modula-2 - - -File: gdb.info, Node: M2 Operators, Next: Built-In Func/Proc, Up: Modula-2 - -Operators ---------- - - Operators must be defined on values of specific types. For instance, -`+' is defined on numbers, but not on structures. Operators are often -defined on groups of types. For the purposes of Modula-2, the -following definitions hold: - - * *Integral types* consist of `INTEGER', `CARDINAL', and their - subranges. - - * *Character types* consist of `CHAR' and its subranges. - - * *Floating-point types* consist of `REAL'. - - * *Pointer types* consist of anything declared as `POINTER TO TYPE'. - - * *Scalar types* consist of all of the above. - - * *Set types* consist of `SET' and `BITSET' types. - - * *Boolean types* consist of `BOOLEAN'. - -The following operators are supported, and appear in order of -increasing precedence: - -`,' - Function argument or array index separator. - -`:=' - Assignment. The value of VAR `:=' VALUE is VALUE. - -`<, >' - Less than, greater than on integral, floating-point, or enumerated - types. - -`<=, >=' - Less than, greater than, less than or equal to, greater than or - equal to on integral, floating-point and enumerated types, or set - inclusion on set types. Same precedence as `<'. - -`=, <>, #' - Equality and two ways of expressing inequality, valid on scalar - types. Same precedence as `<'. In GDB scripts, only `<>' is - available for inequality, since `#' conflicts with the script - comment character. - -`IN' - Set membership. Defined on set types and the types of their - members. Same precedence as `<'. - -`OR' - Boolean disjunction. Defined on boolean types. - -`AND, &' - Boolean conjuction. Defined on boolean types. - -`@' - The GDB "artificial array" operator (*note Expressions: - Expressions.). - -`+, -' - Addition and subtraction on integral and floating-point types, or - union and difference on set types. - -`*' - Multiplication on integral and floating-point types, or set - intersection on set types. - -`/' - Division on floating-point types, or symmetric set difference on - set types. Same precedence as `*'. - -`DIV, MOD' - Integer division and remainder. Defined on integral types. Same - precedence as `*'. - -`-' - Negative. Defined on `INTEGER' and `REAL' data. - -`^' - Pointer dereferencing. Defined on pointer types. - -`NOT' - Boolean negation. Defined on boolean types. Same precedence as - `^'. - -`.' - `RECORD' field selector. Defined on `RECORD' data. Same - precedence as `^'. - -`[]' - Array indexing. Defined on `ARRAY' data. Same precedence as `^'. - -`()' - Procedure argument list. Defined on `PROCEDURE' objects. Same - precedence as `^'. - -`::, .' - GDB and Modula-2 scope operators. - - *Warning:* Sets and their operations are not yet supported, so GDB - will treat the use of the operator `IN', or the use of operators - `+', `-', `*', `/', `=', , `<>', `#', `<=', and `>=' on sets as an - error. - - -File: gdb.info, Node: Built-In Func/Proc, Next: M2 Constants, Prev: M2 Operators, Up: Modula-2 - -Built-in functions and procedures ---------------------------------- - - Modula-2 also makes available several built-in procedures and -functions. In describing these, the following metavariables are used: - -A - represents an `ARRAY' variable. - -C - represents a `CHAR' constant or variable. - -I - represents a variable or constant of integral type. - -M - represents an identifier that belongs to a set. Generally used in - the same function with the metavariable S. The type of S should - be `SET OF MTYPE' (where MTYPE is the type of M). - -N - represents a variable or constant of integral or floating-point - type. - -R - represents a variable or constant of floating-point type. - -T - represents a type. - -V - represents a variable. - -X - represents a variable or constant of one of many types. See the - explanation of the function for details. - - All Modula-2 built-in procedures also return a result, described -below. - -`ABS(N)' - Returns the absolute value of N. - -`CAP(C)' - If C is a lower case letter, it returns its upper case equivalent, - otherwise it returns its argument - -`CHR(I)' - Returns the character whose ordinal value is I. - -`DEC(V)' - Decrements the value in the variable V. Returns the new value. - -`DEC(V,I)' - Decrements the value in the variable V by I. Returns the new - value. - -`EXCL(M,S)' - Removes the element M from the set S. Returns the new set. - -`FLOAT(I)' - Returns the floating point equivalent of the integer I. - -`HIGH(A)' - Returns the index of the last member of A. - -`INC(V)' - Increments the value in the variable V. Returns the new value. - -`INC(V,I)' - Increments the value in the variable V by I. Returns the new - value. - -`INCL(M,S)' - Adds the element M to the set S if it is not already there. - Returns the new set. - -`MAX(T)' - Returns the maximum value of the type T. - -`MIN(T)' - Returns the minimum value of the type T. - -`ODD(I)' - Returns boolean TRUE if I is an odd number. - -`ORD(X)' - Returns the ordinal value of its argument. For example, the - ordinal value of a character is its ASCII value (on machines - supporting the ASCII character set). X must be of an ordered - type, which include integral, character and enumerated types. - -`SIZE(X)' - Returns the size of its argument. X can be a variable or a type. - -`TRUNC(R)' - Returns the integral part of R. - -`VAL(T,I)' - Returns the member of the type T whose ordinal value is I. - - *Warning:* Sets and their operations are not yet supported, so - GDB will treat the use of procedures `INCL' and `EXCL' as an error. - - -File: gdb.info, Node: M2 Constants, Next: M2 Defaults, Prev: Built-In Func/Proc, Up: Modula-2 - -Constants ---------- - - GDB allows you to express the constants of Modula-2 in the following -ways: - - * Integer constants are simply a sequence of digits. When used in an - expression, a constant is interpreted to be type-compatible with - the rest of the expression. Hexadecimal integers are specified by - a trailing `H', and octal integers by a trailing `B'. - - * Floating point constants appear as a sequence of digits, followed - by a decimal point and another sequence of digits. An optional - exponent can then be specified, in the form `E[+|-]NNN', where - `[+|-]NNN' is the desired exponent. All of the digits of the - floating point constant must be valid decimal (base 10) digits. - - * Character constants consist of a single character enclosed by a - pair of like quotes, either single (`'') or double (`"'). They may - also be expressed by their ordinal value (their ASCII value, - usually) followed by a `C'. - - * String constants consist of a sequence of characters enclosed by a - pair of like quotes, either single (`'') or double (`"'). Escape - sequences in the style of C are also allowed. *Note C and C++ - constants: C Constants, for a brief explanation of escape - sequences. - - * Enumerated constants consist of an enumerated identifier. - - * Boolean constants consist of the identifiers `TRUE' and `FALSE'. - - * Pointer constants consist of integral values only. - - * Set constants are not yet supported. - - -File: gdb.info, Node: M2 Defaults, Next: Deviations, Prev: M2 Constants, Up: Modula-2 - -Modula-2 defaults ------------------ - - If type and range checking are set automatically by GDB, they both -default to `on' whenever the working language changes to Modula-2. -This happens regardless of whether you, or GDB, selected the working -language. - - If you allow GDB to set the language automatically, then entering -code compiled from a file whose name ends with `.mod' will set the -working language to Modula-2. *Note Having GDB set the language -automatically: Automatically, for further details. - - -File: gdb.info, Node: Deviations, Next: M2 Checks, Prev: M2 Defaults, Up: Modula-2 - -Deviations from standard Modula-2 ---------------------------------- - - A few changes have been made to make Modula-2 programs easier to -debug. This is done primarily via loosening its type strictness: - - * Unlike in standard Modula-2, pointer constants can be formed by - integers. This allows you to modify pointer variables during - debugging. (In standard Modula-2, the actual address contained in - a pointer variable is hidden from you; it can only be modified - through direct assignment to another pointer variable or - expression that returned a pointer.) - - * C escape sequences can be used in strings and characters to - represent non-printable characters. GDB will print out strings - with these escape sequences embedded. Single non-printable - characters are printed using the `CHR(NNN)' format. - - * The assignment operator (`:=') returns the value of its right-hand - argument. - - * All built-in procedures both modify *and* return their argument. - - -File: gdb.info, Node: M2 Checks, Next: M2 Scope, Prev: Deviations, Up: Modula-2 - -Modula-2 type and range checks ------------------------------- - - *Warning:* in this release, GDB does not yet perform type or range - checking. - - GDB considers two Modula-2 variables type equivalent if: - - * They are of types that have been declared equivalent via a `TYPE - T1 = T2' statement - - * They have been declared on the same line. (Note: This is true of - the GNU Modula-2 compiler, but it may not be true of other - compilers.) - - As long as type checking is enabled, any attempt to combine variables -whose types are not equivalent is an error. - - Range checking is done on all mathematical operations, assignment, -array index bounds, and all built-in functions and procedures. - - -File: gdb.info, Node: M2 Scope, Next: GDB/M2, Prev: M2 Checks, Up: Modula-2 - -The scope operators `::' and `.' --------------------------------- - - There are a few subtle differences between the Modula-2 scope -operator (`.') and the GDB scope operator (`::'). The two have similar -syntax: - - - MODULE . ID - SCOPE :: ID - -where SCOPE is the name of a module or a procedure, MODULE the name of -a module, and ID is any declared identifier within your program, except -another module. - - Using the `::' operator makes GDB search the scope specified by -SCOPE for the identifier ID. If it is not found in the specified -scope, then GDB will search all scopes enclosing the one specified by -SCOPE. - - Using the `.' operator makes GDB search the current scope for the -identifier specified by ID that was imported from the definition module -specified by MODULE. With this operator, it is an error if the -identifier ID was not imported from definition module MODULE, or if ID -is not an identifier in MODULE. - - -File: gdb.info, Node: GDB/M2, Prev: M2 Scope, Up: Modula-2 - -GDB and Modula-2 ----------------- - - Some GDB commands have little use when debugging Modula-2 programs. -Five subcommands of `set print' and `show print' apply specifically to -C and C++: `vtbl', `demangle', `asm-demangle', `object', and `union'. -The first four apply to C++, and the last to the C `union' type, which -has no direct analogue in Modula-2. - - The `@' operator (*note Expressions: Expressions.), while available -while using any language, is not useful with Modula-2. Its intent is -to aid the debugging of "dynamic arrays", which cannot be created in -Modula-2 as they can in C or C++. However, because an address can be -specified by an integral constant, the construct `{TYPE}ADREXP' is -still useful. (*note Expressions: Expressions.) - - In GDB scripts, the Modula-2 inequality operator `#' is interpreted -as the beginning of a comment. Use `<>' instead. - - -File: gdb.info, Node: Symbols, Next: Altering, Prev: Languages, Up: Top - -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. GDB finds it in your -program's symbol table, in the file indicated when you started GDB -(*note Choosing files: File Options.), or by one of the file-management -commands (*note Commands to specify files: Files.). - - Occasionally, you may need to refer to symbols that contain unusual -characters, which GDB ordinarily treats as word delimiters. The most -frequent case is in referring to static variables in other source files -(*note Program variables: Variables.). File names are recorded in -object files as debugging symbols, but GDB would ordinarily parse a -typical file name, like `foo.c', as the three words `foo' `.' `c'. To -allow GDB to recognize `foo.c' as a single symbol, enclose it in single -quotes; for example, - - p 'foo.c'::x - -looks up the value of `x' in the scope of the file `foo.c'. - -`info address SYMBOL' - Describe where the data for SYMBOL is stored. For a register - variable, this says which register it is kept in. For a - non-register local variable, this prints the stack-frame offset at - which the variable is always stored. - - Note the contrast with `print &SYMBOL', which does not work at all - for a register variable, and for a stack local variable prints the - exact address of the current instantiation of the variable. - -`whatis EXP' - Print the data type of expression EXP. EXP is not actually - evaluated, and any side-effecting operations (such as assignments - or function calls) inside it do not take place. *Note - Expressions: Expressions. - -`whatis' - Print the data type of `$', the last value in the value history. - -`ptype TYPENAME' - Print a description of data type TYPENAME. TYPENAME may be the - name of a type, or for C code it may have the form `class - CLASS-NAME', `struct STRUCT-TAG', `union UNION-TAG' or `enum - ENUM-TAG'. - -`ptype EXP' -`ptype' - Print a description of the type of expression EXP. `ptype' - differs from `whatis' by printing a detailed description, instead - of just the name of the type. - - For example, for this variable declaration: - - struct complex {double real; double imag;} v; - - the two commands give this output: - - (gdb) whatis v - type = struct complex - (gdb) ptype v - type = struct complex { - double real; - double imag; - } - - As with `whatis', using `ptype' without an argument refers to the - type of `$', the last value in the value history. - -`info types REGEXP' -`info types' - Print a brief description of all types whose name matches REGEXP - (or all types in your program, if you supply no argument). Each - complete typename is matched as though it were a complete line; - thus, `i type value' gives information on all types in your - program whose name includes the string `value', but `i type - ^value$' gives information only on types whose complete name is - `value'. - - This command differs from `ptype' in two ways: first, like - `whatis', it does not print a detailed description; second, it - lists all source files where a type is defined. - -`info source' - Show the name of the current source file--that is, the source file - for the function containing the current point of execution--and - the language it was written in. - -`info sources' - Print the names of all source files in your program for which - there is debugging information, organized into two lists: files - whose symbols have already been read, and files whose symbols will - be read when needed. - -`info functions' - Print the names and data types of all defined functions. - -`info functions REGEXP' - Print the names and data types of all defined functions whose - names contain a match for regular expression REGEXP. Thus, `info - fun step' finds all functions whose names include `step'; `info - fun ^step' finds those whose names start with `step'. - -`info variables' - Print the names and data types of all variables that are declared - outside of functions (i.e., excluding local variables). - -`info variables REGEXP' - Print the names and data types of all variables (except for local - variables) whose names contain a match for regular expression - REGEXP. - -`maint print symbols FILENAME' -`maint print psymbols FILENAME' -`maint print msymbols FILENAME' - Write a dump of debugging symbol data into the file FILENAME. - These commands are used to debug the GDB symbol-reading code. Only - symbols with debugging data are included. If you use `maint print - symbols', GDB includes all the symbols for which it has already - collected full details: that is, FILENAME reflects symbols for - only those files whose symbols GDB has read. You can use the - command `info sources' to find out which files these are. If you - use `maint print psymbols' instead, the dump shows information - about symbols that GDB only knows partially--that is, symbols - defined in files that GDB has skimmed, but not yet read - completely. Finally, `maint print msymbols' dumps just the - minimal symbol information required for each object file from - which GDB has read some symbols. *Note Commands to specify files: - Files, for a discussion of how GDB reads symbols (in the - description of `symbol-file'). - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-5 b/gnu/usr.bin/gdb/doc/gdb.info-5 deleted file mode 100644 index ecf3d18..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-5 +++ /dev/null @@ -1,1215 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Altering, Next: GDB Files, Prev: Symbols, Up: Top - -Altering Execution -****************** - - 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 GDB 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. - -* 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 - - -File: gdb.info, Node: Assignment, Next: Jumping, Up: Altering - -Assignment to variables -======================= - - To alter the value of a variable, evaluate an assignment expression. -*Note Expressions: Expressions. For example, - - print x=4 - -stores the value 4 into the variable `x', and then prints the value of -the assignment expression (which is 4). *Note Using GDB with Different -Languages: Languages, for more information on operators in supported -languages. - - If you are not interested in seeing the value of the assignment, use -the `set' command instead of the `print' command. `set' is really the -same as `print' except that the expression's value is not printed and -is not put in the value history (*note Value history: Value History.). -The expression is evaluated only for its effects. - - If the beginning of the argument string of the `set' command appears -identical to a `set' subcommand, use the `set variable' command instead -of just `set'. This command is identical to `set' except for its lack -of subcommands. For example, if your program has a variable `width', -you get an error if you try to set a new value with just `set width=13', -because GDB has the command `set width': - - (gdb) whatis width - type = double - (gdb) p width - $4 = 13 - (gdb) set width=47 - Invalid syntax in expression. - -The invalid expression, of course, is `=47'. In order to actually set -the program's variable `width', use - - (gdb) set var width=47 - - GDB allows more implicit conversions in assignments than C; you can -freely store an integer value into a pointer variable or vice versa, -and you can convert any structure to any other structure that is the -same length or shorter. - - To store values into arbitrary places in memory, use the `{...}' -construct to generate a value of specified type at a specified address -(*note Expressions: Expressions.). For example, `{int}0x83040' refers -to memory location `0x83040' as an integer (which implies a certain size -and representation in memory), and - - set {int}0x83040 = 4 - -stores the value 4 into that memory location. - - -File: gdb.info, Node: Jumping, Next: Signaling, Prev: Assignment, Up: Altering - -Continuing at a different address -================================= - - Ordinarily, when you continue your program, you do so at the place -where it stopped, with the `continue' command. You can instead -continue at an address of your own choosing, with the following -commands: - -`jump LINESPEC' - Resume execution at line LINESPEC. Execution will stop - immediately if there is a breakpoint there. *Note Printing source - lines: List, for a description of the different forms of LINESPEC. - - The `jump' command does not change the current stack frame, or the - stack pointer, or the contents of any memory location or any - register other than the program counter. If line LINESPEC is in a - different function from the one currently executing, the results - may be bizarre if the two functions expect different patterns of - arguments or of local variables. For this reason, the `jump' - command requests confirmation if the specified line is not in the - function currently executing. However, even bizarre results are - predictable if you are well acquainted with the machine-language - code of your program. - -`jump *ADDRESS' - Resume execution at the instruction at address ADDRESS. - - You can get much the same effect as the `jump' command by storing a -new value into the register `$pc'. The difference is that this does -not start your program running; it only changes the address where it -*will* run when it is continued. For example, - - set $pc = 0x485 - -causes the next `continue' command or stepping command to execute at -address `0x485', rather than at the address where your program stopped. -*Note Continuing and stepping: Continuing and Stepping. - - The most common occasion to use the `jump' command is to back up, -perhaps with more breakpoints set, over a portion of a program that has -already executed, in order to examine its execution in more detail. - - -File: gdb.info, Node: Signaling, Next: Returning, Prev: Jumping, Up: Altering - -Giving your program a signal -============================ - -`signal SIGNAL' - Resume execution where your program stopped, but immediately give - it the signal SIGNAL. SIGNAL can be the name or the number of a - signal. For example, on many systems `signal 2' and `signal - SIGINT' are both ways of sending an interrupt signal. - - Alternatively, if SIGNAL is zero, continue execution without - giving a signal. This is useful when your program stopped on - account of a signal and would ordinary see the signal when resumed - with the `continue' command; `signal 0' causes it to resume - without a signal. - - `signal' does not repeat when you press RET a second time after - executing the command. - - Invoking the `signal' command is not the same as invoking the `kill' -utility from the shell. Sending a signal with `kill' causes GDB to -decide what to do with the signal depending on the signal handling -tables (*note Signals::.). The `signal' command passes the signal -directly to your program. - - -File: gdb.info, Node: Returning, Next: Calling, Prev: Signaling, Up: Altering - -Returning from a function -========================= - -`return' -`return EXPRESSION' - You can cancel execution of a function call with the `return' - command. If you give an EXPRESSION argument, its value is used as - the function's return value. - - When you use `return', GDB 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 `return'. - - This pops the selected stack frame (*note Selecting a frame: -Selection.), and any other frames inside of it, leaving its caller as -the innermost remaining frame. That frame becomes selected. The -specified value is stored in the registers used for returning values of -functions. - - The `return' command does not resume execution; it leaves the -program stopped in the state that would exist if the function had just -returned. In contrast, the `finish' command (*note Continuing and -stepping: Continuing and Stepping.) resumes execution until the -selected stack frame returns naturally. - - -File: gdb.info, Node: Calling, Next: Patching, Prev: Returning, Up: Altering - -Calling program functions -========================= - -`call EXPR' - Evaluate the expression EXPR without displaying `void' returned - values. - - You can use this variant of the `print' command if you want to -execute a function from your program, but without cluttering the output -with `void' returned values. The result is printed and saved in the -value history, if it is not void. - - -File: gdb.info, Node: Patching, Prev: Calling, Up: Altering - -Patching programs -================= - - By default, GDB 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. - - If you'd like to be able to patch the binary, you can specify that -explicitly with the `set write' command. For example, you might want -to turn on internal debugging flags, or even to make emergency repairs. - -`set write on' -`set write off' - If you specify `set write on', GDB will open executable and core - files for both reading and writing; if you specify `set write off' - (the default), GDB will open them read-only. - - If you have already loaded a file, you must load it again (using - the `exec-file' or `core-file' command) after changing `set - write', for your new setting to take effect. - -`show write' - Display whether executable files and core files will be opened for - writing as well as reading. - - -File: gdb.info, Node: GDB Files, Next: Targets, Prev: Altering, Up: Top - -GDB Files -********* - - GDB 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. -To debug a core dump of a previous run, you must also tell GDB the name -of the core dump file. - -* Menu: - -* Files:: Commands to specify files -* Symbol Errors:: Errors reading symbol files - - -File: gdb.info, Node: Files, Next: Symbol Errors, Up: GDB Files - -Commands to specify files -========================= - - The usual way to specify executable and core dump file names is with -the command arguments given when you start GDB (*note Getting In and -Out of GDB: Invocation.. - - Occasionally it is necessary to change to a different file during a -GDB session. Or you may run GDB and forget to specify a file you want -to use. In these situations the GDB commands to specify new files are -useful. - -`file FILENAME' - Use 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 `run' command. If you do not - specify a directory and the file is not found in the GDB working - directory, GDB uses the environment variable `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 GDB and your program, using the `path' command. - - On systems with memory-mapped files, an auxiliary symbol table file - `FILENAME.syms' may be available for FILENAME. If it is, GDB will - map in the symbol table from `FILENAME.syms', starting up more - quickly. See the descriptions of the options `-mapped' and - `-readnow' (available on the command line, and with the commands - `file', `symbol-file', or `add-symbol-file'), for more information. - -`file' - `file' with no argument makes GDB discard any information it has - on both executable file and the symbol table. - -`exec-file [ FILENAME ]' - Specify that the program to be run (but not the symbol table) is - found in FILENAME. GDB will search the environment variable `PATH' - if necessary to locate your program. Omitting FILENAME means to - discard information on the executable file. - -`symbol-file [ FILENAME ]' - Read symbol table information from file FILENAME. `PATH' is - searched when necessary. Use the `file' command to get both symbol - table and program to run from the same file. - - `symbol-file' with no argument clears out GDB information on your - program's symbol table. - - The `symbol-file' command causes GDB 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 - GDB. - - `symbol-file' will not repeat if you press RET again after - executing it once. - - When GDB 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 `gcc' you can generate debugging information for optimized - code. - - On some kinds of object files, the `symbol-file' command does not - normally read the symbol table in full right away. Instead, it - scans the symbol table quickly to find which source files and - which symbols 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 GDB - 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 `set verbose' command can turn - these pauses into messages if desired. *Note Optional warnings - and messages: Messages/Warnings.) - - We have not implemented the two-stage strategy for COFF yet. When - the symbol table is stored in COFF format, `symbol-file' reads the - symbol table data in full right away. - -`symbol-file FILENAME [ -readnow ] [ -mapped ]' -`file FILENAME [ -readnow ] [ -mapped ]' - You can override the GDB two-stage strategy for reading symbol - tables by using the `-readnow' option with any of the commands that - load symbol table information, if you want to be sure GDB has the - entire symbol table available. - - If memory-mapped files are available on your system through the - `mmap' system call, you can use another option, `-mapped', to - cause GDB to write the symbols for your program into a reusable - file. Future GDB debugging sessions will map in symbol information - from this auxiliary symbol file (if the program has not changed), - rather than spending time reading the symbol table from the - executable program. Using the `-mapped' option has the same - effect as starting GDB with the `-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 MYPROG is called - `MYPROG.syms'. Once this file exists (so long as it is newer than - the corresponding executable), GDB will always attempt to use it - when you debug MYPROG; no special options or commands are needed. - - The `.syms' file is specific to the host machine where you run - GDB. It holds an exact image of the internal GDB symbol table. - It cannot be shared across multiple host platforms. - -`core-file [ FILENAME ]' - 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; GDB - can access the executable file itself for other parts. - - `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 GDB. 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 - `kill' command (*note Killing the child process: Kill Process.). - -`load FILENAME' - Depending on what remote debugging facilities are configured into - GDB, the `load' command may be available. Where it exists, it is - meant to make FILENAME (an executable) available for debugging on - the remote system--by downloading, or dynamic linking, for example. - `load' also records the FILENAME symbol table in GDB, like the - `add-symbol-file' command. - - If your GDB does not have a `load' command, attempting to execute - it gets the error message "`You can't do that when your target is - ...'" - - The file is loaded at whatever address is specified in the - executable. For some object file formats, like a.out, the object - file format fixes the address and so it won't necessarily match - the address you gave to the linker. - - On VxWorks, `load' will dynamically link FILENAME on the current - target system as well as adding its symbols in GDB. - - With the Nindy interface to an Intel 960 board, `load' will - download FILENAME to the 960 as well as adding its symbols in GDB. - - When you select remote debugging to a Hitachi SH, H8/300, or - H8/500 board (*note GDB and Hitachi Microprocessors: Hitachi - Remote.), the `load' command downloads your program to the Hitachi - board and also opens it as the current executable target for GDB - on your host (like the `file' command). - - `load' will not repeat if you press RET again after using it. - -`add-symbol-file FILENAME ADDRESS' -`add-symbol-file FILENAME ADDRESS [ -readnow ] [ -mapped ]' - The `add-symbol-file' command reads additional symbol table - information from the file FILENAME. You would use this command - when FILENAME has been dynamically loaded (by some other means) - into the program that is running. ADDRESS should be the memory - address at which the file has been loaded; GDB cannot figure this - out for itself. You can specify ADDRESS as an expression. - - The symbol table of the file FILENAME is added to the symbol table - originally read with the `symbol-file' command. You can use the - `add-symbol-file' command any number of times; the new symbol data - thus read keeps adding to the old. To discard all old symbol data - instead, use the `symbol-file' command. - - `add-symbol-file' will not repeat if you press RET after using it. - - You can use the `-mapped' and `-readnow' options just as with the - `symbol-file' command, to change how GDB manages the symbol table - information for FILENAME. - -`info files' -`info target' - `info files' and `info target' are synonymous; both print the - current target (*note Specifying a Debugging Target: Targets.), - including the names of the executable and core dump files - currently in use by GDB, and the files from which symbols were - loaded. The command `help targets' lists all possible targets - rather than current ones. - - All file-specifying commands allow both absolute and relative file -names as arguments. GDB always converts the file name to an absolute -path name and remembers it that way. - - GDB supports SunOS, SVR4, and IBM RS/6000 shared libraries. GDB -automatically loads symbol definitions from shared libraries when you -use the `run' command, or when you examine a core file. (Before you -issue the `run' command, GDB will not understand references to a -function in a shared library, however--unless you are debugging a core -file). - -`info share' -`info sharedlibrary' - Print the names of the shared libraries which are currently loaded. - -`sharedlibrary REGEX' -`share REGEX' - This is an obsolescent command; you can use it to explicitly load - shared object library symbols for files matching a Unix regular - expression, but as with files loaded automatically, it will only - load shared libraries required by your program for a core file or - after typing `run'. If REGEX is omitted all shared libraries - required by your program are loaded. - - -File: gdb.info, Node: Symbol Errors, Prev: Files, Up: GDB Files - -Errors reading symbol files -=========================== - - While reading a symbol file, GDB will occasionally encounter -problems, such as symbol types it does not recognize, or known bugs in -compiler output. By default, GDB 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 GDB to print only one -message about each such type of problem, no matter how many times the -problem occurs; or you can ask GDB to print more messages, to see how -many times the problems occur, with the `set complaints' command (*note -Optional warnings and messages: Messages/Warnings.). - - The messages currently printed, and their meanings, include: - -`inner block not inside outer block in SYMBOL' - The symbol information shows where symbol scopes begin and end - (such as at the start of a function or a block of statements). - This error indicates that an inner scope block is not fully - contained in its outer scope blocks. - - GDB circumvents the problem by treating the inner block as if it - had the same scope as the outer block. In the error message, - SYMBOL may be shown as "`(don't know)'" if the outer block is not a - function. - -`block at ADDRESS out of order' - The symbol information for symbol scope blocks should occur in - order of increasing addresses. This error indicates that it does - not do so. - - GDB does not circumvent this problem, and will have trouble - locating symbols in the source file whose symbols it is reading. - (You can often determine what source file is affected by specifying - `set verbose on'. *Note Optional warnings and messages: - Messages/Warnings.) - -`bad block start address patched' - The symbol information for a symbol scope block has a start address - smaller than the address of the preceding source line. This is - known to occur in the SunOS 4.1.1 (and earlier) C compiler. - - GDB circumvents the problem by treating the symbol scope block as - starting on the previous source line. - -`bad string table offset in symbol N' - Symbol number N contains a pointer into the string table which is - larger than the size of the string table. - - GDB circumvents the problem by considering the symbol to have the - name `foo', which may cause other problems if many symbols end up - with this name. - -`unknown symbol type `0xNN'' - The symbol information contains new data types that GDB does not - yet know how to read. `0xNN' is the symbol type of the - misunderstood information, in hexadecimal. - - GDB 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 `gdb' with - itself, breakpoint on `complain', then go up to the function - `read_dbx_symtab' and examine `*bufp' to see the symbol. - -`stub type has NULL name' - GDB could not find the full definition for a struct or class. - -`const/volatile indicator missing (ok if using g++ v1.x), got...' - The symbol information for a C++ member function is missing some - information that recent versions of the compiler should have output - for it. - -`info mismatch between compiler and debugger' - GDB could not parse a type specification output by the compiler. - - -File: gdb.info, Node: Targets, Next: Controlling GDB, Prev: GDB Files, Up: Top - -Specifying a Debugging Target -***************************** - - A "target" is the execution environment occupied by your program. -Often, GDB 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 `file' or `core' commands. When you need more flexibility--for -example, running GDB on a physically separate host, or controlling a -standalone system over a serial port or a realtime system over a TCP/IP -connection--you can use the `target' command to specify one of the -target types configured for GDB (*note Commands for managing targets: -Target Commands.). - -* Menu: - -* Active Targets:: Active targets -* Target Commands:: Commands for managing targets -* Remote:: Remote debugging - - -File: gdb.info, Node: Active Targets, Next: Target Commands, Up: Targets - -Active targets -============== - - There are three classes of targets: processes, core files, and -executable files. GDB 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. - - For example, if you execute `gdb a.out', then the executable file -`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 GDB -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.) - - When you type `run', your executable file becomes an active process -target as well. When a process target is active, all GDB commands -requesting memory addresses refer to that target; addresses in an -active core file or executable file target are obscured while the -process target is active. - - Use the `core-file' and `exec-file' commands to select a new core -file or executable target (*note Commands to specify files: Files.). -To specify as a target a process that is already running, use the -`attach' command (*note Debugging an already-running process: Attach.). - - -File: gdb.info, Node: Target Commands, Next: Remote, Prev: Active Targets, Up: Targets - -Commands for managing targets -============================= - -`target TYPE PARAMETERS' - Connects the GDB host environment to a target machine or process. - A target is typically a protocol for talking to debugging - facilities. You use the argument TYPE to specify the type or - protocol of the target machine. - - Further 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. - - The `target' command will not repeat if you press RET again after - executing the command. - -`help target' - Displays the names of all targets available. To display targets - currently selected, use either `info target' or `info files' - (*note Commands to specify files: Files.). - -`help target NAME' - Describe a particular target, including any parameters necessary to - select it. - - Here are some common targets (available, or not, depending on the GDB -configuration): - -`target exec PROGRAM' - An executable file. `target exec PROGRAM' is the same as - `exec-file PROGRAM'. - -`target core FILENAME' - A core dump file. `target core FILENAME' is the same as - `core-file FILENAME'. - -`target remote DEV' - Remote serial target in GDB-specific protocol. The argument DEV - specifies what serial device to use for the connection (e.g. - `/dev/ttya'). *Note Remote debugging: Remote. - -`target sim' - CPU simulator. *Note Simulated CPU Target: Simulator. - -`target udi KEYWORD' - Remote AMD29K target, using the AMD UDI protocol. The KEYWORD - argument specifies which 29K board or simulator to use. *Note GDB - and the UDI protocol for AMD29K: UDI29K Remote. - -`target amd-eb DEV SPEED PROG' - Remote PC-resident AMD EB29K board, attached over serial lines. - dEV is the serial device, as for `target remote'; SPEED allows you - to specify the linespeed; and PROG is the name of the program to - be debugged, as it appears to DOS on the PC. *Note GDB with a - remote EB29K: EB29K Remote. - -`target hms' - A Hitachi SH, H8/300, or H8/500 board, attached via serial line to - your host. Use special commands `device' and `speed' to control - the serial line and the communications speed used. *Note GDB and - Hitachi Microprocessors: Hitachi Remote. - -`target nindy DEVICENAME' - An Intel 960 board controlled by a Nindy Monitor. DEVICENAME is - the name of the serial device to use for the connection, e.g. - `/dev/ttya'. *Note GDB with a remote i960 (Nindy): i960-Nindy - Remote. - -`target st2000 DEV SPEED' - A Tandem ST2000 phone switch, running Tandem's STDBUG protocol. - dEV is the name of the device attached to the ST2000 serial line; - SPEED is the communication line speed. The arguments are not used - if GDB is configured to connect to the ST2000 using TCP or Telnet. - *Note GDB with a Tandem ST2000: ST2000 Remote. - -`target vxworks MACHINENAME' - A VxWorks system, attached via TCP/IP. The argument MACHINENAME - is the target system's machine name or IP address. *Note GDB and - VxWorks: VxWorks Remote. - - Different targets are available on different configurations of GDB; -your configuration may have more or fewer targets. - - -File: gdb.info, Node: Remote, Prev: Target Commands, Up: Targets - -Remote debugging -================ - - If you are trying to debug a program running on a machine that -cannot run GDB in the usual way, it is often useful to use remote -debugging. For example, you might use remote debugging on an operating -system kernel, or on a small system which does not have a general -purpose operating system powerful enough to run a full-featured -debugger. - - Some configurations of GDB have special serial or TCP/IP interfaces -to make this work with particular debugging targets. In addition, GDB -comes with a generic serial protocol (specific to GDB, but not specific -to any particular target system) which you can use if you write the -remote stubs--the code that will run on the remote system to -communicate with GDB. - - Other remote targets may be available in your configuration of GDB; -use `help targets' to list them. - -* Menu: - - -* Remote Serial:: GDB remote serial protocol - -* i960-Nindy Remote:: GDB with a remote i960 (Nindy) - -* UDI29K Remote:: GDB and the UDI protocol for AMD29K -* EB29K Remote:: GDB with a remote EB29K - -* VxWorks Remote:: GDB and VxWorks - -* ST2000 Remote:: GDB with a Tandem ST2000 - -* Hitachi Remote:: GDB and Hitachi Microprocessors - -* MIPS Remote:: GDB and MIPS boards - -* Simulator:: Simulated CPU target - - -File: gdb.info, Node: Remote Serial, Next: i960-Nindy Remote, Up: Remote - -The GDB remote serial protocol ------------------------------- - - To debug a program running on another machine (the debugging -"target" machine), you must first arrange for all the usual -prerequisites for the program to run by itself. For example, for a C -program, you need - - 1. A startup routine to set up the C runtime environment; these - usually have a name like `crt0'. The startup routine may be - supplied by your hardware supplier, or you may have to write your - own. - - 2. You probably need a C subroutine library to support your program's - subroutine calls, notably managing input and output. - - 3. A way of getting your program to the other machine--for example, a - download program. These are often supplied by the hardware - manufacturer, but you may have to write your own from hardware - documentation. - - The next step is to arrange for your program to use a serial port to -communicate with the machine where GDB is running (the "host" machine). -In general terms, the scheme looks like this: - -*On the host,* - GDB already understands how to use this protocol; when everything - else is set up, you can simply use the `target remote' command - (*note Specifying a Debugging Target: Targets.). - -*On the target,* - you must link with your program a few special-purpose subroutines - that implement the GDB remote serial protocol. The file - containing these subroutines is called a "debugging stub". - - On certain remote targets, you can use an auxiliary program - `gdbserver' instead of linking a stub into your program. *Note - Using the `gdbserver' program: Server, for details. - - The debugging stub is specific to the architecture of the remote -machine; for example, use `sparc-stub.c' to debug programs on SPARC -boards. - - These working remote stubs are distributed with GDB: - -`sparc-stub.c' - For SPARC architectures. - -`m68k-stub.c' - For Motorola 680x0 architectures. - -`i386-stub.c' - For Intel 386 and compatible architectures. - - The `README' file in the GDB distribution may list other recently -added stubs. - -* Menu: - -* Stub Contents:: What the stub can do for you -* Bootstrapping:: What you must do for the stub -* Debug Session:: Putting it all together -* Protocol:: Outline of the communication protocol - -* Server:: Using the `gdbserver' program - - -File: gdb.info, Node: Stub Contents, Next: Bootstrapping, Up: Remote Serial - -What the stub can do for you ----------------------------- - - The debugging stub for your architecture supplies these three -subroutines: - -`set_debug_traps' - This routine arranges for `handle_exception' to run when your - program stops. You must call this subroutine explicitly near the - beginning of your program. - -`handle_exception' - This is the central workhorse, but your program never calls it - explicitly--the setup code arranges for `handle_exception' to run - when a trap is triggered. - - `handle_exception' takes control when your program stops during - execution (for example, on a breakpoint), and mediates - communications with GDB on the host machine. This is where the - communications protocol is implemented; `handle_exception' acts as - the GDB representative on the target machine; it begins by sending - summary information on the state of your program, then continues - to execute, retrieving and transmitting any information GDB needs, - until you execute a GDB command that makes your program resume; at - that point, `handle_exception' returns control to your own code on - the target machine. - -`breakpoint' - Use this auxiliary subroutine to make your program contain a - breakpoint. Depending on the particular situation, this may be - the only way for GDB to get control. For instance, if your target - machine has some sort of interrupt button, you won't need to call - this; pressing the interrupt button will transfer control to - `handle_exception'--in effect, to GDB. On some machines, simply - receiving characters on the serial port may also trigger a trap; - again, in that situation, you don't need to call `breakpoint' from - your own program--simply running `target remote' from the host GDB - session will get control. - - Call `breakpoint' if none of these is true, or if you simply want - to make certain your program stops at a predetermined point for the - start of your debugging session. - - -File: gdb.info, Node: Bootstrapping, Next: Debug Session, Prev: Stub Contents, Up: Remote Serial - -What you must do for the stub ------------------------------ - - The debugging stubs that come with GDB are set up for a particular -chip architecture, but they have no information about the rest of your -debugging target machine. To allow the stub to work, you must supply -these special low-level subroutines: - -`int getDebugChar()' - Write this subroutine to read a single character from the serial - port. It may be identical to `getchar' for your target system; a - different name is used to allow you to distinguish the two if you - wish. - -`void putDebugChar(int)' - Write this subroutine to write a single character to the serial - port. It may be identical to `putchar' for your target system; a - different name is used to allow you to distinguish the two if you - wish. - -`void exceptionHandler (int EXCEPTION_NUMBER, void *EXCEPTION_ADDRESS)' - Write this function to install EXCEPTION_ADDRESS in the exception - handling tables. You need to do this because the stub does not - have any way of knowing what the exception handling tables on your - target system are like (for example, the processor's table might - be in ROM, containing entries which point to a table in RAM). - eXCEPTION_NUMBER is the exception number which should be changed; - its meaning is architecture-dependent (for example, different - numbers might represent divide by zero, misaligned access, etc). - When this exception occurs, control should be transferred directly - to EXCEPTION_ADDRESS, and the processor state (stack, registers, - etc.) should be just as it is when a processor exception occurs. - So if you want to use a jump instruction to reach - EXCEPTION_ADDRESS, it should be a simple jump, not a jump to - subroutine. - - For the 386, EXCEPTION_ADDRESS should be installed as an interrupt - gate so that interrupts are masked while the handler runs. The - gate should be at privilege level 0 (the most privileged level). - The SPARC and 68k stubs are able to mask interrupts themself - without help from `exceptionHandler'. - -`void flush_i_cache()' - Write this subroutine to flush the instruction cache, if any, on - your target machine. If there is no instruction cache, this - subroutine may be a no-op. - - On target machines that have instruction caches, GDB requires this - function to make certain that the state of your program is stable. - -You must also make sure this library routine is available: - -`void *memset(void *, int, int)' - This is the standard library function `memset' that sets an area of - memory to a known value. If you have one of the free versions of - `libc.a', `memset' can be found there; otherwise, you must either - obtain it from your hardware manufacturer, or write your own. - - If you do not use the GNU C compiler, you may need other standard -library subroutines as well; this will vary from one stub to another, -but in general the stubs are likely to use any of the common library -subroutines which `gcc' generates as inline code. - - -File: gdb.info, Node: Debug Session, Next: Protocol, Prev: Bootstrapping, Up: Remote Serial - -Putting it all together ------------------------ - - In summary, when your program is ready to debug, you must follow -these steps. - - 1. Make sure you have the supporting low-level routines (*note What - you must do for the stub: Bootstrapping.): - `getDebugChar', `putDebugChar', - `flush_i_cache', `memset', `exceptionHandler'. - - 2. Insert these lines near the top of your program: - - set_debug_traps(); - breakpoint(); - - 3. For the 680x0 stub only, you need to provide a variable called - `exceptionHook'. Normally you just use - - void (*exceptionHook)() = 0; - - but if before calling `set_debug_traps', you set it to point to a - function in your program, that function is called when `GDB' - continues after stopping on a trap (for example, bus error). The - function indicated by `exceptionHook' is called with one - parameter: an `int' which is the exception number. - - 4. Compile and link together: your program, the GDB debugging stub for - your target architecture, and the supporting subroutines. - - 5. Make sure you have a serial connection between your target machine - and the GDB host, and identify the serial port used for this on - the host. - - 6. Download your program to your target machine (or get it there by - whatever means the manufacturer provides), and start it. - - 7. To start remote debugging, run GDB on the host machine, and specify - as an executable file the program that is running in the remote - machine. This tells GDB how to find your program's symbols and - the contents of its pure text. - - Then establish communication using the `target remote' command. - Its argument specifies how to communicate with the target - machine--either via a devicename attached to a direct serial line, - or a TCP port (usually to a terminal server which in turn has a - serial line to the target). For example, to use a serial line - connected to the device named `/dev/ttyb': - - target remote /dev/ttyb - - To use a TCP connection, use an argument of the form `HOST:port'. - For example, to connect to port 2828 on a terminal server named - `manyfarms': - - target remote manyfarms:2828 - - Now you can use all the usual commands to examine and change data -and to step and continue the remote program. - - To resume the remote program and stop debugging it, use the `detach' -command. - - Whenever GDB is waiting for the remote program, if you type the -interrupt character (often C-C), GDB attempts to stop the program. -This may or may not succeed, depending in part on the hardware and the -serial drivers the remote system uses. If you type the interrupt -character once again, GDB displays this prompt: - - Interrupted while waiting for the program. - Give up (and stop debugging it)? (y or n) - - If you type `y', GDB abandons the remote debugging session. (If you -decide you want to try again later, you can use `target remote' again -to connect once more.) If you type `n', GDB goes back to waiting. - - -File: gdb.info, Node: Protocol, Next: Server, Prev: Debug Session, Up: Remote Serial - -Outline of the communication protocol -------------------------------------- - - The stub files provided with GDB implement the target side of the -communication protocol, and the GDB side is implemented in the GDB -source file `remote.c'. Normally, you can simply allow these -subroutines to communicate, and ignore the details. (If you're -implementing your own stub file, you can still ignore the details: start -with one of the existing stub files. `sparc-stub.c' is the best -organized, and therefore the easiest to read.) - - However, there may be occasions when you need to know something about -the protocol--for example, if there is only one serial port to your -target machine, you might want your program to do something special if -it recognizes a packet meant for GDB. - - All GDB commands and responses (other than acknowledgements, which -are single characters) are sent as a packet which includes a checksum. -A packet is introduced with the character `$', and ends with the -character `#' followed by a two-digit checksum: - - $PACKET INFO#CHECKSUM - -CHECKSUM is computed as the modulo 256 sum of the PACKET INFO -characters. - - When either the host or the target machine receives a packet, the -first response expected is an acknowledgement: a single character, -either `+' (to indicate the package was received correctly) or `-' (to -request retransmission). - - The host (GDB) sends commands, and the target (the debugging stub -incorporated in your program) sends data in response. The target also -sends data when your program stops. - - Command packets are distinguished by their first character, which -identifies the kind of command. - - These are the commands currently supported: - -`g' - Requests the values of CPU registers. - -`G' - Sets the values of CPU registers. - -`mADDR,COUNT' - Read COUNT bytes at location ADDR. - -`MADDR,COUNT:...' - Write COUNT bytes at location ADDR. - -`c' -`cADDR' - Resume execution at the current address (or at ADDR if supplied). - -`s' -`sADDR' - Step the target program for one instruction, from either the - current program counter or from ADDR if supplied. - -`k' - Kill the target program. - -`?' - Report the most recent signal. To allow you to take advantage of - the GDB signal handling commands, one of the functions of the - debugging stub is to report CPU traps as the corresponding POSIX - signal values. - - If you have trouble with the serial connection, you can use the -command `set remotedebug'. This makes GDB report on all packets sent -back and forth across the serial line to the remote machine. The -packet-debugging information is printed on the GDB standard output -stream. `set remotedebug off' turns it off, and `show remotedebug' -will show you its current state. - - -File: gdb.info, Node: Server, Prev: Protocol, Up: Remote Serial - -Using the `gdbserver' program ------------------------------ - - `gdbserver' is a control program for Unix-like systems, which allows -you to connect your program with a remote GDB via `target remote'--but -without linking in the usual debugging stub. - - `gdbserver' is not a complete replacement for the debugging stubs, -because it requires essentially the same operating-system facilities -that GDB itself does. In fact, a system that can run `gdbserver' to -connect to a remote GDB could also run GDBN locally! `gdbserver' is -sometimes useful nevertheless, because it is a much smaller program -than GDB itself. It is also easier to port than all of GDBN, so you -may be able to get started more quickly on a new system by using -`gdbserver'. - - GDB and `gdbserver' communicate via either a serial line or a TCP -connection, using the standard GDB remote serial protocol. - -*On the target,* - you need to have a copy of the program you want to debug. - `gdbserver' does not need your program's symbol table, so you can - strip the program if necessary to save space. GDB on the host - system does all the symbol handling. - - To use the server, you must tell it how to communicate with {No - Value For "GDB"}; the name of your program; and the arguments for - your program. The syntax is: - - target> gdbserver COMM PROGRAM [ ARGS ... ] - - COMM is either a device name (to use a serial line) or a TCP - hostname and portnumber. For example, to debug emacs with the - argument `foo.txt' and communicate with GDB over the serial port - `/dev/com1': - - target> gdbserver /dev/com1 emacs foo.txt - - `gdbserver' waits passively for the host GDB to communicate with - it. - - To use a TCP connection instead of a serial line: - - target> gdbserver host:2345 emacs foo.txt - - The only difference from the previous example is the first - argument, specifying that you are communicating with the host GDB - via TCP. The `host:2345' argument means that `gdbserver' is to - expect a TCP connection from machine `host' to local TCP port 2345. - (Currently, the `host' part is ignored.) You can choose any number - you want for the port number as long as it does not conflict with - any TCP ports already in use on the target system.(1) You must use - the same port number with the host GDB `target remote' command. - -*On the host,* - you need an unstripped copy of your program, since GDB needs - symbols and debugging information. Start up GDB as usual, using - the name of the local copy of your program as the first argument. - (You may also need the `--baud' option if the serial line is - running at anything other than 9600 bps.) After that, use `target - remote' to establish communications with `gdbserver'. Its - argument is either a device name (usually a serial device, like - `/dev/ttyb'), or a TCP port descriptof in the form `HOST:PORT'. - For example: - - (gdb) target remote /dev/ttyb - - communicates with the server via serial line `/dev/ttyb', and - - (gdb) target remote the-target:2345 - - communicates via a TCP connection to port 2345 on host - `the-target'. For TCP connections, you must start up `gdbserver' - prior to using the `target remote' command. Otherwise you may get - an error whose text depends on the host system, but which usually - looks something like `Connection refused'. - - ---------- Footnotes ---------- - - (1) If you choose a port number that conflicts with another -service, `gdbserver' prints an error message and exits. - - -File: gdb.info, Node: i960-Nindy Remote, Next: UDI29K Remote, Prev: Remote Serial, Up: Remote - -GDB with a remote i960 (Nindy) ------------------------------- - - "Nindy" is a ROM Monitor program for Intel 960 target systems. When -GDB is configured to control a remote Intel 960 using Nindy, you can -tell GDB how to connect to the 960 in several ways: - - * Through command line options specifying serial port, version of the - Nindy protocol, and communications speed; - - * By responding to a prompt on startup; - - * By using the `target' command at any point during your GDB - session. *Note Commands for managing targets: Target Commands. - -* Menu: - -* Nindy Startup:: Startup with Nindy -* Nindy Options:: Options for Nindy -* Nindy Reset:: Nindy reset command - - -File: gdb.info, Node: Nindy Startup, Next: Nindy Options, Up: i960-Nindy Remote - -Startup with Nindy ------------------- - - If you simply start `gdb' without using any command-line options, -you are prompted for what serial port to use, *before* you reach the -ordinary GDB prompt: - - Attach /dev/ttyNN -- specify NN, or "quit" to quit: - -Respond to the prompt with whatever suffix (after `/dev/tty') -identifies the serial port you want to use. You can, if you choose, -simply start up with no Nindy connection by responding to the prompt -with an empty line. If you do this and later wish to attach to Nindy, -use `target' (*note Commands for managing targets: Target Commands.). - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-6 b/gnu/usr.bin/gdb/doc/gdb.info-6 deleted file mode 100644 index 8a746fd..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-6 +++ /dev/null @@ -1,1220 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Nindy Options, Next: Nindy Reset, Prev: Nindy Startup, Up: i960-Nindy Remote - -Options for Nindy ------------------ - - These are the startup options for beginning your GDB session with a -Nindy-960 board attached: - -`-r PORT' - Specify the serial port name of a serial interface to be used to - connect to the target system. This option is only available when - GDB is configured for the Intel 960 target architecture. You may - specify PORT as any of: a full pathname (e.g. `-r /dev/ttya'), a - device name in `/dev' (e.g. `-r ttya'), or simply the unique - suffix for a specific `tty' (e.g. `-r a'). - -`-O' - (An uppercase letter "O", not a zero.) Specify that GDB should use - the "old" Nindy monitor protocol to connect to the target system. - This option is only available when GDB is configured for the Intel - 960 target architecture. - - *Warning:* if you specify `-O', but are actually trying to - connect to a target system that expects the newer protocol, - the connection fails, appearing to be a speed mismatch. GDB - repeatedly attempts to reconnect at several different line - speeds. You can abort this process with an interrupt. - -`-brk' - Specify that GDB should first send a `BREAK' signal to the target - system, in an attempt to reset it, before connecting to a Nindy - target. - - *Warning:* Many target systems do not have the hardware that - this requires; it only works with a few boards. - - The standard `-b' option controls the line speed used on the serial -port. - - -File: gdb.info, Node: Nindy Reset, Prev: Nindy Options, Up: i960-Nindy Remote - -Nindy reset command -------------------- - -`reset' - For a Nindy target, this command sends a "break" to the remote - target system; this is only useful if the target has been equipped - with a circuit to perform a hard reset (or some other interesting - action) when a break is detected. - - -File: gdb.info, Node: UDI29K Remote, Next: EB29K Remote, Prev: i960-Nindy Remote, Up: Remote - -GDB and the UDI protocol for AMD29K ------------------------------------ - - GDB supports AMD's UDI ("Universal Debugger Interface") protocol for -debugging the a29k processor family. To use this configuration with -AMD targets running the MiniMON monitor, you need the program `MONTIP', -available from AMD at no charge. You can also use GDB with the UDI -conformant a29k simulator program `ISSTIP', also available from AMD. - -`target udi KEYWORD' - Select the UDI interface to a remote a29k board or simulator, where - KEYWORD is an entry in the AMD configuration file `udi_soc'. This - file contains keyword entries which specify parameters used to - connect to a29k targets. If the `udi_soc' file is not in your - working directory, you must set the environment variable `UDICONF' - to its pathname. - - -File: gdb.info, Node: EB29K Remote, Next: VxWorks Remote, Prev: UDI29K Remote, Up: Remote - -GDB and the EBMON protocol for AMD29K -------------------------------------- - - AMD distributes a 29K development board meant to fit in a PC, -together with a DOS-hosted monitor program called `EBMON'. As a -shorthand term, this development system is called the "EB29K". To use -GDB from a Unix system to run programs on the EB29K board, you must -first connect a serial cable between the PC (which hosts the EB29K -board) and a serial port on the Unix system. In the following, we -assume you've hooked the cable between the PC's `COM1' port and -`/dev/ttya' on the Unix system. - -* Menu: - -* Comms (EB29K):: Communications setup -* gdb-EB29K:: EB29K cross-debugging -* Remote Log:: Remote log - - -File: gdb.info, Node: Comms (EB29K), Next: gdb-EB29K, Up: EB29K Remote - -Communications setup --------------------- - - The next step is to set up the PC's port, by doing something like -this in DOS on the PC: - - C:\> MODE com1:9600,n,8,1,none - -This example--run on an MS DOS 4.0 system--sets the PC port to 9600 -bps, no parity, eight data bits, one stop bit, and no "retry" action; -you must match the communications parameters when establishing the Unix -end of the connection as well. - - To give control of the PC to the Unix side of the serial line, type -the following at the DOS console: - - C:\> CTTY com1 - -(Later, if you wish to return control to the DOS console, you can use -the command `CTTY con'--but you must send it over the device that had -control, in our example over the `COM1' serial line). - - From the Unix host, use a communications program such as `tip' or -`cu' to communicate with the PC; for example, - - cu -s 9600 -l /dev/ttya - -The `cu' options shown specify, respectively, the linespeed and the -serial port to use. If you use `tip' instead, your command line may -look something like the following: - - tip -9600 /dev/ttya - -Your system may require a different name where we show `/dev/ttya' as -the argument to `tip'. The communications parameters, including which -port to use, are associated with the `tip' argument in the "remote" -descriptions file--normally the system table `/etc/remote'. - - Using the `tip' or `cu' connection, change the DOS working directory -to the directory containing a copy of your 29K program, then start the -PC program `EBMON' (an EB29K control program supplied with your board -by AMD). You should see an initial display from `EBMON' similar to the -one that follows, ending with the `EBMON' prompt `#'-- - - C:\> G: - - G:\> CD \usr\joe\work29k - - G:\USR\JOE\WORK29K> EBMON - Am29000 PC Coprocessor Board Monitor, version 3.0-18 - Copyright 1990 Advanced Micro Devices, Inc. - Written by Gibbons and Associates, Inc. - - Enter '?' or 'H' for help - - PC Coprocessor Type = EB29K - I/O Base = 0x208 - Memory Base = 0xd0000 - - Data Memory Size = 2048KB - Available I-RAM Range = 0x8000 to 0x1fffff - Available D-RAM Range = 0x80002000 to 0x801fffff - - PageSize = 0x400 - Register Stack Size = 0x800 - Memory Stack Size = 0x1800 - - CPU PRL = 0x3 - Am29027 Available = No - Byte Write Available = Yes - - # ~. - - Then exit the `cu' or `tip' program (done in the example by typing -`~.' at the `EBMON' prompt). `EBMON' will keep running, ready for GDB -to take over. - - For this example, we've assumed what is probably the most convenient -way to make sure the same 29K program is on both the PC and the Unix -system: a PC/NFS connection that establishes "drive `G:'" on the PC as -a file system on the Unix host. If you do not have PC/NFS or something -similar connecting the two systems, you must arrange some other -way--perhaps floppy-disk transfer--of getting the 29K program from the -Unix system to the PC; GDB will *not* download it over the serial line. - - -File: gdb.info, Node: gdb-EB29K, Next: Remote Log, Prev: Comms (EB29K), Up: EB29K Remote - -EB29K cross-debugging ---------------------- - - Finally, `cd' to the directory containing an image of your 29K -program on the Unix system, and start GDB--specifying as argument the -name of your 29K program: - - cd /usr/joe/work29k - gdb myfoo - - Now you can use the `target' command: - - target amd-eb /dev/ttya 9600 MYFOO - -In this example, we've assumed your program is in a file called -`myfoo'. Note that the filename given as the last argument to `target -amd-eb' should be the name of the program as it appears to DOS. In our -example this is simply `MYFOO', but in general it can include a DOS -path, and depending on your transfer mechanism may not resemble the -name on the Unix side. - - At this point, you can set any breakpoints you wish; when you are -ready to see your program run on the 29K board, use the GDB command -`run'. - - To stop debugging the remote program, use the GDB `detach' command. - - To return control of the PC to its console, use `tip' or `cu' once -again, after your GDB session has concluded, to attach to `EBMON'. You -can then type the command `q' to shut down `EBMON', returning control -to the DOS command-line interpreter. Type `CTTY con' to return command -input to the main DOS console, and type `~.' to leave `tip' or `cu'. - - -File: gdb.info, Node: Remote Log, Prev: gdb-EB29K, Up: EB29K Remote - -Remote log ----------- - - The `target amd-eb' command creates a file `eb.log' in the current -working directory, to help debug problems with the connection. -`eb.log' records all the output from `EBMON', including echoes of the -commands sent to it. Running `tail -f' on this file in another window -often helps to understand trouble with `EBMON', or unexpected events on -the PC side of the connection. - - -File: gdb.info, Node: ST2000 Remote, Next: Hitachi Remote, Prev: VxWorks Remote, Up: Remote - -GDB with a Tandem ST2000 ------------------------- - - To connect your ST2000 to the host system, see the manufacturer's -manual. Once the ST2000 is physically attached, you can run - - target st2000 DEV SPEED - -to establish it as your debugging environment. DEV is normally the -name of a serial device, such as `/dev/ttya', connected to the ST2000 -via a serial line. You can instead specify DEV as a TCP connection -(for example, to a serial line attached via a terminal concentrator) -using the syntax `HOSTNAME:PORTNUMBER'. - - The `load' and `attach' commands are *not* defined for this target; -you must load your program into the ST2000 as you normally would for -standalone operation. GDB will read debugging information (such as -symbols) from a separate, debugging version of the program available on -your host computer. - - These auxiliary GDB commands are available to help you with the -ST2000 environment: - -`st2000 COMMAND' - Send a COMMAND to the STDBUG monitor. See the manufacturer's - manual for available commands. - -`connect' - Connect the controlling terminal to the STDBUG command monitor. - When you are done interacting with STDBUG, typing either of two - character sequences will get you back to the GDB command prompt: - `RET~.' (Return, followed by tilde and period) or `RET~C-d' - (Return, followed by tilde and control-D). - - -File: gdb.info, Node: VxWorks Remote, Next: ST2000 Remote, Prev: EB29K Remote, Up: Remote - -GDB and VxWorks ---------------- - - GDB enables developers to spawn and debug tasks running on networked -VxWorks targets from a Unix host. Already-running tasks spawned from -the VxWorks shell can also be debugged. GDB uses code that runs on -both the Unix host and on the VxWorks target. The program `gdb' is -installed and executed on the Unix host. (It may be installed with the -name `vxgdb', to distinguish it from a GDB for debugging programs on -the host itself.) - - The following information on connecting to VxWorks was current when -this manual was produced; newer releases of VxWorks may use revised -procedures. - - The remote debugging interface (RDB) routines are installed and -executed on the VxWorks target. These routines are included in the -VxWorks library `rdb.a' and are incorporated into the system image when -source-level debugging is enabled in the VxWorks configuration. - - If you wish, you can define `INCLUDE_RDB' in the VxWorks -configuration file `configAll.h' to include the RDB interface routines -and spawn the source debugging task `tRdbTask' when VxWorks is booted. -For more information on configuring and remaking VxWorks, see the -manufacturer's manual. - - Once you have included the RDB interface in your VxWorks system image -and set your Unix execution search path to find GDB, you are ready to -run GDB. From your Unix host, run `gdb' (or `vxgdb', depending on your -installation). - - GDB comes up showing the prompt: - - (vxgdb) - -* Menu: - -* VxWorks Connection:: Connecting to VxWorks -* VxWorks Download:: VxWorks download -* VxWorks Attach:: Running tasks - - -File: gdb.info, Node: VxWorks Connection, Next: VxWorks Download, Up: VxWorks Remote - -Connecting to VxWorks ---------------------- - - The GDB command `target' lets you connect to a VxWorks target on the -network. To connect to a target whose host name is "`tt'", type: - - (vxgdb) target vxworks tt - - GDB displays messages like these: - - Attaching remote machine across net... - Connected to tt. - - GDB then attempts to read the symbol tables of any object modules -loaded into the VxWorks target since it was last booted. GDB locates -these files by searching the directories listed in the command search -path (*note Your program's environment: Environment.); if it fails to -find an object file, it displays a message such as: - - prog.o: No such file or directory. - - When this happens, add the appropriate directory to the search path -with the GDB command `path', and execute the `target' command again. - - -File: gdb.info, Node: VxWorks Download, Next: VxWorks Attach, Prev: VxWorks Connection, Up: VxWorks Remote - -VxWorks download ----------------- - - If you have connected to the VxWorks target and you want to debug an -object that has not yet been loaded, you can use the GDB `load' command -to download a file from Unix to VxWorks incrementally. The object file -given as an argument to the `load' command is actually opened twice: -first by the VxWorks target in order to download the code, then by GDB -in order to read the symbol table. This can lead to problems if the -current working directories on the two systems differ. If both systems -have NFS mounted the same filesystems, you can avoid these problems by -using absolute paths. Otherwise, it is simplest to set the working -directory on both systems to the directory in which the object file -resides, and then to reference the file by its name, without any path. -For instance, a program `prog.o' may reside in `VXPATH/vw/demo/rdb' in -VxWorks and in `HOSTPATH/vw/demo/rdb' on the host. To load this -program, type this on VxWorks: - - -> cd "VXPATH/vw/demo/rdb" - - Then, in GDB, type: - - (vxgdb) cd HOSTPATH/vw/demo/rdb - (vxgdb) load prog.o - - GDB displays a response similar to this: - - Reading symbol data from wherever/vw/demo/rdb/prog.o... done. - - You can also use the `load' command to reload an object module after -editing and recompiling the corresponding source file. Note that this -will cause GDB to delete all currently-defined breakpoints, -auto-displays, and convenience variables, and to clear the value -history. (This is necessary in order to preserve the integrity of -debugger data structures that reference the target system's symbol -table.) - - -File: gdb.info, Node: VxWorks Attach, Prev: VxWorks Download, Up: VxWorks Remote - -Running tasks -------------- - - You can also attach to an existing task using the `attach' command as -follows: - - (vxgdb) attach TASK - -where TASK is the VxWorks hexadecimal task ID. The task can be running -or suspended when you attach to it. If running, it will be suspended at -the time of attachment. - - -File: gdb.info, Node: Hitachi Remote, Next: MIPS Remote, Prev: ST2000 Remote, Up: Remote - -GDB and Hitachi Microprocessors -------------------------------- - - GDB needs to know these things to talk to your Hitachi SH, H8/300, -or H8/500: - - 1. that you want to use `target hms', the remote debugging interface - for Hitachi microprocessors (this is the default when GDB is - configured specifically for the Hitachi SH, H8/300, or H8/500); - - 2. what serial device connects your host to your Hitachi board (the - first serial device available on your host is the default); - - - Use the special `gdb' command `device PORT' if you need to -explicitly set the serial device. The default PORT is the first -available port on your host. This is only necessary on Unix hosts, -where it is typically something like `/dev/ttya'. - - `gdb' has another special command to set the communications speed: -`speed 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 `mode' -command (for instance, `mode com2:9600,n,8,1,p' for a 9600 bps -connection). - - The `device' and `speed' commands are available only when you use a -Unix host to debug your Hitachi microprocessor programs. If you use a -DOS host, GDB depends on an auxiliary terminate-and-stay-resident -program called `asynctsr' to communicate with the development board -through a PC serial port. You must also use the DOS `mode' command to -set up the serial port on the DOS side. - - -File: gdb.info, Node: MIPS Remote, Next: Simulator, Prev: Hitachi Remote, Up: Remote - -GDB and remote MIPS boards --------------------------- - - GDB can use the MIPS remote debugging protocol to talk to a MIPS -board attached to a serial line. This is available when you configure -GDB with `--target=mips-idt-ecoff'. - - To run a program on the board, start up `gdb' with the name of your -program as the argument. To connect to the board, use the command -`target mips PORT', where PORT is the name of the serial port connected -to the board. If the program has not already been downloaded to the -board, you may use the `load' command to download it. You can then use -all the usual GDB commands. - - You can also specify PORT as a TCP connection (for instance, to a -serial line managed by a terminal concentrator), using the syntax -`HOSTNAME:PORTNUMBER'. - - You can see some debugging information about communications with the -board by setting the `remotedebug' variable. If you set it to 1 using -`set remotedebug 1' every packet will be displayed. If you set it to 2 -every character will be displayed. You can check the current value at -any time with the command `show remotedebug'. - - You can control the timeout used while waiting for a packet, in the -MIPS remote protocol, with the `set timeout SECONDS' command. The -default is 5 seconds. Similarly, you can control the timeout used while -waiting for an acknowledgement of a packet with the `set -retransmit-timeout SECONDS' command. The default is 3 seconds. You -can inspect both values with `show timeout' and `show -retransmit-timeout'. (These commands are *only* available when GDB is -configured for `--target=mips-idt-ecoff'.) - - If your target board does not support the MIPS floating point -coprocessor, you should use the command `set mipsfpu off' (you may wish -to put this in your .gdbinit file). This tells GDB how to find the -return value of functions which return floating point values. It also -allows GDB to avoid saving the floating point registers when calling -functions on the board. - - -File: gdb.info, Node: Simulator, Prev: MIPS Remote, Up: Remote - -Simulated CPU target --------------------- - - For some configurations, GDB includes a CPU simulator that you can -use instead of a hardware CPU to debug your programs. Currently, a -simulator is available when GDB is configured to debug Zilog Z8000 or -Hitachi microprocessor targets. - - For the Z8000 family, `target sim' simulates either the Z8002 (the -unsegmented variant of the Z8000 architecture) or the Z8001 (the -segmented variant). The simulator recognizes which architecture is -appropriate by inspecting the object code. - -`target sim' - Debug programs on a simulated CPU (which CPU depends on the GDB - configuration) - -After specifying this target, you can debug programs for the simulated -CPU in the same style as programs for your host computer; use the -`file' command to load a new program image, the `run' command to run -your program, and so on. - - As well as making available all the usual machine registers (see -`info reg'), this debugging target provides three additional items of -information as specially named registers: - -`cycles' - Counts clock-ticks in the simulator. - -`insts' - Counts instructions run in the simulator. - -`time' - Execution time in 60ths of a second. - - You can refer to these values in GDB expressions with the usual -conventions; for example, `b fputc if $cycles>5000' sets a conditional -breakpoint that will suspend only after at least 5000 simulated clock -ticks. - - -File: gdb.info, Node: Controlling GDB, Next: Sequences, Prev: Targets, Up: Top - -Controlling GDB -*************** - - You can alter the way GDB interacts with you by using the `set' -command. For commands controlling how GDB displays data, *note Print -settings: Print Settings.; other settings are described here. - -* Menu: - -* Prompt:: Prompt -* Editing:: Command editing -* History:: Command history -* Screen Size:: Screen size -* Numbers:: Numbers -* Messages/Warnings:: Optional warnings and messages - - -File: gdb.info, Node: Prompt, Next: Editing, Up: Controlling GDB - -Prompt -====== - - GDB indicates its readiness to read a command by printing a string -called the "prompt". This string is normally `(gdb)'. You can change -the prompt string with the `set prompt' command. For instance, when -debugging GDB with GDB, it is useful to change the prompt in one of the -GDB sessions so that you can always tell which one you are talking to. - -`set prompt NEWPROMPT' - Directs GDB to use NEWPROMPT as its prompt string henceforth. - -`show prompt' - Prints a line of the form: `Gdb's prompt is: YOUR-PROMPT' - - -File: gdb.info, Node: Editing, Next: History, Prev: Prompt, Up: Controlling GDB - -Command editing -=============== - - GDB reads its input commands via the "readline" interface. This GNU -library provides consistent behavior for programs which provide a -command line interface to the user. Advantages are `emacs'-style or -`vi'-style inline editing of commands, `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 GDB with the -command `set'. - -`set editing' -`set editing on' - Enable command line editing (enabled by default). - -`set editing off' - Disable command line editing. - -`show editing' - Show whether command line editing is enabled. - - -File: gdb.info, Node: History, Next: Screen Size, Prev: Editing, Up: Controlling GDB - -Command history -=============== - - GDB can keep track of the commands you type during your debugging -sessions, so that you can be certain of precisely what happened. Use -these commands to manage the GDB command history facility. - -`set history filename FNAME' - Set the name of the GDB command history file to FNAME. This is - the file from which GDB 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 value - of the environment variable `GDBHISTFILE', or to `./.gdb_history' - if this variable is not set. - -`set history save' -`set history save on' - Record command history in a file, whose name may be specified with - the `set history filename' command. By default, this option is - disabled. - -`set history save off' - Stop recording command history in a file. - -`set history size SIZE' - Set the number of commands which GDB will keep in its history list. - This defaults to the value of the environment variable `HISTSIZE', - or to 256 if this variable is not set. - - History expansion assigns special meaning to the character `!'. - - Since `!' is also the logical not operator in C, history expansion -is off by default. If you decide to enable history expansion with the -`set history expansion on' command, you may sometimes need to follow -`!' (when it is used as logical not, in an expression) with a space or -a tab to prevent it from being expanded. The readline history -facilities will not attempt substitution on the strings `!=' and `!(', -even when history expansion is enabled. - - The commands to control history expansion are: - -`set history expansion on' -`set history expansion' - Enable history expansion. History expansion is off by default. - -`set history expansion off' - Disable history expansion. - - The readline code comes with more complete documentation of - editing and history expansion features. Users unfamiliar with - `emacs' or `vi' may wish to read it. - -`show history' -`show history filename' -`show history save' -`show history size' -`show history expansion' - These commands display the state of the GDB history parameters. - `show history' by itself displays all four states. - -`show commands' - Display the last ten commands in the command history. - -`show commands N' - Print ten commands centered on command number N. - -`show commands +' - Print ten commands just after the commands last printed. - - -File: gdb.info, Node: Screen Size, Next: Numbers, Prev: History, Up: Controlling GDB - -Screen size -=========== - - Certain commands to GDB may produce large amounts of information -output to the screen. To help you read all of it, GDB pauses and asks -you for input at the end of each page of output. Type RET when you -want to continue the output, or `q' to discard the remaining output. -Also, the screen width setting determines when to wrap lines of output. -Depending on what is being printed, GDB tries to break the line at a -readable place, rather than simply letting it overflow onto the -following line. - - Normally GDB knows the size of the screen from the termcap data base -together with the value of the `TERM' environment variable and the -`stty rows' and `stty cols' settings. If this is not correct, you can -override it with the `set height' and `set width' commands: - -`set height LPP' -`show height' -`set width CPL' -`show width' - These `set' commands specify a screen height of LPP lines and a - screen width of CPL characters. The associated `show' commands - display the current settings. - - If you specify a height of zero lines, GDB 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. - - Likewise, you can specify `set width 0' to prevent GDB from - wrapping its output. - - -File: gdb.info, Node: Numbers, Next: Messages/Warnings, Prev: Screen Size, Up: Controlling GDB - -Numbers -======= - - You can always enter numbers in octal, decimal, or hexadecimal in -GDB by the usual conventions: octal numbers begin with `0', decimal -numbers end with `.', and hexadecimal numbers begin with `0x'. Numbers -that begin with none of these are, by default, entered in base 10; -likewise, the default display for numbers--when no particular format is -specified--is base 10. You can change the default base for both input -and output with the `set radix' command. - -`set radix BASE' - Set the default base for numeric input and display. Supported - choices for BASE are decimal 8, 10, or 16. BASE must itself be - specified either unambiguously or using the current default radix; - for example, any of - - set radix 012 - set radix 10. - set radix 0xa - - will set the base to decimal. On the other hand, `set radix 10' - will leave the radix unchanged no matter what it was. - -`show radix' - Display the current default base for numeric input and display. - - -File: gdb.info, Node: Messages/Warnings, Prev: Numbers, Up: Controlling GDB - -Optional warnings and messages -============================== - - By default, GDB is silent about its inner workings. If you are -running on a slow machine, you may want to use the `set verbose' -command. It will make GDB tell you when it does a lengthy internal -operation, so you will not think it has crashed. - - Currently, the messages controlled by `set verbose' are those which -announce that the symbol table for a source file is being read; see -`symbol-file' in *Note Commands to specify files: Files. - -`set verbose on' - Enables GDB output of certain informational messages. - -`set verbose off' - Disables GDB output of certain informational messages. - -`show verbose' - Displays whether `set verbose' is on or off. - - By default, if GDB 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 (*note Errors reading symbol files: Symbol -Errors.). - -`set complaints LIMIT' - Permits GDB to output LIMIT complaints about each type of unusual - symbols before becoming silent about the problem. Set LIMIT to - zero to suppress all complaints; set it to a large number to - prevent complaints from being suppressed. - -`show complaints' - Displays how many symbol complaints GDB is permitted to produce. - - By default, GDB 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: - - (gdb) run - The program being debugged has been started already. - Start it from the beginning? (y or n) - - If you are willing to unflinchingly face the consequences of your own -commands, you can disable this "feature": - -`set confirm off' - Disables confirmation requests. - -`set confirm on' - Enables confirmation requests (the default). - -`show confirm' - Displays state of confirmation requests. - - Some systems allow individual object files that make up your program -to be replaced without stopping and restarting your program. For -example, in VxWorks you can simply recompile a defective object file -and keep on running. If you are running on one of these systems, you -can allow GDB to reload the symbols for automatically relinked modules: - -`set symbol-reloading on' - Replace symbol definitions for the corresponding source file when - an object file with a particular name is seen again. - -`set symbol-reloading off' - 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 `symbol-reloading' off, since otherwise GDB may - discard symbols when linking large programs, that may contain - several modules (from different directories or libraries) with the - same name. - -`show symbol-reloading' - Show the current `on' or `off' setting. - - -File: gdb.info, Node: Sequences, Next: Emacs, Prev: Controlling GDB, Up: Top - -Canned Sequences of Commands -**************************** - - Aside from breakpoint commands (*note Breakpoint command lists: -Break Commands.), GDB provides two ways to store sequences of commands -for execution as a unit: user-defined commands and command files. - -* Menu: - -* Define:: User-defined commands -* Hooks:: User-defined command hooks -* Command Files:: Command files -* Output:: Commands for controlled output - - -File: gdb.info, Node: Define, Next: Hooks, Up: Sequences - -User-defined commands -===================== - - A "user-defined command" is a sequence of GDB commands to which you -assign a new name as a command. This is done with the `define' command. - -`define COMMANDNAME' - Define a command named 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 GDB command - lines, which are given following the `define' command. The end of - these commands is marked by a line containing `end'. - -`document COMMANDNAME' - Give documentation to the user-defined command COMMANDNAME. The - command COMMANDNAME must already be defined. This command reads - lines of documentation just as `define' reads the lines of the - command definition, ending with `end'. After the `document' - command is finished, `help' on command COMMANDNAME will print the - documentation you have specified. - - You may use the `document' command again to change the - documentation of a command. Redefining the command with `define' - does not change the documentation. - -`help user-defined' - List all user-defined commands, with the first line of the - documentation (if any) for each. - -`show user' -`show user COMMANDNAME' - Display the GDB commands used to define COMMANDNAME (but not its - documentation). If no COMMANDNAME is given, display the - definitions for all user-defined commands. - - User-defined commands do not take arguments. When they are -executed, the commands of the definition are not printed. An error in -any command 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 -GDB commands that normally print messages to say what they are doing -omit the messages when used in a user-defined command. - - -File: gdb.info, Node: Hooks, Next: Command Files, Prev: Define, Up: Sequences - -User-defined command hooks -========================== - - You may define *hooks*, which are a special kind of user-defined -command. Whenever you run the command `foo', if the user-defined -command `hook-foo' exists, it is executed (with no arguments) before -that command. - - In addition, a pseudo-command, `stop' exists. Defining -(`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 ignore `SIGALRM' signals while single-stepping, but -treat them normally during normal execution, you could define: - - define hook-stop - handle SIGALRM nopass - end - - define hook-run - handle SIGALRM pass - end - - define hook-continue - handle SIGLARM pass - end - - You can define a hook for any single-word command in GDB, but not -for command aliases; you should define a hook for the basic command -name, e.g. `backtrace' rather than `bt'. If an error occurs during -the execution of your hook, execution of GDB commands stops and GDB -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 `define' command. - - -File: gdb.info, Node: Command Files, Next: Output, Prev: Hooks, Up: Sequences - -Command files -============= - - A command file for GDB is a file of lines that are GDB commands. -Comments (lines starting with `#') 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. - - When you start GDB, it automatically executes commands from its -"init files". These are files named `.gdbinit'. GDB 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 `-nx' option; *note Choosing modes: Mode Options..) - - On some configurations of GDB, the init file is known by a different -name (these are typically environments where a specialized form of GDB -may need to coexist with other forms, hence a different name for the -specialized version's init file). These are the environments with -special init file names: - - * VxWorks (Wind River Systems real-time OS): `.vxgdbinit' - - * OS68K (Enea Data Systems real-time OS): `.os68gdbinit' - - * ES-1800 (Ericsson Telecom AB M68000 emulator): `.esgdbinit' - - You can also request the execution of a command file with the -`source' command: - -`source FILENAME' - Execute the command file FILENAME. - - The lines in a command file are executed sequentially. They are not -printed as they are executed. An error in any command terminates -execution of the command file. - - Commands that would ask for confirmation if used interactively -proceed without asking when used in a command file. Many GDB commands -that normally print messages to say what they are doing omit the -messages when called from command files. - - -File: gdb.info, Node: Output, Prev: Command Files, Up: Sequences - -Commands for controlled output -============================== - - During the execution of a command file or a user-defined command, -normal GDB 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. - -`echo TEXT' - Print TEXT. Nonprinting characters can be included in TEXT using - C escape sequences, such as `\n' to print a newline. *No newline - will be printed unless you specify one.* In addition to the - standard C escape sequences, a backslash followed by a space - stands for a space. This is useful for displaying a string with - spaces at the beginning or the end, since leading and trailing - spaces are otherwise trimmed from all arguments. To print ` and - foo = ', use the command `echo \ and foo = \ '. - - A backslash at the end of TEXT can be used, as in C, to continue - the command onto subsequent lines. For example, - - echo This is some text\n\ - which is continued\n\ - onto several lines.\n - - produces the same output as - - echo This is some text\n - echo which is continued\n - echo onto several lines.\n - -`output EXPRESSION' - Print the value of EXPRESSION and nothing but that value: no - newlines, no `$NN = '. The value is not entered in the value - history either. *Note Expressions: Expressions, for more - information on expressions. - -`output/FMT EXPRESSION' - Print the value of EXPRESSION in format FMT. You can use the same - formats as for `print'. *Note Output formats: Output Formats, for - more information. - -`printf STRING, EXPRESSIONS...' - Print the values of the EXPRESSIONS under the control of STRING. - The EXPRESSIONS are separated by commas and may be either numbers - or pointers. Their values are printed as specified by STRING, - exactly as if your program were to execute the C subroutine - - printf (STRING, EXPRESSIONS...); - - For example, you can print two values in hex like this: - - printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo - - The only backslash-escape sequences that you can use in the format - string are the simple ones that consist of backslash followed by a - letter. - - -File: gdb.info, Node: Emacs, Next: GDB Bugs, Prev: Sequences, Up: Top - -Using GDB under GNU Emacs -************************* - - A special interface allows you to use GNU Emacs to view (and edit) -the source files for the program you are debugging with GDB. - - To use this interface, use the command `M-x gdb' in Emacs. Give the -executable file you want to debug as an argument. This command starts -GDB as a subprocess of Emacs, with input and output through a newly -created Emacs buffer. - - Using GDB under Emacs is just like using GDB normally except for two -things: - - * All "terminal" input and output goes through the Emacs buffer. - - This applies both to GDB 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 commands and input them again; you can even use parts of the -output in this way. - - All the facilities of Emacs' Shell mode are available for interacting -with your program. In particular, you can send signals the usual -way--for example, `C-c C-c' for an interrupt, `C-c C-z' for a stop. - - * GDB displays source code through Emacs. - - Each time GDB displays a stack frame, Emacs automatically finds the -source file for that frame and puts an arrow (`=>') at the left margin -of the current line. Emacs uses a separate buffer for source display, -and splits the screen to show both your GDB session and the source. - - Explicit GDB `list' or search commands still produce output as -usual, but you probably will have no reason to use them. - - *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. GDB can find programs - by searching your environment's `PATH' variable, so the GDB input - and output session will proceed normally; but Emacs does not get - enough information back from GDB to locate the source files in - this situation. To avoid this problem, either start GDB mode from - the directory where your program resides, or specify a full path - name when prompted for the `M-x gdb' argument. - - A similar confusion can result if you use the GDB `file' command to - switch to debugging a program in some other location, from an - existing GDB buffer in Emacs. - - By default, `M-x gdb' calls the program called `gdb'. If you need -to call GDB by a different name (for example, if you keep several -configurations around, with different names) you can set the Emacs -variable `gdb-command-name'; for example, - - (setq gdb-command-name "mygdb") - -(preceded by `ESC ESC', or typed in the `*scratch*' buffer, or in your -`.emacs' file) will make Emacs call the program named "`mygdb'" instead. - - In the GDB I/O buffer, you can use these special Emacs commands in -addition to the standard Shell mode commands: - -`C-h m' - Describe the features of Emacs' GDB Mode. - -`M-s' - Execute to another source line, like the GDB `step' command; also - update the display window to show the current file and location. - -`M-n' - Execute to next source line in this function, skipping all function - calls, like the GDB `next' command. Then update the display window - to show the current file and location. - -`M-i' - Execute one instruction, like the GDB `stepi' command; update - display window accordingly. - -`M-x gdb-nexti' - Execute to next instruction, using the GDB `nexti' command; update - display window accordingly. - -`C-c C-f' - Execute until exit from the selected stack frame, like the GDB - `finish' command. - -`M-c' - Continue execution of your program, like the GDB `continue' - command. - - *Warning:* In Emacs v19, this command is `C-c C-p'. - -`M-u' - Go up the number of frames indicated by the numeric argument - (*note Numeric Arguments: (emacs)Arguments.), like the GDB `up' - command. - - *Warning:* In Emacs v19, this command is `C-c C-u'. - -`M-d' - Go down the number of frames indicated by the numeric argument, - like the GDB `down' command. - - *Warning:* In Emacs v19, this command is `C-c C-d'. - -`C-x &' - Read the number where the cursor is positioned, and insert it at - the end of the GDB I/O buffer. For example, if you wish to - disassemble code around an address that was displayed earlier, - type `disassemble'; then move the cursor to the address display, - and pick up the argument for `disassemble' by typing `C-x &'. - - You can customize this further by defining elements of the list - `gdb-print-command'; once it is defined, you can format or - otherwise process numbers picked up by `C-x &' before they are - inserted. A numeric argument to `C-x &' will both indicate that - you wish special formatting, and act as an index to pick an - element of the list. If the list element is a string, the number - to be inserted is formatted using the Emacs function `format'; - otherwise the number is passed as an argument to the corresponding - list element. - - In any source file, the Emacs command `C-x SPC' (`gdb-break') tells -GDB 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 `f' in the GDB 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 GDB -communicates with Emacs in terms of line numbers. If you add or delete -lines from the text, the line numbers that GDB knows will cease to -correspond properly with the code. - - -File: gdb.info, Node: GDB Bugs, Next: Command Line Editing, Prev: Emacs, Up: Top - -Reporting Bugs in GDB -********************* - - Your bug reports play an essential role in making GDB 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 GDB work -better. Bug reports are your contribution to the maintenance of GDB. - - In order for a bug report to serve its purpose, you must include the -information that enables us to fix the bug. - -* Menu: - -* Bug Criteria:: Have you found a bug? -* Bug Reporting:: How to report bugs - - -File: gdb.info, Node: Bug Criteria, Next: Bug Reporting, Up: GDB Bugs - -Have you found a bug? -===================== - - If you are not sure whether you have found a bug, here are some -guidelines: - - * If the debugger gets a fatal signal, for any input whatever, that - is a GDB bug. Reliable debuggers never crash. - - * If GDB produces an error message for valid input, that is a bug. - - * If GDB 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". - - * If you are an experienced user of debugging tools, your suggestions - for improvement of GDB are welcome in any case. - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-7 b/gnu/usr.bin/gdb/doc/gdb.info-7 deleted file mode 100644 index 963527e..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-7 +++ /dev/null @@ -1,1233 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Bug Reporting, Prev: Bug Criteria, Up: GDB Bugs - -How to report bugs -================== - - A number of companies and individuals offer support for GNU products. -If you obtained GDB from a support organization, we recommend you -contact that organization first. - - You can find contact information for many support companies and -individuals in the file `etc/SERVICE' in the GNU Emacs distribution. - - In any event, we also recommend that you send bug reports for GDB to -one of these addresses: - - bug-gdb@prep.ai.mit.edu - {ucbvax|mit-eddie|uunet}!prep.ai.mit.edu!bug-gdb - - *Do not send bug reports to `info-gdb', or to `help-gdb', or to any -newsgroups.* Most users of GDB do not want to receive bug reports. -Those that do, have arranged to receive `bug-gdb'. - - The mailing list `bug-gdb' has a newsgroup `gnu.gdb.bug' which -serves as a repeater. The mailing list and the newsgroup carry exactly -the same messages. Often people think of posting bug reports to the -newsgroup instead of mailing them. This appears to work, but it has one -problem which can be crucial: a newsgroup posting often lacks a mail -path back to the sender. Thus, if we need to ask for more information, -we may be unable to reach you. For this reason, it is better to send -bug reports to the mailing list. - - As a last resort, send bug reports on paper to: - - GNU Debugger Bugs - Free Software Foundation - 545 Tech Square - Cambridge, MA 02139 - - The fundamental principle of reporting bugs usefully is this: -*report all the facts*. If you are not sure whether to state a fact or -leave it out, state it! - - Often people omit facts because they think they know what causes the -problem and assume that some details do not matter. Thus, you might -assume that the name of the variable you use in an example does not -matter. Well, probably it does not, but one cannot be sure. Perhaps -the bug is a stray memory reference which happens to fetch from the -location where that name is stored in memory; perhaps, if the name were -different, the contents of that location would fool the debugger into -doing the right thing despite the bug. Play it safe and give a -specific, complete example. That is the easiest thing for you to do, -and the most helpful. - - Keep in mind that the purpose of a bug report is to enable us to fix -the bug if it is new to us. It is not as important as what happens if -the bug is already known. Therefore, always write your bug reports on -the assumption that the bug has not been reported previously. - - Sometimes people give a few sketchy facts and ask, "Does this ring a -bell?" Those bug reports are useless, and we urge everyone to *refuse -to respond to them* except to chide the sender to report bugs properly. - - To enable us to fix the bug, you should include all these things: - - * The version of GDB. GDB announces it if you start with no - arguments; you can also print it at any time using `show version'. - - Without this, we will not know whether there is any point in - looking for the bug in the current version of GDB. - - * The type of machine you are using, and the operating system name - and version number. - - * What compiler (and its version) was used to compile GDB--e.g. - "gcc-2.0". - - * What compiler (and its version) was used to compile the program you - are debugging--e.g. "gcc-2.0". - - * The command arguments you gave the compiler to compile your - example and observe the bug. For example, did you use `-O'? To - guarantee you will not omit something important, list them all. A - copy of the Makefile (or the output from make) is sufficient. - - If we were to try to guess the arguments, we would probably guess - wrong and then we might not encounter the bug. - - * A complete input script, and all necessary source files, that will - reproduce the bug. - - * 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 GDB 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 GDB 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 happening for us. If you had not told us to expect a - crash, then we would not be able to draw any conclusion from our - observations. - - * If you wish to suggest changes to the GDB source, send us context - diffs. If you even discuss something in the GDB source, refer to - it by context, not by line number. - - The line numbers in our development sources will not match those - in your sources. Your line numbers would convey no useful - information to us. - - Here are some things that are not necessary: - - * A description of the envelope of the bug. - - Often people who encounter a bug spend a lot of time investigating - which changes to the input file will make the bug go away and which - changes will not affect it. - - This is often time consuming and not very useful, because the way - we will find the bug is by running a single example under the - debugger with breakpoints, not by pure deduction from a series of - examples. We recommend that you save your time for something else. - - Of course, if you can find a simpler example to report *instead* - of the original one, that is a convenience for us. Errors in the - output will be easier to spot, running under the debugger will take - less time, etc. - - However, simplification is not vital; if you do not want to do - this, report the bug anyway and send us the entire test case you - used. - - * A patch for the bug. - - A patch for the bug does help us if it is a good one. But do not - omit the necessary information, such as the test case, on the - assumption that 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 GDB 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. - - And if we cannot understand what bug you are trying to fix, or why - your patch should be an improvement, we will not install it. A - test case will help us to understand. - - * A guess about what the bug is or what it depends on. - - Such guesses are usually wrong. Even we cannot guess right about - such things without first using the debugger to find the facts. - - -File: gdb.info, Node: Command Line Editing, Next: Using History Interactively, Prev: GDB Bugs, Up: Top - -Command Line Editing -******************** - - This text describes GNU's command line editing interface. - -* Menu: - -* Introduction and Notation:: Notation used in this text. -* Readline Interaction:: The minimum set of commands for editing a line. -* Readline Init File:: Customizing Readline from a user's view. - - -File: gdb.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing - -Introduction to Line Editing -============================ - - The following paragraphs describe the notation we use to represent -keystrokes. - - The text C-k is read as `Control-K' and describes the character -produced when the Control key is depressed and the k key is struck. - - The text M-k is read as `Meta-K' and describes the character -produced when the meta key (if you have one) is depressed, and the k -key is struck. If you do not have a meta key, the identical keystroke -can be generated by typing ESC first, and then typing k. Either -process is known as "metafying" the k key. - - The text M-C-k is read as `Meta-Control-k' and describes the -character produced by "metafying" C-k. - - In addition, several keys have their own names. Specifically, DEL, -ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this -text, or in an init file (*note Readline Init File::., for more info). - - -File: gdb.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing - -Readline Interaction -==================== - - Often during an interactive session you type in a long line of text, -only to notice that the first word on the line is misspelled. The -Readline library gives you a set of commands for manipulating the text -as you type it in, allowing you to just fix your typo, and not forcing -you to retype the majority of the line. Using these editing commands, -you move the cursor to the place that needs correction, and delete or -insert the text of the corrections. Then, when you are satisfied with -the line, you simply press RETURN. You do not have to be at the end of -the line to press RETURN; the entire line is accepted regardless of the -location of the cursor within the line. - -* Menu: - -* Readline Bare Essentials:: The least you need to know about Readline. -* Readline Movement Commands:: Moving about the input line. -* Readline Killing Commands:: How to delete text, and how to get it back! -* Readline Arguments:: Giving numeric arguments to commands. - - -File: gdb.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction - -Readline Bare Essentials ------------------------- - - In order to enter characters into the line, simply type them. The -typed character appears where the cursor was, and then the cursor moves -one space to the right. If you mistype a character, you can use DEL to -back up, and delete the mistyped character. - - Sometimes you may miss typing a character that you wanted to type, -and not notice your error until you have typed several other -characters. In that case, you can type C-b to move the cursor to the -left, and then correct your mistake. Aftwerwards, you can move the -cursor to the right with C-f. - - When you add text in the middle of a line, you will notice that -characters to the right of the cursor get `pushed over' to make room -for the text that you have inserted. Likewise, when you delete text -behind the cursor, characters to the right of the cursor get `pulled -back' to fill in the blank space created by the removal of the text. A -list of the basic bare essentials for editing the text of an input line -follows. - -C-b - Move back one character. - -C-f - Move forward one character. - -DEL - Delete the character to the left of the cursor. - -C-d - Delete the character underneath the cursor. - -Printing characters - Insert itself into the line at the cursor. - -C-_ - Undo the last thing that you did. You can undo all the way back - to an empty line. - - -File: gdb.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction - -Readline Movement Commands --------------------------- - - The above table describes the most basic possible keystrokes that -you need in order to do editing of the input line. For your -convenience, many other commands have been added in addition to C-b, -C-f, C-d, and DEL. Here are some commands for moving more rapidly -about the line. - -C-a - Move to the start of the line. - -C-e - Move to the end of the line. - -M-f - Move forward a word. - -M-b - Move backward a word. - -C-l - Clear the screen, reprinting the current line at the top. - - Notice how C-f moves forward a character, while M-f moves forward a -word. It is a loose convention that control keystrokes operate on -characters while meta keystrokes operate on words. - - -File: gdb.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction - -Readline Killing Commands -------------------------- - - "Killing" text means to delete the text from the line, but to save -it away for later use, usually by "yanking" it back into the line. If -the description for a command says that it `kills' text, then you can -be sure that you can get the text back in a different (or the same) -place later. - - Here is the list of commands for killing text. - -C-k - Kill the text from the current cursor position to the end of the - line. - -M-d - Kill from the cursor to the end of the current word, or if between - words, to the end of the next word. - -M-DEL - Kill from the cursor to the start of the previous word, or if - between words, to the start of the previous word. - -C-w - Kill from the cursor to the previous whitespace. This is - different than M-DEL because the word boundaries differ. - - And, here is how to "yank" the text back into the line. Yanking is - -C-y - Yank the most recently killed text back into the buffer at the - cursor. - -M-y - Rotate the kill-ring, and yank the new top. You can only do this - if the prior command is C-y or M-y. - - When you use a kill command, the text is saved in a "kill-ring". -Any number of consecutive kills save all of the killed text together, so -that when you yank it back, you get it in one clean sweep. The kill -ring is not line specific; the text that you killed on a previously -typed line is available to be yanked back later, when you are typing -another line. - - -File: gdb.info, Node: Readline Arguments, Prev: Readline Killing Commands, Up: Readline Interaction - -Readline Arguments ------------------- - - You can pass numeric arguments to Readline commands. Sometimes the -argument acts as a repeat count, other times it is the sign of the -argument that is significant. If you pass a negative argument to a -command which normally acts in a forward direction, that command will -act in a backward direction. For example, to kill text back to the -start of the line, you might type M- C-k. - - The general way to pass numeric arguments to a command is to type -meta digits before the command. If the first `digit' you type is a -minus sign (-), then the sign of the argument will be negative. Once -you have typed one meta digit to get the argument started, you can type -the remainder of the digits, and then the command. For example, to give -the C-d command an argument of 10, you could type M-1 0 C-d. - - -File: gdb.info, Node: Readline Init File, Prev: Readline Interaction, Up: Command Line Editing - -Readline Init File -================== - - Although the Readline library comes with a set of Emacs-like -keybindings, it is possible that you would like to use a different set -of keybindings. You can customize programs that use Readline by putting -commands in an "init" file in your home directory. The name of this -file is `~/.inputrc'. - - When a program which uses the Readline library starts up, the -`~/.inputrc' file is read, and the keybindings are set. - - In addition, the C-x C-r command re-reads this init file, thus -incorporating any changes that you might have made to it. - -* Menu: - -* Readline Init Syntax:: Syntax for the commands in `~/.inputrc'. -* Readline Vi Mode:: Switching to `vi' mode in Readline. - - -File: gdb.info, Node: Readline Init Syntax, Next: Readline Vi Mode, Up: Readline Init File - -Readline Init Syntax --------------------- - - There are only four constructs allowed in the `~/.inputrc' file: - -Variable Settings - You can change the state of a few variables in Readline. You do - this by using the `set' command within the init file. Here is how - you would specify that you wish to use Vi line editing commands: - - set editing-mode vi - - Right now, there are only a few variables which can be set; so few - in fact, that we just iterate them here: - - `editing-mode' - The `editing-mode' variable controls which editing mode you - are using. By default, GNU Readline starts up in Emacs - editing mode, where the keystrokes are most similar to Emacs. - This variable can either be set to `emacs' or `vi'. - - `horizontal-scroll-mode' - This variable can either be set to `On' or `Off'. Setting it - to `On' means that the text of the lines that you edit will - scroll horizontally on a single screen line when they are - larger than the width of the screen, instead of wrapping onto - a new screen line. By default, this variable is set to `Off'. - - `mark-modified-lines' - This variable when set to `On', says to display an asterisk - (`*') at the starts of history lines which have been modified. - This variable is off by default. - - `prefer-visible-bell' - If this variable is set to `On' it means to use a visible - bell if one is available, rather than simply ringing the - terminal bell. By default, the value is `Off'. - -Key Bindings - The syntax for controlling keybindings in the `~/.inputrc' file is - simple. First you have to know the name of the command that you - want to change. The following pages contain tables of the command - name, the default keybinding, and a short description of what the - command does. - - Once you know the name of the command, simply place the name of - the key you wish to bind the command to, a colon, and then the - name of the command on a line in the `~/.inputrc' file. The name - of the key can be expressed in different ways, depending on which - is most comfortable for you. - - KEYNAME: FUNCTION-NAME or MACRO - KEYNAME is the name of a key spelled out in English. For - example: - Control-u: universal-argument - Meta-Rubout: backward-kill-word - Control-o: ">&output" - - In the above example, C-u is bound to the function - `universal-argument', and C-o is bound to run the macro - expressed on the right hand side (that is, to insert the text - `>&output' into the line). - - "KEYSEQ": FUNCTION-NAME or MACRO - KEYSEQ differs from KEYNAME above in that strings denoting an - entire key sequence can be specified. Simply place the key - sequence in double quotes. GNU Emacs style key escapes can - be used, as in the following example: - - "\C-u": universal-argument - "\C-x\C-r": re-read-init-file - "\e[11~": "Function Key 1" - - In the above example, C-u is bound to the function - `universal-argument' (just as it was in the first example), - C-x C-r is bound to the function `re-read-init-file', and ESC - [ 1 1 ~ is bound to insert the text `Function Key 1'. - -* Menu: - -* Commands For Moving:: Moving about the line. -* Commands For History:: Getting at previous lines. -* Commands For Text:: Commands for changing text. -* Commands For Killing:: Commands for killing and yanking. -* Numeric Arguments:: Specifying numeric arguments, repeat counts. -* Commands For Completion:: Getting Readline to do the typing for you. -* Miscellaneous Commands:: Other miscillaneous commands. - - -File: gdb.info, Node: Commands For Moving, Next: Commands For History, Up: Readline Init Syntax - -Commands For Moving -------------------- - -`beginning-of-line (C-a)' - Move to the start of the current line. - -`end-of-line (C-e)' - Move to the end of the line. - -`forward-char (C-f)' - Move forward a character. - -`backward-char (C-b)' - Move back a character. - -`forward-word (M-f)' - Move forward to the end of the next word. - -`backward-word (M-b)' - Move back to the start of this, or the previous, word. - -`clear-screen (C-l)' - Clear the screen leaving the current line at the top of the screen. - - -File: gdb.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Readline Init Syntax - -Commands For Manipulating The History -------------------------------------- - -`accept-line (Newline, Return)' - Accept the line regardless of where the cursor is. If this line is - non-empty, add it to the history list. If this line was a history - line, then restore the history line to its original state. - -`previous-history (C-p)' - Move `up' through the history list. - -`next-history (C-n)' - Move `down' through the history list. - -`beginning-of-history (M-<)' - Move to the first line in the history. - -`end-of-history (M->)' - Move to the end of the input history, i.e., the line you are - entering! - -`reverse-search-history (C-r)' - Search backward starting at the current line and moving `up' - through the history as necessary. This is an incremental search. - -`forward-search-history (C-s)' - Search forward starting at the current line and moving `down' - through the the history as neccessary. - - -File: gdb.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Readline Init Syntax - -Commands For Changing Text --------------------------- - -`delete-char (C-d)' - Delete the character under the cursor. If the cursor is at the - beginning of the line, and there are no characters in the line, and - the last character typed was not C-d, then return EOF. - -`backward-delete-char (Rubout)' - Delete the character behind the cursor. A numeric arg says to kill - the characters instead of deleting them. - -`quoted-insert (C-q, C-v)' - Add the next character that you type to the line verbatim. This is - how to insert things like C-q for example. - -`tab-insert (M-TAB)' - Insert a tab character. - -`self-insert (a, b, A, 1, !, ...)' - Insert yourself. - -`transpose-chars (C-t)' - Drag the character before point forward over the character at - point. Point moves forward as well. If point is at the end of - the line, then transpose the two characters before point. - Negative args don't work. - -`transpose-words (M-t)' - Drag the word behind the cursor past the word in front of the - cursor moving the cursor over that word as well. - -`upcase-word (M-u)' - Uppercase all letters in the current (or following) word. With a - negative argument, do the previous word, but do not move point. - -`downcase-word (M-l)' - Lowercase all letters in the current (or following) word. With a - negative argument, do the previous word, but do not move point. - -`capitalize-word (M-c)' - Uppercase the first letter in the current (or following) word. - With a negative argument, do the previous word, but do not move - point. - - -File: gdb.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Readline Init Syntax - -Killing And Yanking -------------------- - -`kill-line (C-k)' - Kill the text from the current cursor position to the end of the - line. - -`backward-kill-line ()' - Kill backward to the beginning of the line. This is normally - unbound. - -`kill-word (M-d)' - Kill from the cursor to the end of the current word, or if between - words, to the end of the next word. - -`backward-kill-word (M-DEL)' - Kill the word behind the cursor. - -`unix-line-discard (C-u)' - Do what C-u used to do in Unix line input. We save the killed - text on the kill-ring, though. - -`unix-word-rubout (C-w)' - Do what C-w used to do in Unix line input. The killed text is - saved on the kill-ring. This is different than backward-kill-word - because the word boundaries differ. - -`yank (C-y)' - Yank the top of the kill ring into the buffer at point. - -`yank-pop (M-y)' - Rotate the kill-ring, and yank the new top. You can only do this - if the prior command is yank or yank-pop. - - -File: gdb.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Readline Init Syntax - -Specifying Numeric Arguments ----------------------------- - -`digit-argument (M-0, M-1, ... M--)' - Add this digit to the argument already accumulating, or start a new - argument. M- starts a negative argument. - -`universal-argument ()' - Do what C-u does in emacs. By default, this is not bound. - - -File: gdb.info, Node: Commands For Completion, Next: Miscellaneous Commands, Prev: Numeric Arguments, Up: Readline Init Syntax - -Letting Readline Type For You ------------------------------ - -`complete (TAB)' - Attempt to do completion on the text before point. This is - implementation defined. Generally, if you are typing a filename - argument, you can do filename completion; if you are typing a - command, you can do command completion, if you are typing in a - symbol to GDB, you can do symbol name completion, if you are - typing in a variable to Bash, you can do variable name - completion... - -`possible-completions (M-?)' - List the possible completions of the text before point. - - -File: gdb.info, Node: Miscellaneous Commands, Prev: Commands For Completion, Up: Readline Init Syntax - -Some Miscellaneous Commands ---------------------------- - -`re-read-init-file (C-x C-r)' - Read in the contents of your `~/.inputrc' file, and incorporate - any bindings found there. - -`abort (C-g)' - Stop running the current editing command. - -`prefix-meta (ESC)' - Make the next character that you type be metafied. This is for - people without a meta key. Typing ESC f is equivalent to typing - M-f. - -`undo (C-_)' - Incremental undo, separately remembered for each line. - -`revert-line (M-r)' - Undo all changes made to this line. This is like typing the `undo' - command enough times to get back to the beginning. - - -File: gdb.info, Node: Readline Vi Mode, Prev: Readline Init Syntax, Up: Readline Init File - -Readline Vi Mode ----------------- - - While the Readline library does not have a full set of Vi editing -functions, it does contain enough to allow simple editing of the line. - - In order to switch interactively between Emacs and Vi editing modes, -use the command M-C-j (toggle-editing-mode). - - When you enter a line in Vi mode, you are already placed in -`insertion' mode, as if you had typed an `i'. Pressing ESC switches -you into `edit' mode, where you can edit the text of the line with the -standard Vi movement keys, move to previous history lines with `k', and -following lines with `j', and so forth. - - -File: gdb.info, Node: Using History Interactively, Next: Renamed Commands, Prev: Command Line Editing, Up: Top - -Using History Interactively -*************************** - - This chapter describes how to use the GNU History Library -interactively, from a user's standpoint. - -* Menu: - -* History Interaction:: What it feels like using History as a user. - - -File: gdb.info, Node: History Interaction, Up: Using History Interactively - -History Interaction -=================== - - The History library provides a history expansion feature that is -similar to the history expansion in Csh. The following text describes -the sytax that you use to manipulate the history information. - - History expansion takes place in two parts. The first is to -determine which line from the previous history should be used during -substitution. The second is to select portions of that line for -inclusion into the current one. The line selected from the previous -history is called the "event", and the portions of that line that are -acted upon are called "words". The line is broken into words in the -same fashion that the Bash shell does, so that several English (or -Unix) words surrounded by quotes are considered as one word. - -* Menu: - -* Event Designators:: How to specify which history line to use. -* Word Designators:: Specifying which words are of interest. -* Modifiers:: Modifying the results of susbstitution. - - -File: gdb.info, Node: Event Designators, Next: Word Designators, Up: History Interaction - -Event Designators ------------------ - - An event designator is a reference to a command line entry in the -history list. - -`!' - Start a history subsititution, except when followed by a space, - tab, or the end of the line... = or (. - -`!!' - Refer to the previous command. This is a synonym for `!-1'. - -`!n' - Refer to command line N. - -`!-n' - Refer to the command line N lines back. - -`!string' - Refer to the most recent command starting with STRING. - -`!?string'[`?'] - Refer to the most recent command containing STRING. - - -File: gdb.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction - -Word Designators ----------------- - - A : separates the event specification from the word designator. It -can be omitted if the word designator begins with a ^, $, * or %. -Words are numbered from the beginning of the line, with the first word -being denoted by a 0 (zero). - -`0 (zero)' - The zero'th word. For many applications, this is the command word. - -`n' - The N'th word. - -`^' - The first argument. that is, word 1. - -`$' - The last argument. - -`%' - The word matched by the most recent `?string?' search. - -`x-y' - A range of words; `-Y' Abbreviates `0-Y'. - -`*' - All of the words, excepting the zero'th. This is a synonym for - `1-$'. It is not an error to use * if there is just one word in - the event. The empty string is returned in that case. - - -File: gdb.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction - -Modifiers ---------- - - After the optional word designator, you can add a sequence of one or -more of the following modifiers, each preceded by a :. - -`#' - The entire command line typed so far. This means the current - command, not the previous command, so it really isn't a word - designator, and doesn't belong in this section. - -`h' - Remove a trailing pathname component, leaving only the head. - -`r' - Remove a trailing suffix of the form `.'SUFFIX, leaving the - basename. - -`e' - Remove all but the suffix. - -`t' - Remove all leading pathname components, leaving the tail. - -`p' - Print the new command but do not execute it. - - -File: gdb.info, Node: Renamed Commands, Next: Formatting Documentation, Prev: Using History Interactively, Up: Top - -Renamed Commands -**************** - - The following commands were renamed in GDB 4, in order to make the -command set as a whole more consistent and easier to use and remember: - - OLD COMMAND NEW COMMAND - --------------- ------------------------------- - add-syms add-symbol-file - delete environment unset environment - info convenience show convenience - info copying show copying - info directories show directories - info editing show commands - info history show values - info targets help target - info values show values - info version show version - info warranty show warranty - set/show addressprint set/show print address - set/show array-max set/show print elements - set/show arrayprint set/show print array - set/show asm-demangle set/show print asm-demangle - set/show caution set/show confirm - set/show demangle set/show print demangle - set/show history write set/show history save - set/show prettyprint set/show print pretty - set/show screen-height set/show height - set/show screen-width set/show width - set/show sevenbit-strings set/show print sevenbit-strings - set/show unionprint set/show print union - set/show vtblprint set/show print vtbl - - unset [No longer an alias for delete] - - -File: gdb.info, Node: Formatting Documentation, Next: Installing GDB, Prev: Renamed Commands, Up: Top - -Formatting Documentation -************************ - - The GDB 4 release includes an already-formatted reference card, ready -for printing with PostScript or GhostScript, in the `gdb' subdirectory -of the main source directory(1). If you can use PostScript or -GhostScript with your printer, you can print the reference card -immediately with `refcard.ps'. - - The release also includes the source for the reference card. You -can format it, using TeX, by typing: - - make refcard.dvi - - The GDB reference card is designed to print in landscape mode on US -"letter" size paper; that is, on a sheet 11 inches wide by 8.5 inches -high. You will need to specify this form of printing as an option to -your DVI output program. - - All the documentation for GDB comes as part of the machine-readable -distribution. The documentation is written in Texinfo format, which is -a documentation system that uses a single source file to produce both -on-line information and a printed manual. You can use one of the Info -formatting commands to create the on-line version of the documentation -and TeX (or `texi2roff') to typeset the printed version. - - GDB includes an already formatted copy of the on-line Info version of -this manual in the `gdb' subdirectory. The main Info file is -`gdb-VERSION-NUMBER/gdb/gdb.info', and it refers to subordinate files -matching `gdb.info*' in the same directory. If necessary, you can -print out these files, or read them with any editor; but they are -easier to read using the `info' subsystem in GNU Emacs or the -standalone `info' program, available as part of the GNU Texinfo -distribution. - - If you want to format these Info files yourself, you need one of the -Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'. - - If you have `makeinfo' installed, and are in the top level GDB -source directory (`gdb-4.11', in the case of version 4.11), you can -make the Info file by typing: - - cd gdb - make gdb.info - - If you want to typeset and print copies of this manual, you need TeX, -a program to print its DVI output files, and `texinfo.tex', the Texinfo -definitions file. - - TeX is a typesetting program; it does not print files directly, but -produces output files called DVI files. To print a typeset document, -you need a program to print DVI files. If your system has TeX -installed, chances are it has such a program. The precise command to -use depends on your system; `lpr -d' is common; another (for PostScript -devices) is `dvips'. The DVI print command may require a file name -without any extension or a `.dvi' extension. - - TeX also requires a macro definitions file called `texinfo.tex'. -This file tells TeX how to typeset a document written in Texinfo -format. On its own, TeX cannot read, much less typeset a Texinfo file. -`texinfo.tex' is distributed with GDB and is located in the -`gdb-VERSION-NUMBER/texinfo' directory. - - If you have TeX and a DVI printer program installed, you can typeset -and print this manual. First switch to the the `gdb' subdirectory of -the main source directory (for example, to `gdb-4.11/gdb') and then -type: - - make gdb.dvi - - ---------- Footnotes ---------- - - (1) In `gdb-4.11/gdb/refcard.ps' of the version 4.11 release. - - -File: gdb.info, Node: Installing GDB, Next: Index, Prev: Formatting Documentation, Up: Top - -Installing GDB -************** - - GDB comes with a `configure' script that automates the process of -preparing GDB for installation; you can then use `make' to build the -`gdb' program. - - The GDB distribution includes all the source code you need for GDB in -a single directory, whose name is usually composed by appending the -version number to `gdb'. - - For example, the GDB version 4.11 distribution is in the `gdb-4.11' -directory. That directory contains: - -`gdb-4.11/configure (and supporting files)' - script for configuring GDB and all its supporting libraries. - -`gdb-4.11/gdb' - the source specific to GDB itself - -`gdb-4.11/bfd' - source for the Binary File Descriptor library - -`gdb-4.11/include' - GNU include files - -`gdb-4.11/libiberty' - source for the `-liberty' free software library - -`gdb-4.11/opcodes' - source for the library of opcode tables and disassemblers - -`gdb-4.11/readline' - source for the GNU command-line interface - -`gdb-4.11/glob' - source for the GNU filename pattern-matching subroutine - -`gdb-4.11/mmalloc' - source for the GNU memory-mapped malloc package - - The simplest way to configure and build GDB is to run `configure' -from the `gdb-VERSION-NUMBER' source directory, which in this example -is the `gdb-4.11' directory. - - First switch to the `gdb-VERSION-NUMBER' source directory if you are -not already in it; then run `configure'. Pass the identifier for the -platform on which GDB will run as an argument. - - For example: - - cd gdb-4.11 - ./configure HOST - make - -where HOST is an identifier such as `sun4' or `decstation', that -identifies the platform where GDB will run. (You can often leave off -HOST; `configure' tries to guess the correct value by examining your -system.) - - Running `configure HOST' and then running `make' builds the `bfd', -`readline', `mmalloc', and `libiberty' libraries, then `gdb' itself. -The configured source files, and the binaries, are left in the -corresponding source directories. - - `configure' is a Bourne-shell (`/bin/sh') script; if your system -does not recognize this automatically when you run a different shell, -you may need to run `sh' on it explicitly: - - sh configure HOST - - If you run `configure' from a directory that contains source -directories for multiple libraries or programs, such as the `gdb-4.11' -source directory for version 4.11, `configure' creates configuration -files for every directory level underneath (unless you tell it not to, -with the `--norecursion' option). - - You can run the `configure' script from any of the 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 4.11, type the following to configure only -the `bfd' subdirectory: - - cd gdb-4.11/bfd - ../configure HOST - - You can install `gdb' anywhere; it has no hardwired paths. However, -you should make sure that the shell on your path (named by the `SHELL' -environment variable) is publicly readable. Remember that GDB uses the -shell to start your program--some systems refuse to let GDB debug child -processes whose programs are not readable. - -* Menu: - -* Separate Objdir:: Compiling GDB in another directory -* Config Names:: Specifying names for hosts and targets -* configure Options:: Summary of options for configure - - -File: gdb.info, Node: Separate Objdir, Next: Config Names, Up: Installing GDB - -Compiling GDB in another directory -================================== - - If you want to run GDB versions for several host or target machines, -you need a different `gdb' compiled for each combination of host and -target. `configure' is designed to make this easy by allowing you to -generate each configuration in a separate subdirectory, rather than in -the source directory. If your `make' program handles the `VPATH' -feature (GNU `make' does), running `make' in each of these directories -builds the `gdb' program specified there. - - To build `gdb' in a separate directory, run `configure' with the -`--srcdir' option to specify where to find the source. (You also need -to specify a path to find `configure' itself from your working -directory. If the path to `configure' would be the same as the -argument to `--srcdir', you can leave out the `--srcdir' option; it -will be assumed.) - - For example, with version 4.11, you can build GDB in a separate -directory for a Sun 4 like this: - - cd gdb-4.11 - mkdir ../gdb-sun4 - cd ../gdb-sun4 - ../gdb-4.11/configure sun4 - make - - When `configure' builds a configuration using a remote source -directory, it creates a tree for the binaries with the same structure -(and using the same names) as the tree under the source directory. In -the example, you'd find the Sun 4 library `libiberty.a' in the -directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'. - - One popular reason to build several GDB configurations in separate -directories is to configure GDB for cross-compiling (where GDB runs on -one machine--the host--while debugging programs that run on another -machine--the target). You specify a cross-debugging target by giving -the `--target=TARGET' option to `configure'. - - When you run `make' to build a program or library, you must run it -in a configured directory--whatever directory you were in when you -called `configure' (or one of its subdirectories). - - The `Makefile' that `configure' generates in each source directory -also runs recursively. If you type `make' in a source directory such -as `gdb-4.11' (or in a separate configured directory configured with -`--srcdir=PATH/gdb-4.11'), you will build all the required libraries, -and then build GDB. - - When you have multiple hosts or targets configured in separate -directories, you can run `make' on them in parallel (for example, if -they are NFS-mounted on each of the hosts); they will not interfere -with each other. - - -File: gdb.info, Node: Config Names, Next: configure Options, Prev: Separate Objdir, Up: Installing GDB - -Specifying names for hosts and targets -====================================== - - The specifications used for hosts and targets in the `configure' -script are based on a three-part naming scheme, but some short -predefined aliases are also supported. The full naming scheme encodes -three pieces of information in the following pattern: - - ARCHITECTURE-VENDOR-OS - - For example, you can use the alias `sun4' as a HOST argument, or as -the value for TARGET in a `--target=TARGET' option. The equivalent -full name is `sparc-sun-sunos4'. - - The `configure' script accompanying GDB does not provide any query -facility to list all supported host and target names or aliases. -`configure' calls the Bourne shell script `config.sub' to map -abbreviations to full names; you can read the script, if you wish, or -you can use it to test your guesses on abbreviations--for example: - - % sh config.sub sun4 - sparc-sun-sunos4.1.1 - % sh config.sub sun3 - m68k-sun-sunos4.1.1 - % sh config.sub decstation - mips-dec-ultrix4.2 - % sh config.sub hp300bsd - m68k-hp-bsd - % sh config.sub i386v - i386-unknown-sysv - % sh config.sub i786v - Invalid configuration `i786v': machine `i786v' not recognized - -`config.sub' is also distributed in the GDB source directory -(`gdb-4.11', for version 4.11). - - -File: gdb.info, Node: configure Options, Prev: Config Names, Up: Installing GDB - -`configure' options -=================== - - Here is a summary of the `configure' options and arguments that are -most often useful for building GDB. `configure' also has several other -options not listed here. *note : (configure.info)What Configure Does, -for a full explanation of `configure'. - - configure [--help] - [--prefix=DIR] - [--srcdir=PATH] - [--norecursion] [--rm] - [--target=TARGET] HOST - -You may introduce options with a single `-' rather than `--' if you -prefer; but you may abbreviate option names if you use `--'. - -`--help' - Display a quick summary of how to invoke `configure'. - -`-prefix=DIR' - Configure the source to install programs and files under directory - `DIR'. - -`--srcdir=PATH' - *Warning: using this option requires GNU `make', or another `make' - that implements the `VPATH' feature.* - Use this option to make configurations in directories separate - from the GDB source directories. Among other things, you can use - this to build (or maintain) several configurations simultaneously, - in separate directories. `configure' writes configuration - specific files in the current directory, but arranges for them to - use the source in the directory PATH. `configure' will create - directories under the working directory in parallel to the source - directories below PATH. - -`--norecursion' - Configure only the directory level where `configure' is executed; - do not propagate configuration to subdirectories. - -`--rm' - *Remove* files otherwise built during configuration. - -`--target=TARGET' - Configure GDB for cross-debugging programs running on the specified - TARGET. Without this option, GDB is configured to debug programs - that run on the same machine (HOST) as GDB itself. - - There is no convenient way to generate a list of all available - targets. - -`HOST ...' - Configure GDB to run on the specified HOST. - - There is no convenient way to generate a list of all available - hosts. - -`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. - diff --git a/gnu/usr.bin/gdb/doc/gdb.info-8 b/gnu/usr.bin/gdb/doc/gdb.info-8 deleted file mode 100644 index 1d259e0..0000000 --- a/gnu/usr.bin/gdb/doc/gdb.info-8 +++ /dev/null @@ -1,657 +0,0 @@ -This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input -file gdb.texinfo. - -START-INFO-DIR-ENTRY -* Gdb:: The GNU debugger. -END-INFO-DIR-ENTRY - This file documents the GNU debugger GDB. - - This is Edition 4.09, August 1993, of `Debugging with GDB: the GNU -Source-Level Debugger' for GDB Version 4.11. - - Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software -Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions. - - -File: gdb.info, Node: Index, Prev: Installing GDB, Up: Top - -Index -***** - -* Menu: - -* #: Command Syntax. -* $bpnum: Set Breaks. -* $cdir: Source Path. -* $cwd: Source Path. -* $_: Convenience Vars. -* $__: Convenience Vars. -* .: M2 Scope. -* .esgdbinit: Command Files. -* .os68gdbinit: Command Files. -* .vxgdbinit: Command Files. -* /proc: Process Information. -* 386: Remote Serial. -* 680x0: Remote Serial. -* @: Arrays. -* # in Modula-2: GDB/M2. -* $$: Value History. -* $_ and info breakpoints: Set Breaks. -* $_ and info line: Machine Code. -* $_, $__, and value history: Memory. -* $: Value History. -* breakpoint subroutine, remote: Stub Contents. -* heuristic-fence-post (MIPS): MIPS Stack. -* remotedebug, MIPS protocol: MIPS Remote. -* retransmit-timeout, MIPS protocol: MIPS Remote. -* timeout, MIPS protocol: MIPS Remote. -* vi style command editing: Readline Vi Mode. -* .gdbinit: Command Files. -* COFF versus C++: Cplus expressions. -* ECOFF and C++: Cplus expressions. -* ELF/DWARF and C++: Cplus expressions. -* ELF/stabs and C++: Cplus expressions. -* XCOFF and C++: Cplus expressions. -* GDB bugs, reporting: Bug Reporting. -* {TYPE}: Expressions. -* a.out and C++: Cplus expressions. -* abbreviation: Command Syntax. -* active targets: Active Targets. -* add-symbol-file: Files. -* add-syms: Renamed Commands. -* AMD 29K register stack: Registers. -* AMD EB29K: Target Commands. -* AMD29K via UDI: UDI29K Remote. -* arguments (to your program): Arguments. -* artificial array: Arrays. -* assembly instructions: Machine Code. -* assignment: Assignment. -* attach: Attach. -* attach: Attach. -* automatic display: Auto Display. -* b: Set Breaks. -* backtrace: Backtrace. -* break: Set Breaks. -* break in overloaded functions: Debugging C plus plus. -* breakpoint commands: Break Commands. -* breakpoint conditions: Conditions. -* breakpoint numbers: Breakpoints. -* breakpoint on memory address: Breakpoints. -* breakpoint on variable modification: Breakpoints. -* breakpoints: Breakpoints. -* bt: Backtrace. -* bug criteria: Bug Criteria. -* bug reports: Bug Reporting. -* bugs in GDB: GDB Bugs. -* c: Continuing and Stepping. -* C and C++: C. -* C and C++ checks: C Checks. -* C and C++ constants: C Operators. -* C and C++ defaults: C Defaults. -* C and C++ operators: C. -* C++: C. -* C++ and object formats: Cplus expressions. -* C++ exception handling: Debugging C plus plus. -* C++ scope resolution: Variables. -* C++ support, not in COFF: Cplus expressions. -* C++ symbol decoding style: Print Settings. -* C++ symbol display: Debugging C plus plus. -* call: Calling. -* call overloaded functions: Cplus expressions. -* call stack: Stack. -* calling functions: Calling. -* calling make: Shell Commands. -* casts, to view memory: Expressions. -* catch: Exception Handling. -* catch exceptions: Frame Info. -* cd: Working Directory. -* cdir: Source Path. -* checks, range: Type Checking. -* checks, type: Checks. -* checksum, for GDB remote: Protocol. -* clear: Delete Breaks. -* clearing breakpoints, watchpoints: Delete Breaks. -* colon, doubled as scope operator: M2 Scope. -* colon-colon: M2 Scope. -* colon-colon: Variables. -* command files: Hooks. -* command files: Command Files. -* command line editing: Editing. -* commands: Break Commands. -* commands for C++: Debugging C plus plus. -* commands to STDBUG (ST2000): ST2000 Remote. -* comment: Command Syntax. -* compilation directory: Source Path. -* completion: Completion. -* completion of quoted strings: Completion. -* condition: Conditions. -* conditional breakpoints: Conditions. -* configuring GDB: Installing GDB. -* confirmation: Messages/Warnings. -* connect (to STDBUG): ST2000 Remote. -* continue: Continuing and Stepping. -* continuing: Continuing and Stepping. -* controlling terminal: Input/Output. -* convenience variables: Convenience Vars. -* core: Files. -* core dump file: Files. -* core-file: Files. -* CPU simulator: Simulator. -* crash of debugger: Bug Criteria. -* current directory: Source Path. -* cwd: Source Path. -* d: Delete Breaks. -* debugger crash: Bug Criteria. -* debugging optimized code: Compilation. -* debugging stub, example: Protocol. -* debugging target: Targets. -* define: Define. -* delete: Delete Breaks. -* delete breakpoints: Delete Breaks. -* delete display: Auto Display. -* delete environment: Renamed Commands. -* deleting breakpoints, watchpoints: Delete Breaks. -* detach: Attach. -* device: Hitachi Remote. -* directories for source files: Source Path. -* directory: Source Path. -* directory, compilation: Source Path. -* directory, current: Source Path. -* dis: Disabling. -* disable: Disabling. -* disable breakpoints: Disabling. -* disable display: Auto Display. -* disabled breakpoints: Disabling. -* disassemble: Machine Code. -* display: Auto Display. -* display of expressions: Auto Display. -* do: Selection. -* document: Define. -* documentation: Formatting Documentation. -* down: Selection. -* down-silently: Selection. -* download to H8/300 or H8/500: Files. -* download to Hitachi SH: Files. -* download to Nindy-960: Files. -* download to VxWorks: VxWorks Download. -* dynamic linking: Files. -* eb.log: Remote Log. -* EB29K board: EB29K Remote. -* EBMON: Comms (EB29K). -* echo: Output. -* editing: Editing. -* editing-mode: Readline Init Syntax. -* emacs: Emacs. -* enable: Disabling. -* enable breakpoints: Disabling. -* enable display: Auto Display. -* enabled breakpoints: Disabling. -* end: Break Commands. -* entering numbers: Numbers. -* environment (of your program): Environment. -* error on valid input: Bug Criteria. -* event designators: Event Designators. -* examining data: Data. -* examining memory: Memory. -* exception handlers: Exception Handling. -* exception handlers: Frame Info. -* exceptionHandler: Bootstrapping. -* exec-file: Files. -* executable file: Files. -* exiting GDB: Quitting GDB. -* expansion: History Interaction. -* expressions: Expressions. -* expressions in C or C++: C. -* expressions in C++: Cplus expressions. -* expressions in Modula-2: Modula-2. -* f: Selection. -* fatal signal: Bug Criteria. -* fatal signals: Signals. -* fg: Continuing and Stepping. -* file: Files. -* finish: Continuing and Stepping. -* flinching: Messages/Warnings. -* floating point: Floating Point Hardware. -* floating point registers: Registers. -* floating point, MIPS remote: MIPS Remote. -* flush_i_cache: Bootstrapping. -* foo: Symbol Errors. -* format options: Print Settings. -* formatted output: Output Formats. -* Fortran: Summary. -* forward-search: Search. -* frame: Selection. -* frame: Frames. -* frame number: Frames. -* frame pointer: Frames. -* frameless execution: Frames. -* g++: C. -* GDB reference card: Formatting Documentation. -* gdbserver: Server. -* getDebugChar: Bootstrapping. -* GNU C++: C. -* h: Help. -* H8/300 or H8/500 download: Files. -* H8/300 or H8/500 simulator: Simulator. -* handle: Signals. -* handle_exception: Stub Contents. -* handling signals: Signals. -* help: Help. -* help target: Target Commands. -* help user-defined: Define. -* history expansion: History. -* history file: History. -* history number: Value History. -* history save: History. -* history size: History. -* history substitution: History. -* Hitachi SH download: Files. -* Hitachi SH simulator: Simulator. -* horizontal-scroll-mode: Readline Init Syntax. -* i: Help. -* i/o: Input/Output. -* i386-stub.c: Remote Serial. -* i960: i960-Nindy Remote. -* ignore: Conditions. -* ignore count (of breakpoint): Conditions. -* INCLUDE_RDB: VxWorks Remote. -* info: Help. -* info address: Symbols. -* info all-registers: Registers. -* info args: Frame Info. -* info breakpoints: Set Breaks. -* info catch: Frame Info. -* info convenience: Renamed Commands. -* info copying: Renamed Commands. -* info directories: Renamed Commands. -* info display: Auto Display. -* info editing: Renamed Commands. -* info f: Frame Info. -* info files: Files. -* info float: Floating Point Hardware. -* info frame: Frame Info. -* info frame: Show. -* info functions: Symbols. -* info history: Renamed Commands. -* info line: Machine Code. -* info locals: Frame Info. -* info proc: Process Information. -* info proc id: Process Information. -* info proc mappings: Process Information. -* info proc status: Process Information. -* info proc times: Process Information. -* info program: Stopping. -* info registers: Registers. -* info s: Backtrace. -* info set: Help. -* info share: Files. -* info sharedlibrary: Files. -* info signals: Signals. -* info source: Symbols. -* info source: Show. -* info sources: Symbols. -* info stack: Backtrace. -* info target: Files. -* info targets: Renamed Commands. -* info terminal: Input/Output. -* info types: Symbols. -* info values: Renamed Commands. -* info variables: Symbols. -* info version: Renamed Commands. -* info warranty: Renamed Commands. -* info watchpoints: Set Watchpoints. -* inheritance: Debugging C plus plus. -* init file: Command Files. -* init file name: Command Files. -* initial frame: Frames. -* innermost frame: Frames. -* inspect: Data. -* installation: Installing GDB. -* instructions, assembly: Machine Code. -* Intel: Remote Serial. -* interaction, readline: Readline Interaction. -* internal GDB breakpoints: Set Breaks. -* interrupt: Quitting GDB. -* interrupting remote programs: Debug Session. -* invalid input: Bug Criteria. -* jump: Jumping. -* kill: Kill Process. -* l: List. -* languages: Languages. -* latest breakpoint: Set Breaks. -* leaving GDB: Quitting GDB. -* linespec: List. -* list: List. -* listing machine instructions: Machine Code. -* load: Files. -* log file for EB29K: Remote Log. -* m68k-stub.c: Remote Serial. -* machine instructions: Machine Code. -* maint info breakpoints: Set Breaks. -* maint print psymbols: Symbols. -* maint print symbols: Symbols. -* make: Shell Commands. -* mapped: Files. -* mark-modified-lines: Readline Init Syntax. -* member functions: Cplus expressions. -* memory tracing: Breakpoints. -* memory, viewing as typed object: Expressions. -* memory-mapped symbol file: Files. -* memset: Bootstrapping. -* MIPS boards: MIPS Remote. -* MIPS remote floating point: MIPS Remote. -* MIPS stack: MIPS Stack. -* Modula-2: Modula-2. -* Modula-2 built-ins: M2 Operators. -* Modula-2 checks: M2 Checks. -* Modula-2 constants: Built-In Func/Proc. -* Modula-2 defaults: M2 Defaults. -* Modula-2 operators: M2 Operators. -* Modula-2, deviations from: Deviations. -* Motorola 680x0: Remote Serial. -* multiple targets: Active Targets. -* n: Continuing and Stepping. -* names of symbols: Symbols. -* namespace in C++: Cplus expressions. -* negative breakpoint numbers: Set Breaks. -* next: Continuing and Stepping. -* nexti: Continuing and Stepping. -* ni: Continuing and Stepping. -* Nindy: i960-Nindy Remote. -* number representation: Numbers. -* numbers for breakpoints: Breakpoints. -* object formats and C++: Cplus expressions. -* online documentation: Help. -* optimized code, debugging: Compilation. -* outermost frame: Frames. -* output: Output. -* output formats: Output Formats. -* overloading: Breakpoint Menus. -* overloading in C++: Debugging C plus plus. -* packets, reporting on stdout: Protocol. -* partial symbol dump: Symbols. -* patching binaries: Patching. -* path: Environment. -* pauses in output: Screen Size. -* pipes: Starting. -* prefer-visible-bell: Readline Init Syntax. -* print: Data. -* print settings: Print Settings. -* printf: Output. -* printing data: Data. -* process image: Process Information. -* prompt: Prompt. -* protocol, GDB remote serial: Protocol. -* ptype: Symbols. -* putDebugChar: Bootstrapping. -* pwd: Working Directory. -* q: Quitting GDB. -* quit: Quitting GDB. -* quotes in commands: Completion. -* quoting names: Symbols. -* raise exceptions: Exception Handling. -* range checking: Type Checking. -* rbreak: Set Breaks. -* reading symbols immediately: Files. -* readline: Editing. -* readnow: Files. -* redirection: Input/Output. -* reference card: Formatting Documentation. -* reference declarations: Cplus expressions. -* register stack, AMD29K: Registers. -* registers: Registers. -* regular expression: Set Breaks. -* reloading symbols: Messages/Warnings. -* remote connection without stubs: Server. -* remote debugging: Remote. -* remote programs, interrupting: Debug Session. -* remote serial debugging summary: Debug Session. -* remote serial debugging, overview: Remote Serial. -* remote serial protocol: Protocol. -* remote serial stub: Stub Contents. -* remote serial stub list: Remote Serial. -* remote serial stub, initialization: Stub Contents. -* remote serial stub, main routine: Stub Contents. -* remote stub, example: Protocol. -* remote stub, support routines: Bootstrapping. -* repeating commands: Command Syntax. -* reporting bugs in GDB: GDB Bugs. -* reset: Nindy Reset. -* response time, MIPS debugging: MIPS Stack. -* resuming execution: Continuing and Stepping. -* RET: Command Syntax. -* return: Returning. -* returning from a function: Returning. -* reverse-search: Search. -* run: Starting. -* running: Starting. -* running 29K programs: EB29K Remote. -* running VxWorks tasks: VxWorks Attach. -* s: Continuing and Stepping. -* saving symbol table: Files. -* scope: M2 Scope. -* search: Search. -* searching: Search. -* selected frame: Stack. -* serial connections, debugging: Protocol. -* serial device, Hitachi micros: Hitachi Remote. -* serial line speed, Hitachi micros: Hitachi Remote. -* serial line, target remote: Debug Session. -* serial protocol, GDB remote: Protocol. -* set addressprint: Renamed Commands. -* set args: Arguments. -* set array-max: Renamed Commands. -* set arrayprint: Renamed Commands. -* set asm-demangle: Renamed Commands. -* set caution: Renamed Commands. -* set check: Range Checking. -* set check: Type Checking. -* set check range: Range Checking. -* set check type: Type Checking. -* set complaints: Messages/Warnings. -* set confirm: Messages/Warnings. -* set demangle: Renamed Commands. -* set demangle-style: Print Settings. -* set editing: Editing. -* set environment: Environment. -* set height: Screen Size. -* set history expansion: History. -* set history filename: History. -* set history save: History. -* set history size: History. -* set history write: Renamed Commands. -* set language: Manually. -* set listsize: List. -* set mipsfpu off: MIPS Remote. -* set prettyprint: Renamed Commands. -* set print address: Print Settings. -* set print array: Print Settings. -* set print asm-demangle: Print Settings. -* set print demangle: Print Settings. -* set print elements: Print Settings. -* set print max-symbolic-offset: Print Settings. -* set print object: Print Settings. -* set print pretty: Print Settings. -* set print sevenbit-strings: Print Settings. -* set print symbol-filename: Print Settings. -* set print union: Print Settings. -* set print vtbl: Print Settings. -* set prompt: Prompt. -* set radix: Numbers. -* set remotedebug: Protocol. -* set retransmit-timeout: MIPS Remote. -* set rstack_high_address: Registers. -* set screen-height: Renamed Commands. -* set screen-width: Renamed Commands. -* set sevenbit-strings: Renamed Commands. -* set symbol-reloading: Messages/Warnings. -* set timeout: MIPS Remote. -* set unionprint: Renamed Commands. -* set variable: Assignment. -* set verbose: Messages/Warnings. -* set vtblprint: Renamed Commands. -* set width: Screen Size. -* set write: Patching. -* setting variables: Assignment. -* setting watchpoints: Set Watchpoints. -* set_debug_traps: Stub Contents. -* share: Files. -* shared libraries: Files. -* sharedlibrary: Files. -* shell: Shell Commands. -* shell escape: Shell Commands. -* show: Help. -* show addressprint: Renamed Commands. -* show args: Arguments. -* show array-max: Renamed Commands. -* show arrayprint: Renamed Commands. -* show asm-demangle: Renamed Commands. -* show caution: Renamed Commands. -* show check range: Range Checking. -* show check type: Type Checking. -* show commands: History. -* show complaints: Messages/Warnings. -* show confirm: Messages/Warnings. -* show convenience: Convenience Vars. -* show copying: Help. -* show demangle: Renamed Commands. -* show demangle-style: Print Settings. -* show directories: Source Path. -* show editing: Editing. -* show environment: Environment. -* show height: Screen Size. -* show history: History. -* show history write: Renamed Commands. -* show language: Show. -* show listsize: List. -* show paths: Environment. -* show prettyprint: Renamed Commands. -* show print address: Print Settings. -* show print array: Print Settings. -* show print asm-demangle: Print Settings. -* show print demangle: Print Settings. -* show print elements: Print Settings. -* show print max-symbolic-offset: Print Settings. -* show print object: Print Settings. -* show print pretty: Print Settings. -* show print sevenbit-strings: Print Settings. -* show print symbol-filename: Print Settings. -* show print union: Print Settings. -* show print vtbl: Print Settings. -* show prompt: Prompt. -* show radix: Numbers. -* show remotedebug: Protocol. -* show retransmit-timeout: MIPS Remote. -* show rstack_high_address: Registers. -* show screen-height: Renamed Commands. -* show screen-width: Renamed Commands. -* show sevenbit-strings: Renamed Commands. -* show timeout: MIPS Remote. -* show unionprint: Renamed Commands. -* show user: Define. -* show values: Value History. -* show verbose: Messages/Warnings. -* show version: Help. -* show vtblprint: Renamed Commands. -* show warranty: Help. -* show width: Screen Size. -* show write: Patching. -* si: Continuing and Stepping. -* signal: Signaling. -* signals: Signals. -* silent: Break Commands. -* sim: Simulator. -* simulator: Simulator. -* simulator, H8/300 or H8/500: Simulator. -* simulator, Hitachi SH: Simulator. -* simulator, Z8000: Simulator. -* size of screen: Screen Size. -* source: Command Files. -* source path: Source Path. -* sparc-stub.c: Remote Serial. -* speed: Hitachi Remote. -* st2000 CMD: ST2000 Remote. -* ST2000 auxiliary commands: ST2000 Remote. -* stack frame: Frames. -* stack on MIPS: MIPS Stack. -* stacking targets: Active Targets. -* starting: Starting. -* STDBUG commands (ST2000): ST2000 Remote. -* step: Continuing and Stepping. -* stepi: Continuing and Stepping. -* stepping: Continuing and Stepping. -* stub example, remote debugging: Protocol. -* stupid questions: Messages/Warnings. -* symbol decoding style, C++: Print Settings. -* symbol dump: Symbols. -* symbol names: Symbols. -* symbol overloading: Breakpoint Menus. -* symbol table: Files. -* symbol-file: Files. -* symbols, reading immediately: Files. -* target: Targets. -* target amd-eb: Target Commands. -* target core: Target Commands. -* target exec: Target Commands. -* target hms: Target Commands. -* target mips PORT: MIPS Remote. -* target nindy: Target Commands. -* target remote: Target Commands. -* target sim: Target Commands. -* target sim: Simulator. -* target st2000: Target Commands. -* target udi: Target Commands. -* target vxworks: Target Commands. -* tbreak: Set Breaks. -* TCP port, target remote: Debug Session. -* terminal: Input/Output. -* this: Cplus expressions. -* toggle-editing-mode: Readline Vi Mode. -* tty: Input/Output. -* type casting memory: Expressions. -* type checking: Checks. -* type conversions in C++: Cplus expressions. -* u: Continuing and Stepping. -* udi: UDI29K Remote. -* UDI: UDI29K Remote. -* undisplay: Auto Display. -* unset: Renamed Commands. -* unset environment: Environment. -* until: Continuing and Stepping. -* up: Selection. -* up-silently: Selection. -* user-defined command: Define. -* value history: Value History. -* variable name conflict: Variables. -* variable values, wrong: Variables. -* variables, setting: Assignment. -* version number: Help. -* VxWorks: VxWorks Remote. -* watch: Set Watchpoints. -* watchpoints: Breakpoints. -* whatis: Symbols. -* where: Backtrace. -* word completion: Completion. -* working directory: Source Path. -* working directory (of your program): Working Directory. -* working language: Languages. -* writing into corefiles: Patching. -* writing into executables: Patching. -* wrong values: Variables. -* x: Memory. -* Z8000 simulator: Simulator. - - diff --git a/gnu/usr.bin/gdb/doc/libgdb.texinfo b/gnu/usr.bin/gdb/doc/libgdb.texinfo deleted file mode 100644 index c67c3a8..0000000 --- a/gnu/usr.bin/gdb/doc/libgdb.texinfo +++ /dev/null @@ -1,1471 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename libgdb.info -@settitle Libgdb -@setchapternewpage odd -@c %**end of header - -@ifinfo -This file documents libgdb, the GNU library for symbolic debuggers. - -Copyright 1993 Cygnus Support - -Permission is granted to ... -@end ifinfo - -@c This title page illustrates only one of the -@c two methods of forming a title page. - -@titlepage -@title Libgdb -@subtitle Version 0.1 -@subtitle 27 Sep 1993 -@author Thomas Lord - -@c The following two commands -@c start the copyright page. -@page -@vskip 0pt plus 1filll -Copyright @copyright{} 1993 COPYRIGHT-OWNER - -Published by ... - -Permission is granted to ... -@end titlepage - -@node Top, Overview, (dir), (dir) - -@ifinfo - -Libgdb is a library which provides the core functionality of a symbolic -debugger. It is derived from GNU GDB and depends on the BFD library. - -This is an early draft of this document. Subsequent versions will likely -contain revisions, deletions and additions. - -This document applies to version 0.0. - -Text marked `[[[' indicates areas which require expansion. - -Many nodes describe library entry points by giving a prototype and brief -description: - -@deftypefun {const char **} gdb_warranty () -(warranty_info) -Return a pointer to the text of the GDB disclaimer. -@end deftypefun - -The parenthesized symbols (e.g. `(warranty_info)') refer to the -existing GDB source and generally indicate where to find code with -which to implement the library function. -@end ifinfo - -@menu -* Copying:: Your rights and freedoms. -* Overview:: The basics of libgdb and this document. -* Conventions:: Programming conventions for users of libgdb. -* Targets:: Selecting debugging targets and symbol tables. -* Symtabs:: Accessing symbol tables and debugging information. -* Source:: Relating inferiors to source files. -* Running:: Creating, continuing, and stepping through an - inferior process. -* Stopping:: Using breakpoints, signaling an inferior. -* Stack:: Accessing an inferior's execution stack. -* Expressions:: How to parse and evaluate expressions in the - context of an inferior. -* Values:: Data from the inferior, the values of expressions. -* Examining:: Formatting values as strings. -* Types:: Examining the types of an inferiors data. -@end menu - - -@node Copying, Overview, top, top -@comment node-name, next, previous, up -@chapter Copying -@cindex copying - -blah blah - -@node Overview, Conventions, Copying, top -@comment node-name, next, previous, up -@chapter Overview -@cindex overview -@cindex definitions - - -Libgdb is a library which provides the core functionality of a symbolic -debugger. It is derived from GNU GDB and depends on the BFD library. - -target -inferior - - - -@node Conventions, Targets, Overview, top -@comment node-name, next, previous, up -@chapter Programming Conventions for Libgdb Clients -@cindex Conventions - -@heading Naming Conventions - -Names intentionally exported from libgdb all begin @code{gdb_} -as in @code{gdb_use_file}. - - -@heading Error Returns - -Libgdb functions that might not succeed generally have a return -type of @code{gdb_error_t}. - -@deftypefun {const char *} gdb_error_msg (gdb_error_t @var{error}) -returns a reasonable error message for @var{error}. -@end deftypefun - - -@heading Blocking I/O - -[[[....]]] - - -@heading Global Parameters -@subheading the current directory -@deftypefun gdb_error_t gdb_cd (char * @var{dir}) -Specify gdb's default directory as well as the working -directory for the inferior (when first started).@* -(cd_command) -@end deftypefun - -@deftypefun {char *} gdb_copy_pwd () -Make a copy of the name of gdb's default directory.@* -(pwd_command) -@end deftypefun - - -@subheading controlling the input/output radix -@deftypefun gdb_error_t gdb_set_base (int) -Change the default output radix to 10 or 16, or set it to 0 -(heuristic). This command is mostly obsolete now that the print -command allows formats to apply to aggregates, but is still handy -occasionally.@* -(set_base_command) -@end deftypefun - -@deftypefun gdb_error_t gdb_set_input_radix (int) -@deftypefunx gdb_error_t gdb_set_output_radix (int) -@deftypefunx gdb_error_t gdb_set_radix (int) -Valid output radixes are only 0 (heuristic), 10, and 16.@* -(set_radix) -@end deftypefun - - -@subheading manipulating environments -@deftp Type {struct environ} -@example -struct environ -@{ - int allocated; - char ** vector; -@} -@end example -A `struct environ' holds a description of environment -variable bindings. -@end deftp - -@deftypefun {struct environ *} gdb_make_environ () -Create a new (empty) environment.@* -(make_environ) -@end deftypefun - -@deftypefun {void} gdb_free_environ (struct environ *) -Free an environment allocated by `gdb_make_environ'.@* -(free_environ) -@end deftypefun - -@deftypefun {void} gdb_init_environ (struct environ * env) -Copy the processes environment into ENV.@* -(init_environ) -@end deftypefun - -@deftypefun {char **} gdb_get_in_environ (const struct environ * @var{env}, const char * @var{var}) -Look up the binding of @var{var} in @var{env}.@* -(get_in_environ) -@end deftypefun - - -@deftypefun {void} gdb_set_in_environ (struct environ * @var{env}, const char * @var{var}, const char * @var{value}) -Lookup/bind variables within an environment. -(set_in_environ) -@end deftypefun - - -@subheading legal notices -@deftypefun {char **} gdb_copying () -@deftypefunx {char **} gdb_warranty () -These return pointers to NULL terminated arrays of strings. -They contain text which describes the conditions under which -libgdb is distributed (`gdb_copying') and which explains to -users that there is no warranty for libgdb (`gdb_warranty').@* -(show_warranty_command, show_copying_command) -@end deftypefun - - -@subheading the inferior's terminal -@deftypefun void gdb_inferiors_io (int @var{std_in}, int @var{std_out}, int @var{std_err}) -Assert that the given descriptors should be copied into -descriptors 0, 1, and 2 of the inferior when it -is next run. -@end deftypefun - - -@heading callbacks - -One idiom used in several places deserves mention. -At times, it makes sense for libgdb functions to -invoke functions provided by the libgdb client. -Where this is the case, callback structures are used -to refer to client functions. For example, here -are the declarations for a callback to which libgdb -will pass an integer and a character pointer. - -@example -struct a_gdb_cback; -typedef void (*a_gdb_cback_fn) (struct a_gdb_cback *, - int, char *); -@end example - -Suppose the client wants the callback to be implemented -by @code{foo} which we will assume takes not only the integer -and character pointer, but also a floating point number. -The client could use these declarations: - -@example -struct my_cback -@{ - struct a_gdb_cback gdb_cback; /* must be first */ - float magic_number; -@}; - -void -foo_helper (struct a_gdb_cback * callback, int i, char * cp) -@{ - foo ( ((struct my_cback *)callback)->magic_number, i, c); -@} - -struct my_cback -@{ - foo_helper, - 1079252848.8 -@} the_cback; -@end example - - -@subheading stream callbacks - -A common kind of callback takes just a character pointer, -presumed to point to part or all of an informational -message. - -@example -struct gdb_stream_cback; -typedef void (*gdb_stream_cback_fn) (struct gdb_stream_cback *, - char *); -@end example - - -@subheading integer callbacks - -Another common kind of callback takes just an integer. - -@example -struct gdb_int_cback; -typedef void (*gdb_int_cback_fn) (struct gdb_int_cback *, int); -@end example - -@node Targets, Symtabs, Conventions, top -@comment node-name, next, previous, up -@chapter Selecting Targets and Symbol Tables for Debugging -@cindex targets - -@deftypefun gdb_error_t gdb_use_file (char * @var{filename}) -Arrange to read both executable code and symbol table information -from FILENAME. - -This is exactly equivalent to a sequence of two calls: -@example - gdb_use_exec_file (filename); - gdb_use_symbol_file (filename); -@end example -(file_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_use_exec_file (char * @var{filename}) -Read the code to debug from `filename'.@* -(exec_file_command) -@end deftypefun - - -@deftypefun {char *} gdb_get_exec_file () -Return the name of the executable file as a string or 0 -if there is none. -@end deftypefun - - -@deftypefun gdb_error_t gdb_use_core (char * @var{filename}) -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; GDB -can access the executable file itself for other parts. - -If @var{filename} is @code{NULL}, no core file is used.@* -(core_file_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_use_symbol_file (char * @var{filename}) -Arrange to read symbol table information from `filename'. - -This is the same as: - - gdb_symbol_file_add (filename, 1, (CORE_ADDR)0, 1, 0, 0); - -See @code{gdb_symbol_file_add} for finer control over the symbol -table.@* -(symbol_file_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_symbol_file_add (@var{name}, @var{verbose}, @var{text_addr}, @var{replace}, @var{eager}) -Arrange to read additional symbol table information from -the file `name'. - -The arguments are: -@itemize @minus -@item struct gdb_stream_cback * @var{info_out} - -Callback to handle informational output. - -@item char * @var{name} - -If not 0, verbose output will occur. - -@item int @var{be_verbose} - -Regulates the amount of informational output produced. - -@item CORE_ADDR @var{text_addr} - -is the address at which the named file is presumed to have -been loaded. - -@item int @var{replace}@* - -If not 0, this will become the only file -in the symbol table -- all previously loaded -symbol table information will be discarded. - -@item int @var{readnow} - -If not 0, eagerly read symbols from this file,otherwise -symbols will only be read lazily (as needed). -@end itemize -@end deftypefun - - -@deftypefun {char *} gdb_copy_exec_path () -Make a copy of the execution path.@* -[[[implement: strsave(get_in_environ (inferior_environ, "PATH"));]]]@* -(path_info) -@end deftypefun - - -@deftypefun void gdb_mod_exec_path (char * @var{dirnames}) -Add zero or more directories to the front of the execution path. -@var{dirnames} should be a colon separated list of directory names.@* -(path_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_target_device (char * @var{name}) -Connects the libgdb host environment to a target machine -or process.@* -(target foo) -@end deftypefun - - -@deftypefun gdb_error_t gdb_set_baud (int @var{rate}) -If using a remote target connected by a serial port, -use RATE as the communication speed. -@end deftypefun - - -@deftypefun gdb_error_t gdb_set_target_debugging (int @var{level}) -Choose the level of verboseness of with which a remote -target produces debugging output. -@end deftypefun - -@node Symtabs, Source, Targets, top -@comment node-name, next, previous, up -@chapter Accessing symbol tables and debugging information. -@cindex Symtabs -@cindex {Symbol Tables} - -@deftp Type {struct symtab} -Each source file is represented by a struct symtab. -In many contexts, @code{struct symtab *} is used in preference -to a {char *} filename to refer to the source. -@end deftp - - -@deftypefun {char *} gdb_symtab_to_filename (struct symtab *) -@deftypefunx {char *} gdb_symtab_to_dirname (struct symtab *) -Return the location of the file corresponding to this symtab. -@code{gdb_symtab_to_dirname} might return @code{NULL} if no directory -is known. @code{gdb_symtab_to_line_count} might return -1 if line -number information is unavailable. -@end deftypefun - -@deftypefun int gdb_symtab_to_line_count (struct symtab *) -(See also `Source') -@end deftypefun - - -@deftypefun {struct symtab *} gdb_filename_to_symtab (char * @var{filename}) -Lookup the symbol table of a source file named NAME.@* -(lookup_symtab) -@end deftypefun - - -@deftp Type {struct symtab_and_line} -@example -struct symtab_and_line -@{ - struct symtab *symtab; - int line; - CORE_ADDR pc; - CORE_ADDR end; -@} -@end example - -@code{struct symtab_and_line} is used to refer to a particular line -of source code. It is used to locate breakpoints in the source -code and the executable. - -@code{line} starts at 1 and proceeds through symtab->nlines. -0 is never a valid line number; it is used to indicate -that line number information is not available. -@end deftp - - -@deftypefun {struct symtab_and_line} gdb_find_pc_line (CORE_ADDR @var{pc}, int @var{notcurrent}) -Find the source file and line number for a given @var{pc} value. -Return a structure containing a symtab pointer, a line number, -and a pc range for the entire source line. -The value's @code{.pc} field is NOT the specified @var{pc}. -@var{notcurrent} nonzero means, if specified pc is on a line boundary, -use the line that ends there. Otherwise, in that case, the line -that begins there is used.@* -(find_pc_line) -@end deftypefun - - -@deftypefun gdb_error_t gdb_find_line (struct symtab_and_line * @var{out}, struct symtab *, int) -Create a symtab_and_line for a given symtab and line number. -In other words, if you know the source file and line, -this returns a location for the breakpoint.@* -(resolve_sal_pc) -@end deftypefun - - -@deftypefun {struct symtabs_and_lines} gdb_decode_line (@var{argptr}, @var{firstln}, @var{default_symtab}, @var{default_line}, @var{canonical}) -@example - char ** argptr; - int funfirstline; - struct symtab * default_symtab; - int default_line; - char *** canonical; -@end example - Parse a string that specifies a line number in GDB syntax. - @var{argptr} will be advanced over the characters actually parsed. - - The string can be: - - LINENUM -- that line number in current file. PC returned is 0. - FILE:LINENUM -- that line in that file. PC returned is 0. - FUNCTION -- line number of openbrace of that function. - PC returned is the start of the function. - VARIABLE -- line number of definition of that variable. - PC returned is 0. - FILE:FUNCTION -- likewise, but prefer functions in that file. - *EXPR -- line in which address EXPR appears. - - FUNCTION may be an undebuggable function found in minimal symbol - table. - - If the argument FUNFIRSTLINE is nonzero, we want the first line - of real code inside a function when a function is specified. - - DEFAULT_SYMTAB specifies the file to use if none is specified. - It defaults to current_source_symtab. - - DEFAULT_LINE specifies the line number to use for relative line - numbers (that start with signs). Defaults to current_source_line. - If CANONICAL is non-NULL, store an array of strings containing the - canonical line specs there if necessary. Currently overloaded - member functions and line numbers or static functions without a - filename yield a canonical line spec. The array and the line spec - strings are allocated on the heap, it is the callers responsibility - to free them. - - Note that it is possible to return zero for the symtab - if no file is validly specified. Callers must check that. - Also, the line number returned may be invalid. - - The return value of this function includes allocated memory - which the caller is responsible for freeing: - - struct symtabs_and_lines sals; - sals = decode_line_spec (arg, 1); - .... - free (sals.sals);@* -(decode_line_1) -@end deftypefun - - -@deftp Type {struct block *} -Lexical environments in the program are represented by struct block. -These are useful as arguements to expression parsing functions (see -`Expressions'). -@end deftp - - -@deftypefun {struct block *} gdb_block_for_pc (CORE_ADDR) -Return the innermost lexical block containing the -specified pc value, or 0 if there is none.@* -(block_for_pc) -@end deftypefun - - -@deftypefun {struct block *} gdb_get_frame_block (FRAME @var{frame}) -This returns the block being executed by a given -stack frame (see `Stack')@* -(get_frame_block) -@end deftypefun - - -@deftypefun int gdb_find_line_pc_range (@var{syms}, @var{line}, @var{start_out}, @var{end_out}) -@example -struct symtab * @var{start_out}; -int @var{line}; -CORE_ADDR * @var{start_out}; -CORE_ADDR * @var{end_out}; -@end example -Find the range of pc values in a line.@* -Store the starting pc of the line into @code{*@var{startptr}}. -and the ending pc (start of next line) into @code{*@var{endptr}}. - -Returns 1 to indicate success.@* -Returns 0 if could not find the specified line.@* -(find_line_pc_range) -@end deftypefun - - -@deftypefun int gdb_find_pc_partial_function (@var{pc}, @var{name}, @var{address}, @var{endaddr}) -@example -CORE_ADDR @var{pc}; -char **@var{name}; -CORE_ADDR *@var{address}; -CORE_ADDR *@var{endaddr}; -@end example -Finds the "function" (text symbol) that is smaller than @var{pc} but -greatest of all of the potential text symbols. Sets @code{*@var{name}} -and/or @code{*@var{address}} conditionally if that pointer is non-null. If -@var{endaddr} is non-null, then set @code{*@var{endaddr}} to be the end of -the function (exclusive), but passing @var{endaddr} as non-null means that -the function might cause symbols to be read. This function either succeeds -or fails (not halfway succeeds). If it succeeds, it sets -@code{*@var{name}}, @code{*@var{address}}, and @code{*@var{endaddr}} to -real information and returns 1. If it fails, it sets @code{*@var{name}}, -@code{*@var{address}}, and @code{*@var{endaddr}} to zero and returns 0. - -@example - pc = get_frame_pc (selected_frame); - if (find_pc_partial_function (pc, &name, &low, &high) == 0) - error ("No function contains program counter for selected frame.\n"); -@end example -(find_pc_partial_function) -@end deftypefun - - -@deftypefun void gdb_list_symbols (@var{info_out}, @var{regexp}, @var{class}, @var{bpt}) -@example -struct gdb_stream_cback * @var{info_out}; -char * @var{regexp}; -int @var{class}; -int @var{bpt}; -@end example -List all symbols (if @var{regexp} is NULL) or all symbols matching @var{regexp}. - - -If @var{class} is ... -@itemize @bullet -@item -0, list all symbols except functions, type names, and -constants (enums). -@item -1, list only functions. -@item -2, list only type names. -@item -3, list only method names. -@end itemize -BPT is non-zero if set a breakpoint at the functions we find.@* -(variables_info, functions_info, types_info, list_symbols) -@end deftypefun - - -@deftypefun int gdb_locals_info (struct gdb_stream_cback * @var{info_out}, FRAME @var{frame}) -Print all the local variables in the given frame. -including all the blocks active in that frame -at its current pc. - -Returns 1 if the job was done, -or 0 if nothing was printed because we have no info -on the function running in @var{frame}.@* -(locals_info) -@end deftypefun - - -@deftypefun int print_frame_arg_vars (struct gdb_stream_cback *, FRAME) -Similar to `gdb_locals_info'.@* -(args_info) -@end deftypefun - -@node Source, Running, Symtabs, top -@comment node-name, next, previous, up -@chapter Relating Inferiors to Source Files -@cindex source -@cindex {source files} - -How to find the source that corresponds to executable code and the -executable code that corresponds to a line of source. - -@deftypefun {char *} gdb_copy_source_fullname (struct symtab *@var{s}) -Return a copy of the full path name to a source file. -(See `Symtabs' for more information about filenames -and symbol tables.). -@end deftypefun - - -@deftypefun int gdb_open_source_file (struct symtab *@var{s}) -Open a source file corresponding to @var{s}. Returns a file descriptor -or negative number for error. -[[[We may decide not to provide this function.]]]@* -(open_source_file) -@end deftypefun - - -@deftypefun int gdb_source_line_pos (struct symtab * @var{s}, int @var{lineno}) -Return the byte offset of a given line of source -or a negative number if @var{lineno} is out of range.@* -(find_source_lines) -@end deftypefun - - - -- IDIOM: The gdb command `show directories'. -@example - puts_filtered ("Source directories searched: "); - puts_filtered (source_path); - puts_filtered ("\n"); -@end example -(show_directories) - - -@deftypefun {char *} gdb_source_path () -Return the path in which source files are sought.@* -(source_path) -@end deftypefun - - -@deftypefun void gdb_modify_source_path (char * @var{dirnames}) -Change the source path according to dirnames.@* -(directory_command) -@end deftypefun - - -See `Symtabs' for functions relating symbol tables to files. -(source_info) - - -See `Symtabs' for functions relating source lines to PC values. -(line_info) - - -[[[Try to expose sources_info without having to introduce struct object *?]]] -(sources_info) - - -@node Running, Stopping, Source, top -@comment node-name, next, previous, up -@chapter Creating, Continuing, and Stepping Through an Inferior Process -@cindex running - - -@deftypefun gdb_error_t gdb_target_create_inferior (@var{exec}, @var{args}, @var{environ}) -@example -char * @var{exec_file}; -char * @var{inferior_args}; -char ** @var{inferior_environment_vector}; -@end example -Create a running inferior. -[[[I think the exec_file parameter is redundant. Perhaps this will take -only two arguments.]]]@* -(run_command, target_create_inferior) -@end deftypefun - - -@deftypefun int gdb_target_has_execution () -Return non-0 if an inferior is running.@* -(target_has_execution) -@end deftypefun - - -@deftypefun void gdb_target_kill () -Kill the inferior process. Make it go away. -The inferior may become a core file. -If so, gdb_target_has_stack() will return non-0.@* -(target_kill) -@end deftypefun - - -@deftypefun gdb_error_t gdb_step_1 (@var{skip_subs}, @var{single_inst}, @var{repeat_count}) -@example -int skip_subs; -int single_inst; -int repeat_count; -@end example -Continue a program a little bit. Roughly: -@example - for (; count > 0; --count) - gdb_clear_proceed_status (); - gdb_proceed (...); -@end example -(next_command, nexti_command, step_command, stepi_command) -@end deftypefun - - - -- IDIOM: Continuing a program where it stopped. -@example - gdb_clear_proceed_status (); - gdb_proceed ((CORE_ADDR) -1, -1, 0); -@end example -(continue_command) - - - -- IDIOM: Continuing a program giving it a specified signal. -@example - gdb_clear_proceed_status (); - gdb_proceed ((CORE_ADDR) -1, signum, 0); -@end example -(signal_command) - - -@deftypefun {char *} strtosigno (char * @var{str}) -(Typical use:) -@example - signum = strtosigno (signum_exp); - - if (signum == 0) - /* Not found as a name, try it as an expression. */ - signum = parse_and_eval_address (signum_exp); - - gdb_clear_proceed_status (); - gdb_proceed (); -@end example -@end deftypefun - - - -- IDIOM: Continuing a program at a specified address. -@example - gdb_clear_proceed_status (); - gdb_proceed (addr, 0, 0); -@end example -(jump_command) - - -@deftypefun gdb_error_t gdb_finish () -"finish": Set a temporary breakpoint at the place -the selected frame will return to, then continue. -This is a convenience function but it summarizes a lot -of other stuff.@* -(finish_command) -@end deftypefun - - -@deftypefun void gdb_clear_proceed_status () -Clear out all variables saying what to do when inferior is continued. -First do this, then set the ones you want, then call @code{gdb_proceed}. - - [[[Some of these should be documented, others hidden.]]] -@example - The variables are: - trap_expected = 0; - step_range_start = 0; - step_range_end = 0; - step_frame_address = 0; - step_over_calls = -1; - stop_after_trap = 0; - stop_soon_quietly = 0; - proceed_to_finish = 0; - breakpoint_proceeded = 1; /* We're about to proceed... */ - - /* Discard any remaining commands or status from previous stop. */ - bpstat_clear (&stop_bpstat); -@end example -(clear_proceed_status) -@end deftypefun - - -@deftypefun void gdb_proceed (CORE_ADDR @var{addr}, int @var{signal}, int @var{step}) -Basic routine for continuing the program in various fashions. - -@var{addr} is the address to resume at, or -1 for resume where stopped.@* -@var{signal} is the signal to give it, or 0 for none, -or -1 for act according to how it stopped.@* -@var{step} is nonzero if should trap after one instruction. --1 means return after that and print nothing.@* -You should probably set various step_... variables -before calling here, if you are stepping. - -You should call @code{gdb_clear_proceed_status} before calling proceed. -(See the documentation for @code{gdb_clear_proceed_status} for more -parameters to @code{gdb_proceed}).@* -(proceed) -@end deftypefun - - -@deftypefun gdb_error_t gdb_return (value @var{return_value}, FRAME @var{frame}) -Make @var{frame} return to @var{value} to it's caller. -Unlike the other functions in this section, this doesn't -call proceed. -(return_command) -@end deftypefun - - -@deftypefun int gdb_inferior_pid () -0 or the valid pid of an inferior. -@end deftypefun - - -@deftypefun gdb_error_t gdb_attach (int @var{pid}) -takes a program started up outside of gdb and -`attaches'' to it. This stops it cold in its tracks and allows us -to start debugging it. and wait for the trace-trap that results -from attaching.@* -(attach_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_detach (int @var{signal_num}) -Takes a program previously attached to and detaches it. -The program resumes execution and will no longer stop -on signals, etc. We better not have left any breakpoints -in the program or it'll die when it hits one. For this -to work, it may be necessary for the process to have been -previously attached. It *might* work if the program was -started via the normal ptrace (PTRACE_TRACEME).@* -(detach_command) -@end deftypefun - -@node Stopping, Stack, Running, top -@comment node-name, next, previous, up -@chapter Using Breakpoints, Signaling an Inferior -@cindex stopping -@cindex breakpoints - - -@deftp Type {struct breakpoint} -Breakpoints are typically represented @code{struct breakpoint *}. -@end deftp - - -@deftypefun {struct breakpoint *} gdb_find_breakpoint (int) -Find a breakpoint given it's number (return 0 if it doesn't exist). -@end deftypefun - -@deftypefun gdb_error_t gdb_set_break (struct breakpoint * @var{brk_out}, struct symtab_and_line) -@deftypefunx gdb_error_t gdb_set_tbreak (struct breakpoint *, struct symtab_and_line) -@deftypefunx gdb_error_t gdb_set_until (struct breakpoint *, struct symtab_and_line) -These three are like their command language counterparts. -They are front ends to `gdb_set_raw_breakpoint'. -See `Symtabs' for sources of `struct symtab_and_line'.@* -(break_command, break_command_1, until_command, tbreak_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_set_watchpt (@var{brk_out}, @var{exp_string}, @var{exp}, @var{exp_valid_block}) -@example -struct breakpoint * @var{brk_out}; -char * @var{exp_string}; -struct expression * @var{exp}; -struct block * @var{expression_valid_block}; -@end example -Set a watchpoint for the given expression.@* -(watch_command) -@end deftypefun - - -@deftypefun void gdb_set_ignore_count (int @var{bptnum}, int @var{count}) -Set ignore-count of breakpoint number BPTNUM to COUNT.@* -(set_ignore_count) -@end deftypefun - - -@deftypefun {struct gdb_bp_condition *} gdb_set_condition (@var{bp}, @var{exp_str}, @var{cond}) -@example -int @var{pbtnum}; -char * @var{exp_str}; -struct gdb_bp_condition * @var{cond}; - -typedef int (*gdb_bp_fn) (struct gdb_bp_condition *, int bp_num); -struct gdb_bp_condition -@{ - gdb_bp_fn fn; -@}; -@end example -Add a condition to a breakpoint. -The condition is a callback which should return -0 to skip the breakpoint, and 1 to break at it. -It is called at times when the break might occur. - -A useful application of these callbacks to attach -an expression to breakpoints like the gdb `condition' -command. See `Expressions' for the parsing and -evaluation of expressions.@* -(condition_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_enable_breakpoint (struct breakpoint * @var{bpt}, int @var{once}) -@deftypefunx gdb_error_t gdb_disable_breakpoint (struct breakpoint * @var{bpt}) -Enable/disable a breakpoint. If `once' is not 0, the -breakpoint is only temporarily enabled.@* -(enable_breakpoint, disable_breakpoint, enable_command) -@end deftypefun - - -@deftypefun gdb_error_t gdb_delete_breakpoint (struct breakpoint * @var{bpt}) -Delete a breakpoint and clean up all traces of it in the -data structures.@* -(delete_breakpoint) -@end deftypefun - - -@deftypefun void gdb_clear_breakpoints (struct symtabs_and_lines * @var{sals}) -Clear breakpoints from a list of program locations as -might be returned by `gdb_decode_line' (see `Symtabs').@* -(clear_command) -@end deftypefun - - -@deftypefun {static struct symtabs_and_lines} get_catch_sals (int @var{this_level_only}) -Return the line numbers of all exception handlers currently -active (or `this_level_only'?? [[[?]]]). -[[[The implementation should remember to resolve_sal_pc]]] -@end deftypefun - - -@deftp Type {struct breakpoint_cback} -@example -typedef void (*breakpoint_cback_fn) (struct breakpoint_cback *, int bp_num); -struct breakpoint_cback -@{ - breakpoint_cback_fn fn; -@}; -@end example - -Breakpoints can have an associated function which is called -when the program is stopped by that breakpoint.@* -(commands_command) -@end deftp - - -@deftypefun {struct breakpoint_cback *} gdb_set_breakpoint_cback (int @var{bp_num}, struct breakpoint_cback *) -This sets a breakpoint callback and returns the previous callback value -for that breakpoint. -[[[In the long run, the command interpreter should be available - for the use of hooks like this one.]]] -@end deftypefun - - -@deftypefun {struct breakpoint_cback *} gdb_get_breakpoint_cback (int @var{bp_num}) -@end deftypefun - - -@deftypefun void gdb_breakpoints_info (struct gdb_stream_cback, int @var{bp_num}, int @var{watches}) -Print information on breakpoint number @var{bnum}, or -1 if all. -If @var{watches} is zero, process only breakpoints; if @var{watches} -is nonzero, process only watchpoints. -[[[In the long run, expose the information read off by this function.]]]@* -(info breakpoints, info watchpoints, breakpoints_info, breakpoint_1) -@end deftypefun - - -@deftypefun void gdb_catch_info (struct gdb_stream_cback *) -Print a list of all the exception handlers that are active in the -current stack frame at the current point of execution.@* -(catch_info) -@end deftypefun - - -@deftypefun void gdb_handle_command (char * @var{args}) -Takes arguments like the gdb command `handle' and has -the same effect.@* -(handle_command) -@end deftypefun - - -@deftypefun void gdb_signals_info (struct gdb_stream_cback *) -Show how signals are handled.@* -(signals_info) -@end deftypefun - - -@node Stack, Expressions, Stopping, top -@comment node-name, next, previous, up -@chapter Accessing An Inferior's Execution Stack -@cindex stack -@cindex FRAME -@cindex {stack frames} - - - -@deftp Type FRAME -This type representing active stack frames in the inferior. -Consider this type opaque. -@end deftp - - -@deftypefun FRAME gdb_get_innermost_frame () -Returns the innermost frame or the frame most recently designated -as current by a call to gdb_set_current_frame.@* -(get_current_frame) -@end deftypefun - - -@deftypefun FRAME gdb_get_caller_frame (FRAME @var{frame}) -Return the frame that called @var{frame}.@* -If @var{frame} is the original frame (it has no caller), return 0.@* -(get_prev_frame) -@end deftypefun - - -@deftypefun FRAME gdb_get_called_frame (FRAME @var{frame}) -Return the frame that @var{frame} calls (0 if @var{frame} is the innermost -frame).@* -(get_next_frame) -@end deftypefun - - -@deftypefun FRAME gdb_parse_frame_specification (char * @var{frame_exp}) -Read a frame specification in whatever the appropriate format is. -Call @code{error}() If the specification is in any way invalid (i.e. -this function never returns NULL).@* -(parse_frame_specification) -@end deftypefun - - -@deftypefun CORE_ADDR get_frame_pc (FRAME @var{frame})@* -(Example use: Implementing @code{disassemble_command})@* -(get_frame_pc) -@end deftypefun - - -@deftypefun FRAME gdb_selected_frame () -The "selected" stack frame is used by default for local and -arg access. May be @code{NULL}, for no selected frame.@* -(variable selected_frame) -@end deftypefun - - -@deftypefun int gdb_selected_frame_level () -Level of the selected frame:@* -0 for innermost,@* -1 for its caller,@* -or -1 for frame specified by address with no defined level.@* -(variable selected_frame_level) -@end deftypefun - - -@deftypefun void gdb_select_frame (FRAME @var{frame}, int @var{level}) -Select frame @var{frame}, and note that its stack level is @var{level}. -@var{level} may be -1 if an actual level number is not known. -Calls @code{set_language} to establish the correct language for the -selected frame. -@end deftypefun - - - -- IDIOM: Computing Frame Levels@* -@example -/* Try to figure out what level this frame is as before a - call to gdb_select_frame. But if there is - no current stack, don't error out, just pass -1 - instead. */ -frame1 = 0; -level = -1; -if (get_current_frame()) @{ - for (frame1 = get_prev_frame (0); - frame1 && frame1 != frame; - frame1 = get_prev_frame (frame1)) - level++; -@} -@end example - - -@deftypefun void gdb_print_stack_frame (@var{cback}, @var{frame}, @var{level}, @var{source}) -@example -struct gdb_stream_cback * @var{cback}; -FRAME @var{frame}; -int @var{level}; -int @var{source}; -@end example -Print a stack frame briefly. @var{frame} should be the frame id -and @var{level} should be its level in the stack (or -1 for level not defined). -This prints the level, the function executing, the arguments, -and the file name and line number.@* -If the pc is not at the beginning of the source line, -the actual pc is printed at the beginning.@* -If @var{source} is 1, print the source line as well.@* -If @var{source} is -1, print ONLY the source line.@* -(print_stack_frame) -@end deftypefun - - -@deftypefun void gdb_print_backtrace (cback, @var{count}, @var{from_tty}) -@example -struct gdb_stream_cback * @var{cback}; -int @var{count}; -int @var{from_tty}; -@end example -Print briefly all stack frames or just the innermost @var{count} frames.@* -(backtrace_command) -@end deftypefun - - -@deftypefun FRAME gdb_find_relative_frame (FRAME @var{frame}, int * @var{level_offset_ptr}) -Find a frame a certain number of levels away from @var{frame}. -@var{level_offset_ptr} points to an int containing the number of levels. -Positive means go to earlier frames (up); negative, the reverse. -The int that contains the number of levels is counted toward -zero as the frames for those levels are found. -If the top or bottom frame is reached, that frame is returned, -but the final value of @var{*level_offset_ptr} is nonzero and indicates -how much farther the original request asked to go. -@end deftypefun - - -@deftypefun FRAME gdb_select_frame_downward (int @var{count}) -@deftypefunx FRAME gdb_select_frame_upward (int @var{count}) -Simply a combination of find_relative_frame and select_frame. -Returns the newly selected frame.@* -(down_silently_command, up_silently_command) -@end deftypefun - - -@deftypefun void gdb_frame_info (struct gdb_stream_cback * @var{cback}, FRAME @var{frame}) -Print verbosely the selected the argument @var{frame}. -This means absolutely all information in the frame is printed.@* -(frame_info) -@end deftypefun - - -@node Expressions, Values, Stack, top -@comment node-name, next, previous, up -@chapter How to Parse and Evaluate Expressions -@cindex parsing -@cindex expressions -@cindex {expression evaluation} -@cindex evaluation - - -@deftp Type {struct expression *} -This represents a parsed expression as might be used for a -breakpoint condition. -@end deftp - - -@deftp Type {struct block} -Describes a lexical environment. -@end deftp - -See also `Values' -See also `Examining' - - -@deftypefun struct expression * parse_exp_1 (char ** @var{stringptr}, struct block * @var{block} int @var{comma}) -Read an expression from the string @code{*@var{stringptr}} points to, -parse it, and return a pointer to a struct expression that we malloc. -Use @var{block} as the lexical context for variable names; -if @var{block} is zero, use the block of the selected stack frame. -Meanwhile, advance @code{*@var{stringptr}} to point after the expression, -at the first nonwhite character that is not part of the expression -(possibly a null character). - -If @var{comma} is nonzero, stop if a comma is reached. -(See `Stack' for information about the selected frame) -@end deftypefun - - -@deftypefun gdb_error_t gdb_evaluate_expression (value * @var{value_out}, struct expression * @var{exp}) -Evaluate an expression. See `values' for more information about -the return type.@* -(evaluate_expression) -@end deftypefun - - -@deftypefun value gdb_evaluate_type (struct expression @var{*exp}) -Evaluate an expression, avoiding all memory references -and getting a value whose type alone is correct.@* -(evaluate_type) -@end deftypefun - - - -@node Values, Examining, Expressions, top -@comment node-name, next, previous, up -@chapter Data from the Inferior, the Values of Expressions -@cindex values -@cindex {expression values} - -Values are allocated by functions such as @code{gdb_evaluate_expression}. -All currently allocated values are on the list @code{all_values} and can be -freed by calling @code{gdb_free_all_values}. - -To preserve a value across calls to @code{gdb_free_all_values}, use -@code{gdb_release_value}. Values added to the history list are automaticly -released. To free a released value use @code{gdb_free_value}. - - -@deftypefun void gdb_free_value (value) -Free the memory associated with a released value. -Do not call this function except on values that have been -passed to @code{gdb_release_value}.@* -(gdb_value_free) -@end deftypefun - - -@deftypefun void gdb_free_all_values (void) -Free all allocated values which haven't been released. -This should be called periodically from outside the dynamic -scope of libgdb functions.@* -(free_all_values) -@end deftypefun - - -@deftypefun void gdb_release_value (value @var{val}) -Remove a value from the list @code{all_values} in order to -protect it from @code{gdb_free_all_values}.@* -(release_value) -@end deftypefun - - -There is a `history list' -- a numbered list of values for -future reference. These can be referred to in expressions, -for example. - -@deftypefun int gdb_record_latest_value (value @var{val}) -Add a value to the history list.@* -(record_latest_value) -@end deftypefun - - -@deftypefun value gdb_access_value_history (int @var{index}) -Retrieve a value from the history list.@* -(access_value_history) -@end deftypefun - - -[[[At the moment, the only libgdb use for values is - string formatting (see `Examining'). So, they are treated - as opaque. It'd be useful to expose more of them in the long run.]]] - - -@node Examining, Types, Values, top -@comment node-name, next, previous, up -@chapter Formatting Values as Strings -@cindex examining -@cindex printing -@cindex formatting -@cindex {pretty printing} - - -Many functions in this section use @code{struct gdb_stream_cback}. -That structure is explained in `Basics'. - - -@deftypefun void gdb_print_formatted (struct gdb_stream_cback * @var{cback}, value @var{val}, int @var{format}, int @var{size}) -Print value @var{val} on a stream according to @var{format}, a letter or 0. -Do not end with a newline. -0 means print @var{val} according to its own type. -@var{size} is the letter for the size of datum being printed. -This is used to pad hex numbers so they line up.@* -(print_formatted) -@end deftypefun - - -@deftypefun static void gdb_printf_command (struct gdb_stream_cback * @var{cback}, char * @var{format}, value * @var{values}, int @var{n_values})@* -(printf_command) -@end deftypefun - - -@deftypefun int gdb_value_print (struct gdb_stream_cback * @var{cback}, @var{value}, int @var{format}, enum @var{val_prettyprint}) -Print the value @var{val} in C-ish syntax on @var{stream}. -@var{format} is a format-letter, or 0 for print in natural format of data type. -If the object printed is a string pointer, returns -the number of string bytes printed. -[[[implementation: watch the change in argument order]]]@* -(value_print) -@end deftypefun - - - -- IDIOM: This prints the values of all convenience variables: -@example -for (var = internalvars; var; var = var->next) -@{ -printf_filtered ("$%s = ", var->name); -value_print (var->value, stdout, 0, Val_pretty_default); -printf_filtered ("\n"); -@} -@end example - - -@deftypefun int gdb_print_insn (struct gdb_stream_cback * @var{cback}, CORE_ADDR @var{memaddr}) -Print the instruction at @var{memaddr} and return the -length of the instruction in bytes.@* -(print_insn) -@end deftypefun - - -@deftypefun void gdb_print_address (struct gdb_stream_cback * @var{cback}, CORE_ADDR @var{addr}) -Print address @var{addr} symbolically on @var{stream}. -First print it as a number. Then perhaps print -@code{<SYMBOL + OFFSET>} after the number.@* -(print_address) -@end deftypefun - - - -- IDIOM: This is the core of a dissasemble command: -@example -for (pc = low; pc < high; ) -@{ - print_address (pc, stdout); - printf_filtered (":\t"); - pc += print_insn (pc, stdout); - printf_filtered ("\n"); -@} -@end example -Advice for computing pc extents like @code{low} and @code{high} -can be found in `Symtabs' -- for example, @code{gdb_find_line_pc_range}.@* -(disassemble_command) - - -@deftypefun void gdb_print_registers (struct gdb_stream_cback * @var{cback}, int @var{regnum}, int @var{fpregs}, int @var{fancy}) -Print the values of registers. -@var{regnum} can be -1 (print all the registers) or a specific register number. -If @var{regnum} is -1, @var{fpregs} determines whether floating point registers are -shown.@* -(info registers, info all-registers, nofp_registers_info, all_registers_info) -@end deftypefun - - -@deftypefun char * gdb_register_name (int @var{i}) -Look up a register name by number. -@end deftypefun - - -@deftypefun int gdb_parse_register_name (char ** @var{name}) -Parse a register name and advance a text pointer. -Return -1 for bogus names. -@end deftypefun - - -@deftypefun CORE_ADDR gdb_read_pc () -Return the contents of the inferior's program counter. -@end deftypefun - - -@deftypefun int gdb_is_stepping () -If true, the inferior is stopped after being stepped. -@end deftypefun - - -@deftypefun void gdb_current_breakpoints (gdb_int_cback) -Call a callback for each of the current breakpoints.@* -(program_info) -@end deftypefun - - -@deftypefun int gdb_stop_signal () -Return the signal that stopped the inferior. -@end deftypefun - - -@deftypefun char * strsigno (int) -Return a symbolic name for a signal. -@end deftypefun - - -@deftypefun void gdb_target_info (struct gdb_stream_cback *) -Print status information about target we're accessing.@* -(target_files_info, e.g. child_files_info) -@end deftypefun - - -float_info -[[[what is appropriate?]]] - - -@deftypefun void gdb_address_info (struct gdb_stream_cback * @var{cback}, char * @var{symbol}); -Like the `info address' command -- show where @var{symbol} -is located.@* -(address_info) -@end deftypefun - - -@node Types, top, Examining, top -@comment node-name, next, previous, up -@chapter Examining the Types of an Inferior's Data -@cindex types - - -@deftp Type {struct type} -@code{struct type *} is used to represent a type. For example, that is -the type returned by the macro @code{VALUE_TYPE(val)} which yields the -type of inferior data recorded in @code{val}. (see `evaluate_type' in -`Expressions'). -@end deftp - - -@deftypefun void type_print (@var{type}, @var{varstring}, @var{stream_cback}, @var{show}) -@example -struct type @var{*type}; -char @var{*varstring}; -struct gdb_stream_cback * @var{stream_cback}; -FILE @var{*stream}; -int @var{show}; -@end example -Print a description of a type @var{type} in the form of a declaration of a -variable named @var{varstring}. (@var{varstring} is demangled if necessary.) -Output goes to @var{stream_cback}. - -If @var{show} is positive, we show the contents of the outermost level -of structure even if there is a type name that could be used instead. -If @var{show} is negative, we never show the details of elements' types. -(See `Basics' for an explanation of `struct gdb_stream_cback'). -@end deftypefun - - -[[[In the long run, we need something to programmaticly read off type - structures in a machine/language independent way.]]] - -@bye diff --git a/gnu/usr.bin/gdb/doc/lpsrc.sed b/gnu/usr.bin/gdb/doc/lpsrc.sed deleted file mode 100644 index 1c7af4a..0000000 --- a/gnu/usr.bin/gdb/doc/lpsrc.sed +++ /dev/null @@ -1,13 +0,0 @@ -/font defs: ---/,/end font defs ---/c\ -%-------------------- PostScript (long names) font defs: -----------------\ -\\font\\bbf=Times-Bold at 10pt\ -\\font\\vbbf=Times-Bold at 12pt\ -\\font\\smrm=Times-Roman at 6pt\ -\\font\\brm=Times-Roman at 10pt\ -\\font\\rm=Times-Roman at 8pt\ -\\font\\it=Times-Italic at 8pt\ -\\font\\tt=Courier at 8pt\ -% Used only for \copyright, replacing plain TeX macro.\ -\\font\\sym=Symbol at 7pt\ -\\def\\copyright{{\\sym\\char'323}}\ -%-------------------- end font defs --------------------------------- diff --git a/gnu/usr.bin/gdb/doc/psrc.sed b/gnu/usr.bin/gdb/doc/psrc.sed deleted file mode 100644 index 9bb557e..0000000 --- a/gnu/usr.bin/gdb/doc/psrc.sed +++ /dev/null @@ -1,13 +0,0 @@ -/font defs: ---/,/end font defs ---/c\ -%-------------------- PostScript (K Berry names) font defs: --------------\ -\\font\\bbf=ptmb at 10pt\ -\\font\\vbbf=ptmb at 12pt\ -\\font\\smrm=ptmr at 6pt\ -\\font\\brm=ptmr at 10pt\ -\\font\\rm=ptmr at 8pt\ -\\font\\it=ptmri at 8pt\ -\\font\\tt=pcrr at 8pt\ -% Used only for \copyright, replacing plain TeX macro.\ -\\font\\sym=psyr at 7pt\ -\\def\\copyright{{\\sym\\char'323}}\ -%-------------------- end font defs --------------------------------- diff --git a/gnu/usr.bin/gdb/doc/refcard.ps b/gnu/usr.bin/gdb/doc/refcard.ps deleted file mode 100644 index 0046b79..0000000 --- a/gnu/usr.bin/gdb/doc/refcard.ps +++ /dev/null @@ -1,798 +0,0 @@ -%!PS-Adobe-2.0 -%%Creator: dvips 5.47 Copyright 1986-91 Radical Eye Software -%%Title: refcard.dvi -%%Pages: 2 1 -%%BoundingBox: 0 0 612 792 -%%EndComments -%%BeginProcSet: tex.pro -/TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch -load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{ -isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale -Resolution VResolution vsize neg mul TR matrix currentmatrix dup dup 4 get -round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@letter{/vsize 10 -N}B /@landscape{/isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@a3{ -/vsize 15.5531 N}B /@ledger{/vsize 16 N}B /@legal{/vsize 13 N}B /@manualfeed{ -statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N -/FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn begin -/FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array -/BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 -array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail} -B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{pop nn dup definefont -setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup -length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ -ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B -/ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 -N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S -dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 -ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice -ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ch-image} -imagemask restore}B /D{/cc X dup type /stringtype ne{]}if nn /base get cc ctr -put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf -div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B /bop{userdict /bop-hook -known{bop-hook}if /SI save N @rigin 0 0 moveto}N /eop{clear SI restore -showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook -known{start-hook}if /VResolution X /Resolution X 1000 div /DVImag X /IE 256 -array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}N /p /show load N -/RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X -/rulex X V}B /V statusdict begin /product where{pop product dup length 7 ge{0 -7 getinterval(Display)eq}{pop false}ifelse}{false}ifelse end{{gsave TR -.1 -.1 -TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 --.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /a{ -moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{ -S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B -/j{3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w -}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p -a}B /bos{/SS save N}B /eos{clear SS restore}B end -%%EndProcSet -TeXDict begin 1000 300 300 @start /Fa 3 104 df<0003FE0000000FFF8000003C01E000 -00F000780001C0001C00030000060006000003000C0000018018000000C018000000C030000000 -603000000060600000003060000000306000000030C000000018C000000018C000000018C00000 -0018C000000018C000000018C000000018C000000018C000000018600000003060000000306000 -0000303000000060300000006018000000C018000000C00C000001800600000300030000060001 -C0001C0000F0007800003C01E000000FFF80000003FE000025277E9D2A>13 -D<003C00E001C00180038003800380038003800380038003800380038003800380038003000700 -1C00F0001C00070003000380038003800380038003800380038003800380038003800380018001 -C000E0003C0E297D9E15>102 D<F0001C00070003000380038003800380038003800380038003 -800380038003800380018001C000E0003C00E001C0018003800380038003800380038003800380 -03800380038003800380030007001C00F0000E297D9E15>I E /Fb 1 59 -df<60F0F06004047C830C>58 D E /Fc 61 125 df<01F8000604000C0E00180E001800001800 -00180000FFFE001806001806001806001806001806001806001806001806001806001806001806 -007E1F801114809313>12 D<01FE00060E000C0E00180600180600180600180600FFFE00180600 -1806001806001806001806001806001806001806001806001806001806007E1F801114809313> -I<4100E380618020802080208041004100820009097F9311>34 D<020002000F8032406220C210 -C270C270E220F2007F003FC00FE002E002704230E230C2308220426022C01F00020002000C187E -9511>36 D<40E06020202040408003097D9309>39 D<01020408103020606040C0C0C0C0C0C0C0 -C0C0C040606020301008040201081E7E950D>I<80402010080C04060602030303030303030303 -03020606040C0810204080081E7E950D>I<006000006000006000006000006000006000006000 -006000006000006000FFFFF0FFFFF0006000006000006000006000006000006000006000006000 -00600000600014167E9119>43 D<40E06020202040408003097D8209>I<FFFF080280860B>I<40 -E04003037D8209>I<0010003000600060006000C000C000C00180018003000300030006000600 -06000C000C000C0018001800300030003000600060006000C000C0000C1D7E9511>I<0F0030C0 -606060604020C030C030C030C030C030C030C030C030C03040206060606030C00F000C137E9211 ->I<0C001C00EC000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C00FF -C00A137D9211>I<1F0060C06060F070F030603000700070006000C001C0018002000400081010 -1020207FE0FFE00C137E9211>I<40E0400000000000000040E040030D7D8C09>58 -D<40E0400000000000000040E06020202040408003137D8C09>I<003000003000007800007800 -007800009C00009C00011E00010E00010E0002070002070004038007FF800403800801C00801C0 -1000E03800E0FE07FC16147F9319>65 D<FFFC001C07001C03801C01C01C01C01C01C01C01C01C -03801C07001FFE001C03801C01C01C00E01C00E01C00E01C00E01C00E01C01C01C0380FFFE0013 -147F9317>I<00FC200703600C00E0180060300060700020600020E00000E00000E00000E00000 -E00000E000006000207000203000201800400C008007030000FC0013147E9318>I<FFFC001C07 -001C01C01C00E01C00601C00701C00301C00381C00381C00381C00381C00381C00381C00301C00 -701C00601C00E01C01C01C0380FFFC0015147F9319>I<FFFF801C03801C00801C00801C00401C -00401C08401C08001C18001FF8001C18001C08001C08201C00201C00201C00601C00401C00C01C -01C0FFFFC013147F9316>I<00FC200703600C00E0180060300060700020600020E00000E00000 -E00000E00000E00FF8E000E06000E07000E03000E01800E00C00E007036000FC2015147E931A> -71 D<FFC0001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0000 -1C00401C00401C00401C00C01C00801C01801C0380FFFF8012147F9315>76 -D<FE000FE01E000F00170017001700170017001700138027001380270011C0470011C0470010E0 -870010E0870010E087001071070010710700103A0700103A0700101C0700101C0700381C0700FE -083FE01B147F931E>I<FC01FC1E007017002017802013802011C02010E0201070201070201038 -20101C20100E20100F201007201003A01001E01000E01000E0380060FE002016147F9319>I<01 -F800070E001C03803801C03000C07000E0600060E00070E00070E00070E00070E00070E0007070 -00E07000E03000C03801C01C0380070E0001F80014147E9319>I<FFFC001C07001C03801C01C0 -1C01C01C01C01C01C01C01C01C03801C07001FFC001C00001C00001C00001C00001C00001C0000 -1C00001C0000FF800012147F9316>I<FFF8001C07001C03801C01C01C01C01C01C01C01C01C03 -801C07001FF8001C0E001C07001C03801C03801C03801C03801C03841C03841C01CCFF80F81614 -7F9318>82 D<7FFFF0607030407010407010807008807008807008007000007000007000007000 -00700000700000700000700000700000700000700000700007FF0015147F9318>84 -D<FF81FC1C00701C00201C00201C00201C00201C00201C00201C00201C00201C00201C00201C00 -201C00201C00200C00200E004006008003830000FC0016147F9319>I<FF1FF0FC380380303803 -80301C03C0201C03C0201E03C0600E04E0400E04E0400704E08007087080070870800388710003 -9039000390390001F03E0001E01E0001E01E0000C00C0000C00C0000C00C001E147F9321>87 -D<FF00FC3C00301E00200E004007004007808003C10001C10001E20000F6000074000038000038 -0000380000380000380000380000380000380001FF0016147F9319>89 D<208041004100820082 -008200C300E380410009097A9311>92 D<7F00E1C0E0404060006007E038606060C060C064C064 -61E43E380E0D7E8C11>97 D<F00030003000300030003000300033E034103808300C3006300630 -0630063006300C3808343023E00F147F9312>I<0FE0187020706020C000C000C000C000C00060 -00201018200FC00C0D7F8C0F>I<00780018001800180018001800180F98187820386018C018C0 -18C018C018C0186018203810580F9E0F147F9312>I<0F80104020206030C010FFF0C000C000C0 -006000201018200FC00C0D7F8C0F>I<03C00CE018E01840180018001800FF0018001800180018 -0018001800180018001800180018007F000B1480930A>I<0F3C30E62040606060606060204030 -C02F00600060003FE03FF06018C00CC00CC00C601830300FC00F147F8C11>I<F0003000300030 -0030003000300033E034303818301830183018301830183018301830183018FC7E0F147F9312> -I<2070200000000000F03030303030303030303030FC06157F9409>I<02070200000000000F03 -0303030303030303030303030343E2E67C081B82940A>I<F00030003000300030003000300030 -F8306030403080330037003B80318030C0306030703030FC7C0E147F9311>I<F0303030303030 -303030303030303030303030FC06147F9309>I<F3E1F0343218381C0C30180C30180C30180C30 -180C30180C30180C30180C30180C30180CFC7E3F180D7F8C1B>I<F3E034303818301830183018 -301830183018301830183018FC7E0F0D7F8C12>I<0FC0186020106018C00CC00CC00CC00CC00C -6018601838700FC00E0D7F8C11>I<F3E034303808300C30063006300630063006300C38083430 -33E030003000300030003000FC000F137F8C12>I<0F88184820386018C018C018C018C018C018 -6018203818580F9800180018001800180018007E0F137F8C11>I<F3C034E038E0304030003000 -300030003000300030003000FE000B0D7F8C0D>I<3E806180C080C080E0007E003F8003C080C0 -80C0C0C0E1809F000A0D7F8C0D>I<10001000100030007000FF80300030003000300030003000 -300030803080308011000E0009127F910D>I<F078301830183018301830183018301830183018 -303818580F9E0F0D7F8C12>I<F87C301830101820182018200C400C4006800680078003000300 -0E0D7F8C11>I<F87CF8707030305820305820188840188C40188C400D04800D06800D06800603 -00060300060300150D7F8C18>I<F87C303018600C400C800700030007800CC008E010603030F8 -7C0E0D7F8C11>I<F87C301830101820182018200C400C400680068007800300030002000200E6 -00E400E80070000E137F8C11>I<FFF0C06080C081C08180030006000C101810383030206060FF -E00C0D7F8C0F>I<FFFFFFFF2001808821>124 D E /Fd 2 94 df<FEFEC0C0C0C0C0C0C0C0C0C0 -C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FEFE07297C9E0C>91 -D<FEFE060606060606060606060606060606060606060606060606060606060606060606060606 -06FEFE0729809E0C>93 D E /Fe 27 123 df<001F8F000020D9800060990000C0300000C03000 -00C0300000C0300007FFFE000180300001806000018060000180600001806000030060000300C0 -000300C0000300C0000300C0000600C00006018000060180000601800004010000CCC30000C8C6 -000070780000191A819315>11 D<000FF000301800601000600000C00000C00000C00007FFE000 -C0600180600180C00180C00180C00180C00181800301900301900301900301A00300E006000006 -0000060000C40000C80000700000151A819314>I<FEFC07027D860C>45 -D<000080000180000300000300000600000600000C000018000018000030000030000060000060 -0000C0000180000180000300000300000600000C00000C00001800001800003000003000006000 -00C00000C00000800000111D7E9512>47 D<07C03F8000C00C0001600800016008000120080001 -300800023010000218100002181000020C1000040C200004042000040620000402200008034000 -080340000801C0000801C00018008000FE00800019147E9319>78 D<07B00C7010703060606060 -606060C0C0C0C8C0C841C862D03C700D0D7C8C12>97 D<7C000C00180018001800180030003700 -388030C060C060C060C060C0C180C180C1004300660038000A147C9310>I<07800C4010603040 -600060006000C000C0004020404021801E000B0D7C8C10>I<007C000C00180018001800180030 -07B00C7010703060606060606060C0C0C0C8C0C841C862D03C700E147C9312>I<07800C401020 -304060407F8060004000C0004020604021801E000B0D7C8C10>I<001C00660064006000C000C0 -00C007F800C001800180018001800180030003000300030003000200060006000600C400C80070 -000F1A81930B>I<01D8023804380C3018301830183030603060306010E019C00EC000C000C001 -80C180C3007C000D137E8C10>I<3E0006000C000C000C000C00180019E01E3018303830303030 -3030306060606460C460C4C0C8C0700E147D9312>I<02060000000000384C4C8C981818303262 -62643807147D930B>I<7C0C181818183030303060606060C0D0D0D0D06006147C9309>108 -D<30F878590D8C4E0E0C9C0E0C980C0C180C0C180C0C3018183018193018313018316030326030 -1C180D7D8C1C>I<30F05B184C189C189818181818183030303230623062606460380F0D7D8C13> -I<03800C6018203030603060306030C060C06040C0608023001E000C0D7C8C12>I<0C78168C13 -0426062606060606060C0C0C0C0C080C101A2019C018001800300030003000FC000F137F8C12> -I<31F05A184C109C009800180018003000300030003000600060000D0D7D8C0F>114 -D<0700188018C0308038001E001F0003800180C180810082007C000A0D7D8C0E>I<04000C000C -000C001800FF8018001800300030003000300060006100610062006400380009127D910C>I<38 -184C184C188C3098301830183030603064306430E411E80E380E0D7D8C12>I<38104C384C108C -10981018101810302030203040304018800F000D0D7D8C10>I<071E09E311C221802180018001 -800300030403044308C51078E0100D7F8C10>120 D<38184C184C188C30983018301830306030 -60306030E011C00EC000C000802180630046003C000D137D8C11>I<06100F2010E00040008001 -0002000C00102020203840478083000C0D7E8C0E>I E /Ff 55 123 df<0100030003000F803F -E073704338C338C338C31073007F003FC00FE003F003384318E318E318E33073603FC00F800300 -030001000D1A7E9612>36 D<07001F8019C039C039C039C039BE3B3E3E701C701C701CE03EE06F -E0E7C0E3C4E38E63CE7EFC3C380F147F9312>38 D<070007000700E738FFF87FF01FC01FC07FF0 -FFF8E7380700070007000D0E7E9012>42 D<038003800380038003800380FFFEFFFEFFFE038003 -8003800380038003800F0F7F9112>I<60F0F878183030E0C00509798312>I<FFF8FFF8FFF80D03 -7E8B12>I<60F0F0600404798312>I<0018003800380070007000E000E001C001C001C003800380 -070007000E000E001C001C001C003800380070007000E000E000C0000D1A7E9612>I<07C00FE0 -1C703838701C701CE00EE00EE00EE00EE00EE00EE00EE01E701C701C38381C700FE007C00F147F -9312>I<0F803FC070E0E070E038E038403800380030007000E000C00180030006000C00183830 -387FF87FF80D147E9312>50 D<0FE03FF07838701C201C001C0038007807E007F00038001C000E -000E400EE00EE01C78383FF00FC00F147F9312>I<E000FFFEFFFEE018E038007000E000C001C0 -0380038007000700070007000E000E000E000E000E0004000F157F9412>55 -D<60F0F06000000000000060F0F060040E798D12>58 D<0038007801F003E00F801F003C00F800 -F000F8003C001F000F8003E001F0007800380D117E9212>60 D<FFFEFFFE7FFE0000000000007F -FEFFFEFFFE0F097F8E12>I<4000E000F0007C003E000F8007C001E000F8007800F801E007C00F -803E007C00F000E00040000D137E9312>I<03E007F01E18381C30FC71FE739EE30EE70EE70EE7 -0EE70EE30C739C71F830F038001E0E07FE03F80F147F9312>64 D<03E60FFE1C3E381E700E700E -600EE000E000E000E000E000E000600E700E700E381C1C380FF003E00F147F9312>67 -D<FFFEFFFE380E380E380E3800380038E038E03FE03FE038E038E03800380E380E380E380EFFFE -FFFE0F147F9312>69 D<FFFEFFFE380E380E380E3800380038E038E03FE03FE038E038E0380038 -00380038003800FF00FF000F147F9312>I<FFE0FFE00E000E000E000E000E000E000E000E000E -000E000E000E000E000E000E000E00FFE0FFE00B147D9312>73 D<FC7EFC7E7C7C745C76DC76DC -76DC76DC76DC76DC77DC739C739C701C701C701C701C701CF83EF83E0F147F9312>77 -D<FEFEFEFE3E383A383B383B383B383B383B383B3839B839B839B839B839B839B838B838F8FEF8 -FEF80F147F9312>I<3FE07FF07070E038E038E038E038E038E038E038E038E038E038E038E038 -E038E03870707FF03FE00D147E9312>I<FFE0FFF8383C381C380E380E380E380E381C383C3FF8 -3FE0380038003800380038003800FE00FE000F147F9312>I<FF80FFE038F03878383838383838 -387838F03FE03FC038E0387038703870387038773877FE3EFE1C10147F9312>82 -D<1F303FF070F0E070E070E070E00070007F003FC00FE000F0003800386038E038E030F070FFE0 -CF800D147E9312>I<7FFEFFFEE38EE38EE38E0380038003800380038003800380038003800380 -0380038003801FF01FF00F147F9312>I<FE3F80FE3F80380E00380E00380E00380E00380E0038 -0E00380E00380E00380E00380E00380E00380E00380E00380E001C1C000E380007F00003E00011 -14809312>I<3F807FC070E0207000700FF03FF07870E070E070E07070F03FFE1F3E0F0E7E8D12> -97 D<F800F80038003800380038003BE03FF03C38381C380C380E380E380E380E380C381C3C38 -3FF01BC00F147F9312>I<07F01FF8383870106000E000E000E000E0006000703838381FF007E0 -0D0E7E8D12>I<00F800F8003800380038003807B81FF8387870386038E038E038E038E0386038 -707838781FFE0FBE0F147F9312>I<07801FE0387070706038E038FFF8FFF8E000600070383838 -1FF007C00D0E7E8D12>I<007E00FF01C70382038003807FFEFFFE038003800380038003800380 -03800380038003803FF83FF81014809312>I<0F9E1FFF38E7707070707070707038E03FC03F80 -70003FE03FF83FFC701EE00EE00EE00E600C783C1FF00FE010167F8D12>I<F800F80038003800 -3800380039E03FF03E383C3838383838383838383838383838383838FE3EFE3E0F147F9312>I< -06000F000F000600000000000000FF00FF000700070007000700070007000700070007000700FF -F0FFF00C157D9412>I<00C001E001E000C00000000000001FE01FE000E000E000E000E000E000 -E000E000E000E000E000E000E000E000E000E040C0E1C0FF807E000B1C7E9412>I<F800F80038 -003800380038003BFC3BFC38F039E03BC03F803F803FC03DE038E038703838FC7EFC7E0F147F93 -12>I<FF00FF000700070007000700070007000700070007000700070007000700070007000700 -FFF8FFF80D147E9312>I<F71C00FFBE0079E70079E70071C70071C70071C70071C70071C70071 -C70071C70071C700F9E780F8E380110E808D12>I<F9E0FFF03E383C3838383838383838383838 -383838383838FE3EFE3E0F0E7F8D12>I<0F803FE038E07070E038E038E038E038E038F0787070 -38E03FE00F800D0E7E8D12>I<FBE0FFF03C38381C380C380E380E380E380E380C381C3C383FF0 -3BC038003800380038003800FE00FE000F157F8D12>I<079C1FFC387C703C601CE01CE01CE01C -E01C601C703C387C1FFC079C001C001C001C001C001C007F007F10157F8D12>I<FCF8FDFC1F1C -1E081E001C001C001C001C001C001C001C00FFC0FFC00E0E7E8D12>I<1FF03FF06070C070E000 -7F003FE00FF000786018E018F030FFE0DFC00D0E7E8D12>I<06000E000E000E007FF8FFF80E00 -0E000E000E000E000E000E000E380E380E3807F003C00D127F9112>I<F8F8F8F8383838383838 -38383838383838383838383838781FFE0FBE0F0E7F8D12>I<FC7EFC7E38383C781C701C701C70 -0EE00EE00EE006C007C007C003800F0E7F8D12>I<FEFEFEFE701C701C301838383BB83FF83FF8 -3AB838B81CF01CF01CF00F0E7F8D12>I<7C7C7C7C1CF00EE00FC007C00380078007C00EE01EF0 -1C70FC7EFC7E0F0E7F8D12>I<FC7EFC7E3C381C381C701C700E700E600E6006E006E003C003C0 -03C0038003800380778077007E003C000F157F8D12>I<3FFC7FFC7038707000E001C003800700 -0E001C1C381C701CFFFCFFFC0E0E7F8D12>I E /Fg 35 122 df<00038000000380000007C000 -0007C0000007C000000FE000000FE000001FF000001BF000001BF0000031F8000031F8000061FC -000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003FFFF8003001F8003001F800600 -0FC006000FC00E000FE00C0007E0FFC07FFEFFC07FFE1F1C7E9B24>65 D<FFFFF800FFFFFF000F -C01F800FC00FC00FC007C00FC007E00FC007E00FC007E00FC007E00FC007E00FC007C00FC00F80 -0FC03F000FFFFE000FC00F800FC007C00FC007E00FC003E00FC003F00FC003F00FC003F00FC003 -F00FC003F00FC007E00FC007E00FC01FC0FFFFFF00FFFFFC001C1C7E9B22>I<001FE02000FFF8 -E003F80FE007C003E00F8001E01F0000E03E0000E03E0000607E0000607C000060FC000000FC00 -0000FC000000FC000000FC000000FC000000FC000000FC0000007C0000607E0000603E0000603E -0000C01F0000C00F80018007C0030003F80E0000FFFC00001FE0001B1C7D9B22>I<FFFFF800FF -FFFF000FC01FC00FC007E00FC001F00FC001F80FC000F80FC000FC0FC0007C0FC0007C0FC0007E -0FC0007E0FC0007E0FC0007E0FC0007E0FC0007E0FC0007E0FC0007E0FC0007C0FC0007C0FC000 -7C0FC000F80FC000F80FC001F00FC007E00FC01FC0FFFFFF00FFFFF8001F1C7E9B25>I<FFFFFF -00FFFFFF000FC01F000FC007000FC003000FC003800FC003800FC181800FC181800FC181800FC1 -80000FC380000FFF80000FFF80000FC380000FC180000FC180000FC180600FC180600FC000E00F -C000C00FC000C00FC001C00FC001C00FC003C00FC00F80FFFFFF80FFFFFF801B1C7E9B1F>I<FF -FFFF00FFFFFF000FC01F000FC007000FC003000FC003800FC003800FC001800FC181800FC18180 -0FC180000FC180000FC380000FFF80000FFF80000FC380000FC180000FC180000FC180000FC180 -000FC000000FC000000FC000000FC000000FC000000FC00000FFFF0000FFFF0000191C7E9B1E> -I<000FF008007FFE3801FC07F807E001F80F8000781F0000783F0000383E0000387E0000187C00 -0018FC000000FC000000FC000000FC000000FC000000FC000000FC007FFFFC007FFF7C0001F87E -0001F83E0001F83F0001F81F0001F80F8001F807E001F801FC07F8007FFE78000FF818201C7D9B -26>I<FFFC3FFFFFFC3FFF0FC003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC003F0 -0FC003F00FC003F00FC003F00FFFFFF00FFFFFF00FC003F00FC003F00FC003F00FC003F00FC003 -F00FC003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC003F0FFFC3FFFFFFC3FFF201C -7E9B25>I<FFFF00FFFF000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000FC0000F -C0000FC0000FC0000FC0000FC0000FC0000FC0030FC0030FC0030FC0070FC0070FC0060FC00E0F -C01E0FC07EFFFFFEFFFFFE181C7E9B1D>76 D<FFE003FFFFE003FF0FF000300FF800300DFC0030 -0CFE00300C7E00300C3F00300C1F80300C1FC0300C0FE0300C07F0300C03F0300C01F8300C01FC -300C00FE300C007F300C003F300C001FB00C001FF00C000FF00C0007F00C0003F00C0001F00C00 -00F00C0000F0FFC00070FFC00030201C7E9B25>78 D<FFFFF800FFFFFE000FC03F800FC00F800F -C007C00FC007E00FC007E00FC007E00FC007E00FC007E00FC007C00FC007C00FC00F800FC03F00 -0FFFFC000FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC000 -000FC000000FC00000FFFC0000FFFC00001B1C7E9B21>80 D<07F8201FFEE03C07E07801E07000 -E0F000E0F00060F00060F80000FE0000FFE0007FFE003FFF003FFF800FFFC007FFE0007FE00003 -F00001F00000F0C000F0C000F0C000E0E000E0F001C0FC03C0EFFF0083FC00141C7D9B1B>83 -D<7FFFFFE07FFFFFE0781F81E0701F80E0601F8060E01F8070C01F8030C01F8030C01F8030C01F -8030001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F800000 -1F8000001F8000001F8000001F8000001F8000001F8000001F800007FFFE0007FFFE001C1C7E9B -21>I<FFFC03FFFFFC03FF0FC000300FC000300FC000300FC000300FC000300FC000300FC00030 -0FC000300FC000300FC000300FC000300FC000300FC000300FC000300FC000300FC000300FC000 -300FC000300FC0003007C0003007C0006003E000E001F001C000FC0780007FFE00000FF800201C -7E9B25>I<FFFC7FFE0FFCFFFC7FFE0FFC0FC007E000C00FC007F000C00FE003F001C007E003F0 -018007E007F8018003F007F8030003F007F8030003F80CFC070001F80CFC060001F81CFE060001 -FC187E0E0000FC187E0C0000FC387F0C00007E303F1800007E303F1800007F601FB800003F601F -B000003FE01FF000003FC00FF000001FC00FE000001FC00FE000000F8007C000000F8007C00000 -0F0003C0000007000380000007000380002E1C7F9B31>87 D<0FF8001C1E003E0F803E07803E07 -C01C07C00007C0007FC007E7C01F07C03C07C07C07C0F807C0F807C0F807C0780BC03E13F80FE1 -F815127F9117>97 D<FF0000FF00001F00001F00001F00001F00001F00001F00001F00001F0000 -1F00001F3F801FE1E01F80701F00781F003C1F003C1F003E1F003E1F003E1F003E1F003E1F003E -1F003C1F003C1F00781F80701EC1E01C3F00171D7F9C1B>I<03FC000E0E001C1F003C1F00781F -00780E00F80000F80000F80000F80000F80000F800007800007801803C01801C03000E0E0003F8 -0011127E9115>I<000FF0000FF00001F00001F00001F00001F00001F00001F00001F00001F000 -01F001F9F00F07F01C03F03C01F07801F07801F0F801F0F801F0F801F0F801F0F801F0F801F078 -01F07801F03C01F01C03F00F0FFE03F9FE171D7E9C1B>I<01FC000F07001C03803C01C07801C0 -7801E0F801E0F801E0FFFFE0F80000F80000F800007800007C00603C00601E00C00F038001FC00 -13127F9116>I<03F8F00E0F381E0F381C07303C07803C07803C07803C07801C07001E0F000E0E -001BF8001000001800001800001FFF001FFFC00FFFE01FFFF07801F8F00078F00078F000787000 -707800F01E03C007FF00151B7F9118>103 D<FF0000FF00001F00001F00001F00001F00001F00 -001F00001F00001F00001F00001F0FC01F31E01F40F01F80F81F80F81F00F81F00F81F00F81F00 -F81F00F81F00F81F00F81F00F81F00F81F00F81F00F8FFE7FFFFE7FF181D7F9C1B>I<1E003F00 -3F003F003F001E00000000000000000000000000FF00FF001F001F001F001F001F001F001F001F -001F001F001F001F001F001F00FFE0FFE00B1E7F9D0E>I<FF0000FF00001F00001F00001F0000 -1F00001F00001F00001F00001F00001F00001F0FF81F0FF81F03801F07001F0C001F18001F7000 -1FF8001FFC001FBC001F3E001F1F001F0F001F0F801F07C01F03E0FFC7FCFFC7FC161D7F9C19> -107 D<FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 -1F001F001F001F001F001F001F001F001F00FFE0FFE00B1D7F9C0E>I<FF0FC07E00FF31E18F00 -1F40F207801F80FC07C01F80FC07C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807 -C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C01F00F807C0FFE7FF3FF8FFE7FF -3FF825127F9128>I<FF0FC0FF31E01F40F01F80F81F80F81F00F81F00F81F00F81F00F81F00F8 -1F00F81F00F81F00F81F00F81F00F81F00F8FFE7FFFFE7FF18127F911B>I<01FC000F07801C01 -C03C01E07800F07800F0F800F8F800F8F800F8F800F8F800F8F800F87800F07800F03C01E01E03 -C00F078001FC0015127F9118>I<FF3F80FFE1E01F80F01F00781F007C1F003C1F003E1F003E1F -003E1F003E1F003E1F003E1F003C1F007C1F00781F80F01FC1E01F3F001F00001F00001F00001F -00001F00001F0000FFE000FFE000171A7F911B>I<FE3E00FE47001E8F801E8F801E8F801F0700 -1F00001F00001F00001F00001F00001F00001F00001F00001F00001F0000FFF000FFF00011127F -9114>114 D<1FD830786018E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CE018F8 -30CFC00E127E9113>I<0300030003000300070007000F000F003FFCFFFC1F001F001F001F001F -001F001F001F001F001F0C1F0C1F0C1F0C0F08079803F00E1A7F9913>I<FF07F8FF07F81F00F8 -1F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F00F81F01F80F01F8 -0786FF01F8FF18127F911B>I<FFC7FCFFC7FC1F81800F838007C70003EE0001FC0001F80000F8 -00007C0000FE0001DF00039F00070F800607C00C03E0FF07FCFF07FC16127F9119>120 -D<FFC1FCFFC1FC1F00601F80E00F80C00FC0C007C18007C18003E30003E30001F70001F60000FE -0000FC0000FC00007800007800003000003000007000706000F86000F8C000F980007300003E00 -00161A7F9119>I E /Fh 47 122 df<020408103020604040C0C0C0C0C0C0C0C0404060203010 -080402071A7F920C>40 D<8040201018080C0404060606060606060604040C081810204080071A -7E920C>I<40E060202040408003087E8209>44 D<40E04003037E8209>46 -D<0C003C00CC000C000C000C000C000C000C000C000C000C000C000C000C00FF8009107E8F0F> -49 D<1F00618040C08060C0600060006000C00180030006000C00102020207FC0FFC00B107F8F -0F>I<1F00218060C060C000C0008001800F00008000400060C060C060804060801F000B107F8F -0F>I<0300030007000F000B001300330023004300C300FFE003000300030003001FE00B107F8F -0F>I<1F00318060C0C040C060C060C06040E021E01E600060004060C0608043003E000B107F8F -0F>57 D<40E040000000000040E060202040408003107E8A09>59 D<03E0000C180010040023C2 -004631004C0D00980C80980C80980C80980C80980C804C0C80463C8023C7001000000C038003FC -0011117E9017>64 D<FFF8180C18061803180318031806181C1FFC180618031803180318031806 -180EFFF810117F9015>66 D<03F10C0B1807300360014001C000C000C000C000C0004001600130 -0218020C0C03F010117E9016>I<FFF800180C001803001801001801801800801800C01800C018 -00C01800C01800C01800C0180180180100180300180E00FFF80012117F9017>I<FFFE18061802 -180318011821182018601FE01860182018201800180018001800FF0010117F9014>70 -D<03F1000C0B00180700300300600100400100C00000C00000C00000C03FC0C003004003006003 -003003001803000C070003F90012117E9017>I<FF181818181818181818181818181818FF0811 -7F900B>73 D<FF0018001800180018001800180018001800180018021802180218061804181CFF -FC0F117F9013>76 D<F81FC01C07001C020016020013020013020011820010C20010C200106200 -103200101200101A00100E00100600380600FE020012117F9016>78 D<FFF0181C180418061806 -18061804181C1FF01800180018001800180018001800FF000F117F9014>80 -D<FFE000181800180C00180600180600180600180C001818001FE000181800180C00180C00180C -00180C00180C20180420FF03C013117F9016>82 D<1F2060E0006080208020800060003E001F80 -00C00060002080208020C040E0C09F000B117E9011>I<7FFF8060C18040C080C0C0C080C04080 -C04000C00000C00000C00000C00000C00000C00000C00000C00000C00000C0000FFC0012117F90 -16>I<FF1FC0180700180200180200180200180200180200180200180200180200180200180200 -1802000802000C040006080001F00012117F9016>I<FC07C03003003003001802001802000C04 -000C040006080006080006080003100003100001A00001A00001E00000C00000C00012117F9016 ->I<3E006300018001800F8031804180C190C19063903DE00C0B7F8A0F>97 -D<F0003000300030003000300037C038603030301830183018301830183030386027800D117F90 -11>I<1F8030C06000C000C000C000C000C000604030801F000A0B7F8A0E>I<01E0006000600060 -006000600F6030E06060C060C060C060C060C060606030E01F780D117F9011>I<1F00318060C0 -C0C0FFC0C000C000C000604030801F000A0B7F8A0E>I<07000D801800180018001800FE001800 -180018001800180018001800180018007E00091180900A>I<1EF0331061806180618033003E00 -400060003F803FC060E0C060C060C06060C01F000C117F8A0F>I<F00030003000300030003000 -33C03C6030603060306030603060306030603060FCF80D117F9011>I<30703000000000F03030 -30303030303030FC0612809108>I<F0003000300030003000300031F030C03080330036003F00 -3300318031C030C0F9F00C117F9010>107 D<F0303030303030303030303030303030FC061180 -9008>I<F3C3C03C2C20383830303030303030303030303030303030303030303030FCFCFC160B -7F8A1A>I<F3C03C6030603060306030603060306030603060FCF80D0B7F8A11>I<1F00318060C0 -C060C060C060C060C06060C031801F000B0B7F8A0F>I<F7C03860303030183018301830183018 -3030386037803000300030003000FC000D107F8A11>I<F7003980300030003000300030003000 -30003000FC00090B7F8A0C>114 D<3E028280783E038181C2BC080B7F8A0C>I<10103030FE3030 -303030323232321C070F7F8E0C>I<F1E03060306030603060306030603060306030E00F780D0B -7F8A11>I<F8F0706030403040188018800D000D000D00060006000C0B7F8A10>I<F9F3C060E180 -30E10030E1003131001932001A12000E1C000E1C000C0C00040800120B7F8A16>I<F8F0306030 -403040188018800D000D000F000600060004000400CC00C80070000C107F8A10>121 -D E /Fi 12 86 df<FFFFFF8000FFFFFFE00007F001F80007F000FC0007F0007E0007F0007E00 -07F0007F0007F0007F0007F0007F0007F0007F0007F0007F0007F0007E0007F000FE0007F000FC -0007F003F80007FFFFF00007FFFFF00007F001FC0007F0007E0007F0003F0007F0003F8007F000 -1F8007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0001FC007F0003F8007F0 -003F8007F0007F0007F001FE00FFFFFFF800FFFFFFC00022227EA128>66 -D<0003FE0080001FFF818000FF01E38001F8003F8003E0001F8007C0000F800F800007801F8000 -07803F000003803F000003807F000001807E000001807E00000180FE00000000FE00000000FE00 -000000FE00000000FE00000000FE00000000FE00000000FE000000007E000000007E000001807F -000001803F000001803F000003801F800003000F8000030007C000060003F0000C0001F8003800 -00FF00F000001FFFC0000003FE000021227DA128>I<FFFFFF8000FFFFFFF00007F003FC0007F0 -007E0007F0003F0007F0001F8007F0000FC007F00007E007F00007E007F00007F007F00003F007 -F00003F007F00003F007F00003F807F00003F807F00003F807F00003F807F00003F807F00003F8 -07F00003F807F00003F807F00003F807F00003F007F00003F007F00003F007F00007E007F00007 -E007F0000FC007F0001F8007F0003F0007F0007E0007F003FC00FFFFFFF000FFFFFF800025227E -A12B>I<FFFFFFFCFFFFFFFC07F000FC07F0003C07F0001C07F0000C07F0000E07F0000E07F000 -0607F0180607F0180607F0180607F0180007F0380007F0780007FFF80007FFF80007F0780007F0 -380007F0180007F0180007F0180307F0180307F0000307F0000607F0000607F0000607F0000E07 -F0000E07F0001E07F0003E07F001FCFFFFFFFCFFFFFFFC20227EA125>I<FFFFFFF8FFFFFFF807 -F001F807F0007807F0003807F0001807F0001C07F0001C07F0000C07F0000C07F0180C07F0180C -07F0180007F0180007F0380007F0780007FFF80007FFF80007F0780007F0380007F0180007F018 -0007F0180007F0180007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F0 -0000FFFFE000FFFFE0001E227EA123>I<0003FE0040001FFFC0C0007F00F1C001F8003FC003F0 -000FC007C00007C00FC00003C01F800003C03F000001C03F000001C07F000000C07E000000C07E -000000C0FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000 -FE000FFFFC7E000FFFFC7F00001FC07F00001FC03F00001FC03F00001FC01F80001FC00FC0001F -C007E0001FC003F0001FC001FC003FC0007F80E7C0001FFFC3C00003FF00C026227DA12C>I<FF -FFE0FFFFE003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003 -F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003F80003 -F80003F80003F80003F80003F80003F800FFFFE0FFFFE013227FA115>73 -D<FFFF803FFCFFFF803FFC07F000038007F000070007F0000E0007F000180007F000300007F000 -E00007F001C00007F003800007F007000007F00E000007F018000007F038000007F0FC000007F1 -FE000007F3FE000007F77F000007FE7F800007F83F800007F01FC00007F01FE00007F00FE00007 -F007F00007F007F80007F003F80007F001FC0007F001FE0007F000FF0007F0007F0007F0007F80 -07F0003FC0FFFF83FFFCFFFF83FFFC26227EA12C>75 D<FFF8001FFEFFFC001FFE07FC0000C007 -FE0000C006FF0000C0067F8000C0063FC000C0061FE000C0060FE000C0060FF000C00607F800C0 -0603FC00C00601FE00C00600FE00C00600FF00C006007F80C006003FC0C006001FE0C006000FF0 -C0060007F0C0060007F8C0060003FCC0060001FEC0060000FFC00600007FC00600007FC0060000 -3FC00600001FC00600000FC006000007C006000003C006000003C0FFF00001C0FFF00000C02722 -7EA12C>78 D<0007FC0000003FFF800000FC07E00003F001F80007E000FC000FC0007E001F8000 -3F001F80003F003F00001F803F00001F807F00001FC07E00000FC07E00000FC0FE00000FE0FE00 -000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE07E -00000FC07F00001FC07F00001FC03F00001F803F81F03F801F83F83F000FC70C7E0007E606FC00 -03F607F80000FF07E000003FFF80000007FF80200000038020000001C020000001E0E0000001FF -E0000001FFC0000000FFC0000000FFC00000007F800000007F000000001E00232C7DA12A>81 -D<FFFFFE0000FFFFFFC00007F007F00007F001F80007F000FC0007F0007E0007F0007F0007F000 -7F0007F0007F0007F0007F0007F0007F0007F0007F0007F0007E0007F000FC0007F001F80007F0 -07F00007FFFFC00007FFFF800007F00FE00007F007F00007F003F80007F001FC0007F001FC0007 -F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0607F000FE06 -07F000FF0CFFFF803FF8FFFF800FF027227EA12A>I<FFFF803FFCFFFF803FFC07F000018007F0 -00018007F000018007F000018007F000018007F000018007F000018007F000018007F000018007 -F000018007F000018007F000018007F000018007F000018007F000018007F000018007F0000180 -07F000018007F000018007F000018007F000018007F000018007F000018007F000018003F00003 -0003F800030001F800060000FC000E00007E001C00003F80F800000FFFE0000001FF000026227E -A12B>85 D E end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 300 -TeXDict begin @landscape -%%EndSetup -%%Page: 1 1 -bop -225 -183 a Fi(GDB)14 b(QUICK)g(REFERENCE)22 b Fh(GDB)14 -b(V)n(ersion)h(4)-225 -91 y Fg(Essen)o(tial)c(Commands)-225 --45 y Ff(gdb)i Fe(pr)n(o)n(gr)n(am)f Fd([)p Fe(c)n(or)n(e)p -Fd(])24 b Fc(debug)14 b Fe(pr)n(o)n(gr)n(am)e Fd([)p Fc(using)i(coredump)g -Fe(c)n(or)n(e)p Fd(])-225 9 y Ff(b)f Fd([)p Fe(\014le)p Ff(:)p -Fd(])p Fe(function)68 b Fc(set)13 b(breakp)q(oin)o(t)i(at)e -Fe(function)g Fd([)p Fc(in)h Fe(\014le)p Fd(])-225 63 y Ff(run)f -Fd([)p Fe(ar)n(glist)p Fd(])126 b Fc(start)13 b(y)o(our)h(program)f -Fd([)p Fc(with)h Fe(ar)n(glist)p Fd(])-225 106 y Ff(bt)274 -b Fc(bac)o(ktrace:)20 b(displa)o(y)c(program)d(stac)o(k)-225 -143 y Ff(p)g Fe(expr)214 b Fc(displa)o(y)15 b(the)f(v)n(alue)h(of)e(an)h -(expression)-225 180 y Ff(c)292 b Fc(con)o(tin)o(ue)14 b(running)h(y)o(our)f -(program)-225 218 y Ff(n)292 b Fc(next)14 b(line,)h(stepping)g(o)o(v)o(er)f -(function)g(calls)-225 255 y Ff(s)292 b Fc(next)14 b(line,)h(stepping)g(in)o -(to)f(function)h(calls)-225 352 y Fg(Starting)c(GDB)-225 398 -y Ff(gdb)256 b Fc(start)13 b(GDB,)h(with)g(no)g(debugging)g(\014les)-225 -435 y Ff(gdb)f Fe(pr)n(o)n(gr)n(am)121 b Fc(b)q(egin)14 b(debugging)g -Fe(pr)n(o)n(gr)n(am)-225 472 y Ff(gdb)f Fe(pr)n(o)n(gr)n(am)f(c)n(or)n(e)48 -b Fc(debug)14 b(coredump)g Fe(c)n(or)n(e)f Fc(pro)q(duced)h(b)o(y)105 -510 y Fe(pr)n(o)n(gr)n(am)-225 548 y Ff(gdb)f(--help)135 b -Fc(describ)q(e)14 b(command)g(line)g(options)-225 647 y Fg(Stopping)c(GDB) --225 692 y Ff(quit)238 b Fc(exit)14 b(GDB;)g(also)g Ff(q)f -Fc(or)g Ff(EOF)g Fc(\(eg)g Ff(C-d)p Fc(\))-225 734 y Ff(INTERRUPT)148 -b Fc(\(eg)13 b Ff(C-c)p Fc(\))g(terminate)g(curren)o(t)h(command,)h(or)105 -771 y(send)g(to)e(running)i(pro)q(cess)-225 868 y Fg(Getting)c(Help)-225 -914 y Ff(help)238 b Fc(list)14 b(classes)g(of)g(commands)-225 -951 y Ff(help)e Fe(class)155 b Fc(one-line)14 b(descriptions)h(for)f -(commands)g(in)105 988 y Fe(class)-225 1021 y Ff(help)e Fe(c)n(ommand)83 -b Fc(describ)q(e)14 b Fe(c)n(ommand)-225 1119 y Fg(Executing)e(y)o(our)h -(Program)-225 1165 y Ff(run)g Fe(ar)n(glist)150 b Fc(start)13 -b(y)o(our)h(program)f(with)i Fe(ar)n(glist)-225 1203 y Ff(run)256 -b Fc(start)13 b(y)o(our)h(program)f(with)i(curren)o(t)f(argumen)o(t)105 -1240 y(list)-225 1273 y Ff(run)f Fb(:)7 b(:)g(:)12 b Ff(<)p -Fe(inf)h Ff(>)p Fe(outf)32 b Fc(start)13 b(y)o(our)h(program)f(with)i(input,) -g(output)105 1310 y(redirected)-225 1360 y Ff(kill)238 b Fc(kill)15 -b(running)g(program)-225 1434 y Ff(tty)e Fe(dev)193 b Fc(use)14 -b Fe(dev)f Fc(as)g(stdin)i(and)f(stdout)g(for)g(next)g Ff(run)-225 -1472 y(set)f(args)f Fe(ar)n(glist)66 b Fc(sp)q(ecify)15 b Fe(ar)n(glist)d -Fc(for)i(next)g Ff(run)-225 1509 y(set)f(args)171 b Fc(sp)q(ecify)15 -b(empt)o(y)f(argumen)o(t)g(list)-225 1546 y Ff(show)e(args)154 -b Fc(displa)o(y)15 b(argumen)o(t)f(list)-225 1621 y Ff(show)e(environment)28 -b Fc(sho)o(w)13 b(all)i(en)o(vironmen)o(t)g(v)n(ariables)-225 -1659 y Ff(show)d(env)h Fe(var)110 b Fc(sho)o(w)13 b(v)n(alue)i(of)f(en)o -(vironmen)o(t)h(v)n(ariable)f Fe(var)-225 1696 y Ff(set)f(env)g -Fe(var)f(string)28 b Fc(set)13 b(en)o(vironmen)o(t)j(v)n(ariable)e -Fe(var)-225 1733 y Ff(unset)e(env)h Fe(var)92 b Fc(remo)o(v)o(e)13 -b Fe(var)g Fc(from)h(en)o(vironmen)o(t)-225 1820 y Fg(Shell)d(Commands)-225 -1866 y Ff(cd)i Fe(dir)217 b Fc(c)o(hange)13 b(w)o(orking)h(directory)g(to)f -Fe(dir)-225 1903 y Ff(pwd)256 b Fc(Prin)o(t)15 b(w)o(orking)e(directory)-225 -1941 y Ff(make)f Fb(:)7 b(:)g(:)176 b Fc(call)14 b(\\)p Ff(make)p -Fc(")-225 1978 y Ff(shell)e Fe(cmd)146 b Fc(execute)13 b(arbitrary)h(shell)h -(command)f(string)-225 2100 y Fd([)f(])h Fh(surround)f(optional)j(argumen)o -(ts)45 b Fb(:)7 b(:)g(:)13 b Fh(sho)o(w)h(one)f(or)h(more)f(argumen)o(ts)-216 -2174 y(c)-230 2175 y Fa(\015)p Fh(1991,)h(1992)h(F)n(ree)d(Soft)o(w)o(are)h -(F)n(oundation,)h(Inc.)60 b(P)o(ermissions)15 b(on)f(bac)o(k)p -800 -217 1 9 v 800 2175 V 875 -183 a Fg(Breakp)q(oin)o(ts)d(and)j(W)l(atc)o -(hp)q(oin)o(ts)875 -132 y Ff(break)e Fd([)p Fe(\014le)p Ff(:)p -Fd(])p Fe(line)875 -86 y Ff(b)i Fd([)p Fe(\014le)p Ff(:)p Fd(])p -Fe(line)1185 -132 y Fc(set)g(breakp)q(oin)o(t)g(at)f Fe(line)h -Fc(n)o(um)o(b)q(er)h Fd([)p Fc(in)f Fe(\014le)p Fd(])1185 -94 -y Fc(eg:)33 b Ff(break)12 b(main.c:37)875 -32 y(break)g Fd([)p -Fe(\014le)p Ff(:)p Fd(])p Fe(func)57 b Fc(set)14 b(breakp)q(oin)o(t)g(at)f -Fe(func)h Fd([)p Fc(in)g Fe(\014le)p Fd(])875 11 y Ff(break)e(+)p -Fe(o\013set)875 48 y Ff(break)g(-)p Fe(o\013set)1185 11 y Fc(set)i(break)f -(at)h Fe(o\013set)f Fc(lines)i(from)f(curren)o(t)g(stop)875 -87 y Ff(break)e(*)p Fe(addr)121 b Fc(set)14 b(breakp)q(oin)o(t)g(at)f -(address)h Fe(addr)875 124 y Ff(break)220 b Fc(set)14 b(breakp)q(oin)o(t)g -(at)f(next)i(instruction)875 161 y Ff(break)d Fb(:)7 b(:)g(:)12 -b Ff(if)i Fe(expr)31 b Fc(break)14 b(conditionally)h(on)f(nonzero)f -Fe(expr)875 211 y Ff(cond)g Fe(n)h Fd([)p Fe(expr)p Fd(])103 -b Fc(new)13 b(conditional)i(expression)g(on)e(breakp)q(oin)o(t)1206 -248 y Fe(n)p Fc(;)h(mak)o(e)g(unconditional)h(if)g(no)e Fe(expr)875 -286 y Ff(tbreak)f Fb(:)7 b(:)g(:)140 b Fc(temp)q(orary)13 b(break;)i(disable) -f(when)g(reac)o(hed)875 324 y Ff(rbreak)e Fe(r)n(e)n(gex)115 -b Fc(break)14 b(on)f(all)i(functions)g(matc)o(hing)f Fe(r)n(e)n(gex)875 -361 y Ff(watch)e Fe(expr)143 b Fc(set)14 b(a)f(w)o(atc)o(hp)q(oin)o(t)h(for)f -(expression)i Fe(expr)875 398 y Ff(catch)d Fe(x)192 b Fc(break)14 -b(at)f(C++)i(handler)f(for)g(exception)g Fe(x)875 473 y Ff(info)f(break)135 -b Fc(sho)o(w)13 b(de\014ned)i(breakp)q(oin)o(ts)875 511 y Ff(info)e(watch)135 -b Fc(sho)o(w)13 b(de\014ned)i(w)o(atc)o(hp)q(oin)o(ts)875 585 -y Ff(clear)220 b Fc(delete)14 b(breakp)q(oin)o(ts)g(at)g(next)g(instruction) -875 635 y Ff(clear)e Fd([)p Fe(\014le)p Ff(:)p Fd(])p Fe(fun)73 -b Fc(delete)14 b(breakp)q(oin)o(ts)g(at)g(en)o(try)g(to)f Fe(fun)p -Fc(\(\))875 688 y Ff(clear)f Fd([)p Fe(\014le)p Ff(:)p Fd(])p -Fe(line)66 b Fc(delete)14 b(breakp)q(oin)o(ts)g(on)g(source)f(line)875 -742 y Ff(delete)f Fd([)p Fe(n)p Fd(])147 b Fc(delete)14 b(breakp)q(oin)o(ts)g -Fd([)p Fc(or)f(breakp)q(oin)o(t)i Fe(n)p Fd(])875 823 y Ff(disable)c -Fd([)p Fe(n)p Fd(])130 b Fc(disable)15 b(breakp)q(oin)o(ts)f -Fd([)p Fc(or)f(breakp)q(oin)o(t)i Fe(n)p Fd(])875 877 y Ff(enable)d -Fd([)p Fe(n)p Fd(])147 b Fc(enable)14 b(breakp)q(oin)o(ts)g -Fd([)p Fc(or)f(breakp)q(oin)o(t)i Fe(n)p Fd(])875 931 y Ff(enable)d(once)g -Fd([)p Fe(n)p Fd(])63 b Fc(enable)14 b(breakp)q(oin)o(ts)g -Fd([)p Fc(or)f(breakp)q(oin)o(t)i Fe(n)p Fd(])p Fc(;)1206 969 -y(disable)f(again)g(when)f(reac)o(hed)875 1018 y Ff(enable)f(del)h -Fd([)p Fe(n)p Fd(])80 b Fc(enable)14 b(breakp)q(oin)o(ts)g -Fd([)p Fc(or)f(breakp)q(oin)o(t)i Fe(n)p Fd(])p Fc(;)1206 1055 -y(delete)e(when)h(reac)o(hed)875 1105 y Ff(ignore)e Fe(n)i(c)n(ount)76 -b Fc(ignore)13 b(breakp)q(oin)o(t)i Fe(n)p Fc(,)f Fe(c)n(ount)g -Fc(times)875 1180 y Ff(commands)d Fe(n)946 1217 y Fd([)p Ff(silent)p -Fd(])946 1255 y Fe(c)n(ommand-list)1185 1180 y Fc(execute)i(GDB)h -Fe(c)n(ommand-list)e Fc(ev)o(ery)j(time)1206 1217 y(breakp)q(oin)o(t)f -Fe(n)g Fc(is)g(reac)o(hed.)21 b Fd([)p Ff(silent)1206 1263 -y Fc(suppresses)14 b(default)h(displa)o(y)p Fd(])875 1306 y -Ff(end)256 b Fc(end)14 b(of)g Fe(c)n(ommand-list)875 1393 y -Fg(Program)f(Stac)o(k)875 1445 y Ff(backtrace)e Fd([)p Fe(n)p -Fd(])875 1490 y Ff(bt)i Fd([)p Fe(n)p Fd(])1185 1445 y Fc(prin)o(t)i(trace)e -(of)g(all)h(frames)g(in)h(stac)o(k;)f(or)f(of)h Fe(n)1206 1482 -y Fc(frames|innermost)g(if)h Fe(n)p Ff(>0)p Fc(,)e(outermost)h(if)1206 -1519 y Fe(n)p Ff(<0)875 1563 y(frame)e Fd([)p Fe(n)p Fd(])165 -b Fc(select)13 b(frame)h(n)o(um)o(b)q(er)h Fe(n)f Fc(or)f(frame)h(at)g -(address)1206 1600 y Fe(n)p Fc(;)g(if)h(no)e Fe(n)p Fc(,)i(displa)o(y)g -(curren)o(t)f(frame)875 1639 y Ff(up)f Fe(n)242 b Fc(select)13 -b(frame)h Fe(n)g Fc(frames)g(up)875 1676 y Ff(down)f Fe(n)206 -b Fc(select)13 b(frame)h Fe(n)g Fc(frames)g(do)o(wn)875 1720 -y Ff(info)f(frame)f Fd([)p Fe(addr)p Fd(])30 b Fc(describ)q(e)14 -b(selected)g(frame,)g(or)f(frame)h(at)f Fe(addr)875 1763 y -Ff(info)g(args)153 b Fc(argumen)o(ts)14 b(of)f(selected)h(frame)875 -1800 y Ff(info)f(locals)117 b Fc(lo)q(cal)13 b(v)n(ariables)i(of)e(selected)h -(frame)875 1844 y Ff(info)f(reg)f Fd([)p Fe(rn)p Fd(])p Fb(:)7 -b(:)g(:)875 1889 y Ff(info)13 b(all-reg)e Fd([)p Fe(rn)p Fd(])1185 -1844 y Fc(register)i(v)n(alues)i Fd([)p Fc(for)e(regs)g Fe(rn)s -Fd(])g Fc(in)h(selected)1206 1881 y(frame;)g Ff(all-reg)d Fc(includes)k -(\015oating)e(p)q(oin)o(t)875 1933 y Ff(info)g(catch)135 b -Fc(exception)14 b(handlers)h(activ)o(e)e(in)i(selected)f(frame)p -1900 -217 V 1900 2175 V 1975 -183 a Fg(Execution)f(Con)o(trol)1975 --138 y Ff(continue)e Fd([)p Fe(c)n(ount)p Fd(])1975 -92 y Ff(c)j -Fd([)p Fe(c)n(ount)p Fd(])2285 -138 y Fc(con)o(tin)o(ue)g(running;)i(if)e -Fe(c)n(ount)g Fc(sp)q(eci\014ed,)g(ignore)2306 -100 y(this)g(breakp)q(oin)o -(t)h(next)f Fe(c)n(ount)g Fc(times)1975 -26 y Ff(step)f Fd([)p -Fe(c)n(ount)p Fd(])1975 20 y Ff(s)h Fd([)p Fe(c)n(ount)p Fd(])2285 --26 y Fc(execute)g(un)o(til)h(another)e(line)i(reac)o(hed;)f(rep)q(eat)2306 -12 y Fe(c)n(ount)f Fc(times)i(if)f(sp)q(eci\014ed)1975 74 y -Ff(stepi)e Fd([)p Fe(c)n(ount)p Fd(])1975 120 y Ff(si)h Fd([)p -Fe(c)n(ount)p Fd(])2285 74 y Fc(step)h(b)o(y)h(mac)o(hine)f(instructions)h -(rather)f(than)2306 111 y(source)f(lines)1975 186 y Ff(next)g -Fd([)p Fe(c)n(ount)p Fd(])1975 232 y Ff(n)h Fd([)p Fe(c)n(ount)p -Fd(])2285 186 y Fc(execute)g(next)g(line,)h(including)h(an)o(y)e(function) -2306 223 y(calls)1975 286 y Ff(nexti)e Fd([)p Fe(c)n(ount)p -Fd(])1975 331 y Ff(ni)h Fd([)p Fe(c)n(ount)p Fd(])2285 286 -y Fc(next)h(mac)o(hine)h(instruction)g(rather)e(than)2306 323 -y(source)g(line)1975 398 y Ff(until)f Fd([)p Fe(lo)n(c)n(ation)p -Fd(])67 b Fc(run)14 b(un)o(til)i(next)e(instruction)h(\(or)e -Fe(lo)n(c)n(ation)p Fc(\))1975 441 y Ff(finish)202 b Fc(run)14 -b(un)o(til)i(selected)e(stac)o(k)f(frame)h(returns)1975 484 -y Ff(return)e Fd([)p Fe(expr)p Fd(])101 b Fc(p)q(op)14 b(selected)g(stac)o(k) -f(frame)h(without)2306 522 y(executing)g Fd([)p Fc(setting)f(return)i(v)n -(alue)p Fd(])1975 566 y Ff(signal)d Fe(num)125 b Fc(resume)14 -b(execution)g(with)g(signal)h Fe(s)f Fc(\(none)f(if)i Ff(0)p -Fc(\))1975 604 y Ff(jump)e Fe(line)1975 641 y Ff(jump)g(*)p -Fe(addr)n(ess)2285 604 y Fc(resume)h(execution)g(at)g(sp)q(eci\014ed)g -Fe(line)f Fc(n)o(um)o(b)q(er)2306 641 y(or)g Fe(addr)n(ess)1975 -681 y Ff(set)g(var=)p Fe(expr)106 b Fc(ev)n(aluate)14 b Fe(expr)e -Fc(without)i(displa)o(ying)i(it;)f(use)2306 718 y(for)e(altering)h(program)f -(v)n(ariables)1975 815 y Fg(Displa)o(y)1975 867 y Ff(print)f -Fd([)p Ff(/)p Fe(f)6 b Fd(])13 b([)p Fe(expr)p Fd(])1975 913 -y Ff(p)h Fd([)p Ff(/)p Fe(f)5 b Fd(])13 b([)p Fe(expr)p Fd(])2285 -867 y Fc(sho)o(w)h(v)n(alue)g(of)g Fe(expr)e Fd([)p Fc(or)h(last)h(v)n(alue)h -Ff($)p Fd(])2306 904 y Fc(according)e(to)g(format)h Fe(f)p -Fc(:)2046 956 y Ff(x)221 b Fc(hexadecimal)2046 993 y Ff(d)g -Fc(signed)14 b(decimal)2046 1030 y Ff(u)221 b Fc(unsigned)15 -b(decimal)2046 1068 y Ff(o)221 b Fc(o)q(ctal)2046 1105 y Ff(t)g -Fc(binary)2046 1142 y Ff(a)g Fc(address,)14 b(absolute)g(and)g(relativ)o(e) -2046 1180 y Ff(c)221 b Fc(c)o(haracter)2046 1217 y Ff(f)g Fc(\015oating)13 -b(p)q(oin)o(t)1975 1266 y Ff(call)g Fd([)p Ff(/)p Fe(f)5 b -Fd(])13 b Fe(expr)89 b Fc(lik)o(e)15 b Ff(print)d Fc(but)i(do)q(es)g(not)g -(displa)o(y)h Ff(void)1975 1320 y(x)f Fd([)p Ff(/)p Fe(Nuf)5 -b Fd(])14 b Fe(expr)98 b Fc(examine)14 b(memory)g(at)g(address)g -Fe(expr)p Fc(;)f(optional)2306 1358 y(format)g(sp)q(ec)h(follo)o(ws)g(slash) -2011 1396 y Fe(N)249 b Fc(coun)o(t)14 b(of)f(ho)o(w)h(man)o(y)h(units)g(to)e -(displa)o(y)2011 1433 y Fe(u)256 b Fc(unit)15 b(size;)f(one)g(of)2356 -1471 y Ff(b)f Fc(individual)k(b)o(ytes)2356 1508 y Ff(h)c Fc(halfw)o(ords)h -(\(t)o(w)o(o)f(b)o(ytes\))2356 1545 y Ff(w)g Fc(w)o(ords)h(\(four)g(b)o -(ytes\))2356 1583 y Ff(g)f Fc(gian)o(t)h(w)o(ords)f(\(eigh)o(t)h(b)o(ytes\)) -2011 1620 y Fe(f)263 b Fc(prin)o(ting)15 b(format.)21 b(An)o(y)14 -b Ff(print)e Fc(format,)i(or)2356 1657 y Ff(s)f Fc(n)o(ull-terminated)j -(string)2356 1695 y Ff(i)d Fc(mac)o(hine)h(instructions)1975 -1738 y Ff(disassem)d Fd([)p Fe(addr)p Fd(])62 b Fc(displa)o(y)15 -b(memory)g(as)e(mac)o(hine)h(instructions)1975 1840 y Fg(Automatic)e(Displa)o -(y)1975 1891 y Ff(display)g Fd([)p Ff(/)p Fe(f)5 b Fd(])13 -b Fe(expr)36 b Fc(sho)o(w)14 b(v)n(alue)g(of)g Fe(expr)e Fc(eac)o(h)i(time)g -(program)2306 1929 y(stops)g Fd([)p Fc(according)e(to)i(format)f -Fe(f)6 b Fd(])1975 1972 y Ff(display)184 b Fc(displa)o(y)15 -b(all)g(enabled)f(expressions)h(on)f(list)1975 2014 y Ff(undisplay)d -Fe(n)118 b Fc(remo)o(v)o(e)14 b(n)o(um)o(b)q(er\(s\))h Fe(n)f -Fc(from)g(list)h(of)2306 2051 y(automatically)f(displa)o(y)o(ed)h -(expressions)1975 2091 y Ff(disable)d(disp)g Fe(n)69 b Fc(disable)15 -b(displa)o(y)g(for)f(expression\(s\))h(n)o(um)o(b)q(er)g Fe(n)1975 -2132 y Ff(enable)d(disp)g Fe(n)87 b Fc(enable)14 b(displa)o(y)h(for)f -(expression\(s\))h(n)o(um)o(b)q(er)g Fe(n)1975 2170 y Ff(info)e(display)99 -b Fc(n)o(um)o(b)q(ered)15 b(list)g(of)e(displa)o(y)j(expressions)p -eop -%%Page: 2 2 -bop -225 -183 a Fg(Expressions)-225 -138 y Fe(expr)245 b Fc(an)13 -b(expression)i(in)g(C,)f(C++,)g(or)g(Mo)q(dula-2)105 -100 y(\(including)i -(function)f(calls\),)f(or:)-225 -60 y Fe(addr)s Ff(@)p Fe(len)176 -b Fc(an)13 b(arra)o(y)h(of)f Fe(len)h Fc(elemen)o(ts)h(b)q(eginning)f(at)105 --23 y Fe(addr)-225 10 y(\014le)p Ff(::)p Fe(nm)182 b Fc(a)13 -b(v)n(ariable)h(or)g(function)h Fe(nm)e Fc(de\014ned)i(in)f -Fe(\014le)-225 59 y Fa(f)p Fe(typ)n(e)p Fa(g)p Fe(addr)138 -b Fc(read)13 b(memory)h(at)g Fe(addr)e Fc(as)h(sp)q(eci\014ed)h -Fe(typ)n(e)-225 105 y Ff($)292 b Fc(most)13 b(recen)o(t)h(displa)o(y)o(ed)i -(v)n(alue)-225 142 y Ff($)p Fe(n)273 b(n)p Fc(th)14 b(displa)o(y)o(ed)i(v)n -(alue)-225 179 y Ff($$)274 b Fc(displa)o(y)o(ed)15 b(v)n(alue)g(previous)g -(to)e($)-225 217 y Ff($$)p Fe(n)255 b(n)p Fc(th)14 b(displa)o(y)o(ed)i(v)n -(alue)e(bac)o(k)g(from)g($)-225 254 y Ff($)p -205 254 11 2 -v 292 w Fc(last)g(address)g(examined)g(with)h Ff(x)-225 291 -y($)p -205 291 V -193 291 V 292 w Fc(v)n(alue)f(at)g(address)g($)p -357 291 10 2 v -225 329 a Ff($)p Fe(var)243 b Fc(con)o(v)o(enience)14 -b(v)n(ariable;)h(assign)f(an)o(y)g(v)n(alue)-225 410 y Ff(show)e(values)g -Fd([)p Fe(n)p Fd(])63 b Fc(sho)o(w)13 b(last)h(10)f(v)n(alues)i -Fd([)p Fc(or)e(surrounding)i($)p Fe(n)p Fd(])-225 453 y Ff(show)d -(convenience)28 b Fc(displa)o(y)15 b(all)f(con)o(v)o(enience)h(v)n(ariables) --225 550 y Fg(Sym)o(b)q(ol)d(T)l(able)-225 595 y Ff(info)g(address)g -Fe(s)74 b Fc(sho)o(w)13 b(where)h(sym)o(b)q(ol)h Fe(s)f Fc(is)g(stored)-225 -645 y Ff(info)e(func)h Fd([)p Fe(r)n(e)n(gex)p Fd(])42 b Fc(sho)o(w)13 -b(names,)i(t)o(yp)q(es)f(of)g(de\014ned)g(functions)105 682 -y(\(all,)h(or)e(matc)o(hing)h Fe(r)n(e)n(gex)p Fc(\))-225 733 -y Ff(info)e(var)h Fd([)p Fe(r)n(e)n(gex)p Fd(])60 b Fc(sho)o(w)13 -b(names,)i(t)o(yp)q(es)f(of)g(global)f(v)n(ariables)i(\(all,)105 -770 y(or)f(matc)o(hing)g Fe(r)n(e)n(gex)p Fc(\))-225 821 y -Ff(whatis)e Fd([)p Fe(expr)p Fd(])-225 867 y Ff(ptype)g Fd([)p -Fe(expr)p Fd(])85 821 y Fc(sho)o(w)h(data)h(t)o(yp)q(e)g(of)g -Fe(expr)e Fd([)p Fc(or)h Ff($)p Fd(])g Fc(without)105 858 y(ev)n(aluating;)i -Ff(ptype)d Fc(giv)o(es)i(more)g(detail)-225 910 y Ff(ptype)e -Fe(typ)n(e)147 b Fc(describ)q(e)14 b(t)o(yp)q(e,)h(struct,)f(union,)h(or)f -(en)o(um)-225 1008 y Fg(GDB)f(Scripts)-225 1054 y Ff(source)f -Fe(script)104 b Fc(read,)14 b(execute)f(GDB)h(commands)g(from)g(\014le)105 -1091 y Fe(script)-225 1147 y Ff(define)e Fe(cmd)-154 1184 y(c)n(ommand-list) -85 1147 y Fc(create)g(new)i(GDB)g(command)g Fe(cmd)p Fc(;)f(execute)105 -1184 y(script)i(de\014ned)f(b)o(y)h Fe(c)n(ommand-list)-225 -1222 y Ff(end)256 b Fc(end)14 b(of)g Fe(c)n(ommand-list)-225 -1260 y Ff(document)d Fe(cmd)-154 1297 y(help-text)85 1260 y -Fc(create)h(online)j(do)q(cumen)o(tation)f(for)f(new)h(GDB)105 -1297 y(command)g Fe(cmd)-225 1335 y Ff(end)256 b Fc(end)14 -b(of)g Fe(help-text)-225 1432 y Fg(Signals)-225 1478 y Ff(handle)e -Fe(signal)h(act)44 b Fc(sp)q(ecify)15 b(GDB)e(actions)h(for)f -Fe(signal)p Fc(:)-190 1515 y Ff(print)185 b Fc(announce)13 -b(signal)-190 1553 y Ff(noprint)149 b Fc(b)q(e)13 b(silen)o(t)i(for)f(signal) --190 1590 y Ff(stop)203 b Fc(halt)14 b(execution)g(on)g(signal)-190 -1627 y Ff(nostop)167 b Fc(do)13 b(not)h(halt)g(execution)-190 -1665 y Ff(pass)203 b Fc(allo)o(w)13 b(y)o(our)h(program)f(to)h(handle)g -(signal)-190 1702 y Ff(nopass)167 b Fc(do)13 b(not)h(allo)o(w)g(y)o(our)g -(program)f(to)g(see)h(signal)-225 1739 y Ff(info)e(signals)100 -b Fc(sho)o(w)13 b(table)h(of)g(signals,)h(GDB)e(action)h(for)f(eac)o(h)-225 -1838 y Fg(Debugging)e(T)l(argets)-225 1884 y Ff(target)h Fe(typ)n(e)g(p)n(ar) -n(am)24 b Fc(connect)13 b(to)g(target)g(mac)o(hine,)i(pro)q(cess,)e(or)h -(\014le)-225 1921 y Ff(help)e(target)118 b Fc(displa)o(y)15 -b(a)o(v)n(ailable)g(targets)-225 1958 y Ff(attach)d Fe(p)n(ar)n(am)97 -b Fc(connect)13 b(to)g(another)h(pro)q(cess)-225 1996 y Ff(detach)202 -b Fc(release)13 b(target)f(from)i(GDB)g(con)o(trol)p 800 -217 -1 9 v 800 2175 V 875 -183 a Fg(Con)o(trollin)o(g)d(GDB)875 --138 y Ff(set)i Fe(p)n(ar)n(am)f(value)61 b Fc(set)14 b(one)f(of)h(GDB's)g -(in)o(ternal)h(parameters)875 -100 y Ff(show)e Fe(p)n(ar)n(am)132 -b Fc(displa)o(y)15 b(curren)o(t)f(setting)g(of)g(parameter)875 --51 y(P)o(arameters)f(understo)q(o)q(d)h(b)o(y)h Ff(set)e Fc(and)h -Ff(show)p Fc(:)910 -13 y Ff(complaints)d Fe(limit)i Fc(n)o(um)o(b)q(er)i(of)e -(messages)h(on)f(un)o(usual)j(sym)o(b)q(ols)910 28 y Ff(confirm)c -Fe(on/o\013)43 b Fc(enable)14 b(or)f(disable)i(cautionary)f(queries)910 -66 y Ff(editing)e Fe(on/o\013)43 b Fc(con)o(trol)13 b Ff(readline)e -Fc(command-line)k(editing)910 103 y Ff(height)d Fe(lpp)110 -b Fc(n)o(um)o(b)q(er)15 b(of)e(lines)i(b)q(efore)f(pause)g(in)g(displa)o(y) -910 145 y Ff(language)d Fe(lang)58 b Fc(Language)12 b(for)h(GDB)h -(expressions)h(\()p Ff(auto)p Fc(,)e Ff(c)g Fc(or)1206 182 -y Ff(modula-2)p Fc(\))910 222 y Ff(listsize)e Fe(n)101 b Fc(n)o(um)o(b)q(er) -15 b(of)e(lines)i(sho)o(wn)f(b)o(y)h Ff(list)910 259 y(prompt)d -Fe(str)114 b Fc(use)14 b Fe(str)f Fc(as)g(GDB)h(prompt)910 -297 y Ff(radix)e Fe(b)n(ase)111 b Fc(o)q(ctal,)13 b(decimal,)i(or)e(hex)i(n)o -(um)o(b)q(er)1206 334 y(represen)o(tation)910 374 y Ff(verbose)d -Fe(on/o\013)43 b Fc(con)o(trol)13 b(messages)g(when)h(loading)g(sym)o(b)q -(ols)910 411 y Ff(width)e Fe(cpl)130 b Fc(n)o(um)o(b)q(er)15 -b(of)e(c)o(haracters)g(b)q(efore)h(line)g(folded)910 449 y -Ff(write)e Fe(on/o\013)79 b Fc(Allo)o(w)13 b(or)h(forbid)g(patc)o(hing)h -(binary)m(,)g(core)e(\014les)1206 486 y(\(when)g(reop)q(ened)h(with)g -Ff(exec)f Fc(or)g Ff(core)p Fc(\))910 526 y Ff(history)f Fb(:)7 -b(:)g(:)910 563 y Ff(h)14 b Fb(:)7 b(:)g(:)1185 526 y Fc(groups)14 -b(with)g(the)g(follo)o(wing)g(options:)910 598 y Ff(h)g(exp)f -Fe(o\013/on)82 b Fc(disable/enable)14 b Ff(readline)d Fc(history)k(expansion) -910 635 y Ff(h)f(file)e Fe(\014lename)33 b Fc(\014le)14 b(for)f(recording)h -(GDB)f(command)h(history)910 672 y Ff(h)g(size)e Fe(size)104 -b Fc(n)o(um)o(b)q(er)15 b(of)e(commands)h(k)o(ept)h(in)f(history)h(list)910 -710 y Ff(h)f(save)e Fe(o\013/on)65 b Fc(con)o(trol)13 b(use)h(of)g(external)g -(\014le)g(for)f(command)1206 747 y(history)910 803 y Ff(print)f -Fb(:)7 b(:)g(:)910 840 y Ff(p)14 b Fb(:)7 b(:)g(:)1185 803 -y Fc(groups)14 b(with)g(the)g(follo)o(wing)g(options:)910 882 -y Ff(p)g(address)d Fe(on/o\013)h Fc(prin)o(t)j(memory)f(addresses)g(in)g -(stac)o(ks,)h(v)n(alues)910 923 y Ff(p)f(array)e Fe(o\013/on)47 -b Fc(compact)13 b(or)g(attractiv)o(e)g(format)h(for)g(arra)o(ys)910 -965 y Ff(p)g(demangl)d Fe(on/o\013)h Fc(source)h(\(demangled\))h(or)g(in)o -(ternal)g(form)g(for)1206 1002 y(C++)g(sym)o(b)q(ols)910 1042 -y Ff(p)g(asm-dem)d Fe(on/o\013)h Fc(demangle)i(C++)g(sym)o(b)q(ols)h(in)g -(mac)o(hine-)1206 1079 y(instruction)g(output)910 1118 y Ff(p)f(elements)d -Fe(limit)17 b Fc(n)o(um)o(b)q(er)e(of)e(arra)o(y)h(elemen)o(ts)g(to)g(displa) -o(y)910 1160 y Ff(p)g(object)e Fe(on/o\013)29 b Fc(prin)o(t)15 -b(C++)f(deriv)o(ed)h(t)o(yp)q(es)g(for)e(ob)r(jects)910 1201 -y Ff(p)h(pretty)e Fe(o\013/on)29 b Fc(struct)14 b(displa)o(y:)23 -b(compact)13 b(or)g(inden)o(ted)910 1243 y Ff(p)h(union)e Fe(on/o\013)47 -b Fc(displa)o(y)15 b(of)f(union)h(mem)o(b)q(ers)910 1284 y -Ff(p)f(vtbl)e Fe(o\013/on)65 b Fc(displa)o(y)15 b(of)f(C++)h(virtual)f -(function)h(tables)875 1359 y Ff(show)e(commands)81 b Fc(sho)o(w)13 -b(last)h(10)f(commands)875 1396 y Ff(show)g(commands)e Fe(n)51 -b Fc(sho)o(w)13 b(10)g(commands)h(around)g(n)o(um)o(b)q(er)h -Fe(n)875 1434 y Ff(show)e(commands)e(+)52 b Fc(sho)o(w)13 b(next)i(10)e -(commands)875 1521 y Fg(W)l(orking)g(Files)875 1573 y Ff(file)g -Fd([)p Fe(\014le)p Fd(])156 b Fc(use)14 b Fe(\014le)f Fc(for)h(b)q(oth)g(sym) -o(b)q(ols)h(and)f(executable;)1206 1610 y(with)g(no)g(arg,)f(discard)h(b)q -(oth)875 1659 y Ff(core)f Fd([)p Fe(\014le)p Fd(])156 b Fc(read)13 -b Fe(\014le)h Fc(as)f(coredump;)i(or)e(discard)875 1713 y Ff(exec)g -Fd([)p Fe(\014le)p Fd(])156 b Fc(use)14 b Fe(\014le)f Fc(as)h(executable)g -(only;)h(or)e(discard)875 1767 y Ff(symbol)f Fd([)p Fe(\014le)p -Fd(])121 b Fc(use)14 b(sym)o(b)q(ol)h(table)f(from)g Fe(\014le)p -Fc(;)f(or)h(discard)875 1810 y Ff(load)f Fe(\014le)180 b Fc(dynamically)15 -b(link)h Fe(\014le)f Fc(and)f(add)g(its)h(sym)o(b)q(ols)875 -1848 y Ff(add-sym)c Fe(\014le)j(addr)45 b Fc(read)13 b(additional)i(sym)o(b)q -(ols)g(from)f Fe(\014le)p Fc(,)1206 1885 y(dynamically)h(loaded)f(at)f -Fe(addr)875 1923 y Ff(info)g(files)135 b Fc(displa)o(y)15 b(w)o(orking)f -(\014les)g(and)g(targets)f(in)i(use)875 1961 y Ff(path)e Fe(dirs)167 -b Fc(add)14 b Fe(dirs)f Fc(to)g(fron)o(t)h(of)g(path)g(searc)o(hed)f(for)1206 -1998 y(executable)g(and)h(sym)o(b)q(ol)h(\014les)875 2037 y -Ff(show)e(path)153 b Fc(displa)o(y)15 b(executable)f(and)g(sym)o(b)q(ol)h -(\014le)f(path)875 2074 y Ff(info)f(share)135 b Fc(list)15 -b(names)e(of)h(shared)g(libraries)h(curren)o(tly)1206 2111 -y(loaded)p 1900 -217 V 1900 2175 V 1975 -183 a Fg(Source)e(Files)1975 --138 y Ff(dir)g Fe(names)148 b Fc(add)14 b(directory)g Fe(names)f -Fc(to)h(fron)o(t)g(of)f(source)2306 -100 y(path)1975 -62 y -Ff(dir)256 b Fc(clear)13 b(source)h(path)1975 -25 y Ff(show)f(dir)171 -b Fc(sho)o(w)14 b(curren)o(t)g(source)f(path)1975 50 y Ff(list)238 -b Fc(sho)o(w)14 b(next)g(ten)g(lines)h(of)e(source)1975 87 -y Ff(list)g(-)207 b Fc(sho)o(w)14 b(previous)g(ten)g(lines)1975 -125 y Ff(list)f Fe(lines)156 b Fc(displa)o(y)15 b(source)f(surrounding)h -Fe(lines)p Fc(,)f(sp)q(eci\014ed)2306 162 y(as:)2011 206 y -Fd([)p Fe(\014le)p Ff(:)p Fd(])p Fe(num)122 b Fc(line)15 b(n)o(um)o(b)q(er)g -Fd([)p Fc(in)f(named)g(\014le)p Fd(])2011 260 y([)p Fe(\014le)p -Ff(:)p Fd(])p Fe(function)63 b Fc(b)q(eginning)15 b(of)e(function)i -Fd([)p Fc(in)f(named)g(\014le)p Fd(])2011 303 y Ff(+)p Fe(o\013)217 -b(o\013)14 b Fc(lines)h(after)e(last)h(prin)o(ted)2011 340 -y Ff(-)p Fe(o\013)217 b(o\013)14 b Fc(lines)h(previous)f(to)g(last)g(prin)o -(ted)2011 377 y Ff(*)p Fe(addr)n(ess)145 b Fc(line)15 b(con)o(taining)f -Fe(addr)n(ess)1975 415 y Ff(list)f Fe(f)p Ff(,)p Fe(l)187 b -Fc(from)14 b(line)h Fe(f)e Fc(to)g(line)i Fe(l)1975 452 y Ff(info)e(line)f -Fe(num)76 b Fc(sho)o(w)14 b(starting,)g(ending)g(addresses)g(of)2306 -489 y(compiled)g(co)q(de)f(for)h(source)f(line)i Fe(num)1975 -528 y Ff(info)e(source)117 b Fc(sho)o(w)14 b(name)f(of)h(curren)o(t)g(source) -f(\014le)1975 565 y Ff(info)g(sources)99 b Fc(list)15 b(all)f(source)f -(\014les)h(in)h(use)1975 603 y Ff(forw)e Fe(r)n(e)n(gex)150 -b Fc(searc)o(h)13 b(follo)o(wing)h(source)g(lines)h(for)e Fe(r)n(e)n(gex)1975 -640 y Ff(rev)g Fe(r)n(e)n(gex)168 b Fc(searc)o(h)13 b(preceding)h(source)g -(lines)h(for)e Fe(r)n(e)n(gex)1975 737 y Fg(GDB)g(under)f(GNU)i(Emacs)1975 -782 y Ff(M-x)f(gdb)189 b Fc(run)14 b(GDB)g(under)h(Emacs)1975 -820 y Ff(C-h)e(m)225 b Fc(describ)q(e)14 b(GDB)g(mo)q(de)1975 -857 y Ff(M-s)256 b Fc(step)14 b(one)f(line)i(\()p Ff(step)p -Fc(\))1975 899 y Ff(M-n)256 b Fc(next)14 b(line)h(\()p Ff(next)p -Fc(\))1975 936 y Ff(M-i)256 b Fc(step)14 b(one)f(instruction)i(\()p -Ff(stepi)p Fc(\))1975 978 y Ff(C-c)e(C-f)189 b Fc(\014nish)15 -b(curren)o(t)f(stac)o(k)g(frame)f(\()p Ff(finish)p Fc(\))1975 -1015 y Ff(M-c)256 b Fc(con)o(tin)o(ue)14 b(\()p Ff(cont)p Fc(\))1975 -1052 y Ff(M-u)256 b Fc(up)14 b Fe(ar)n(g)f Fc(frames)h(\()p -Ff(up)p Fc(\))1975 1094 y Ff(M-d)256 b Fc(do)o(wn)14 b Fe(ar)n(g)f -Fc(frames)h(\()p Ff(down)p Fc(\))1975 1131 y Ff(C-x)f(&)225 -b Fc(cop)o(y)14 b(n)o(um)o(b)q(er)h(from)f(p)q(oin)o(t,)h(insert)f(at)f(end) -1975 1169 y Ff(C-x)g(SPC)189 b Fc(\(in)14 b(source)g(\014le\))g(set)f(break)h -(at)g(p)q(oin)o(t)1975 1267 y Fg(GDB)f(License)1975 1313 y -Ff(show)g(copying)99 b Fc(Displa)o(y)15 b(GNU)e(General)g(Public)i(License) -1975 1350 y Ff(show)e(warranty)81 b Fc(There)13 b(is)i(NO)e(W)l(ARRANTY)g -(for)h(GDB.)2306 1387 y(Displa)o(y)h(full)g(no-w)o(arran)o(t)o(y)f(statemen)o -(t.)2024 1622 y Fh(Cop)o(yrigh)o(t)2185 1621 y(c)2171 1622 -y Fa(\015)o Fh(1991,)h(1992,)f(1993)h(F)n(ree)d(Soft)o(w)o(are)i(F)n -(oundation,)f(Inc.)2215 1660 y(Roland)i(P)o(esc)o(h)f(\(p)q(esc)o(h@cygn)o -(us.com\))1997 1697 y(The)f(author)h(assumes)f(no)h(resp)q(onsibilit)o(y)j -(for)c(an)o(y)h(errors)g(on)g(this)h(card.)1975 1759 y(This)g(card)e(ma)o(y)g -(b)q(e)g(freely)h(distributed)g(under)f(the)g(terms)g(of)g(the)h(GNU)1975 -1797 y(General)h(Public)g(License.)2012 1834 y(Please)f(con)o(tribute)g(to)g -(dev)o(elopmen)o(t)e(of)i(this)h(card)e(b)o(y)h(annotating)h(it.)1975 -1896 y(GDB)g(itself)f(is)h(free)e(soft)o(w)o(are;)g(y)o(ou)h(are)g(w)o -(elcome)e(to)i(distribute)h(copies)f(of)1975 1934 y(it)h(under)e(the)g(terms) -g(of)g(the)g(GNU)i(General)g(Public)g(License.)20 b(There)12 -b(is)1975 1971 y(absolutely)k(no)d(w)o(arran)o(t)o(y)i(for)e(GDB.)p -eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/gnu/usr.bin/gdb/doc/refcard.tex b/gnu/usr.bin/gdb/doc/refcard.tex deleted file mode 100644 index 5899608..0000000 --- a/gnu/usr.bin/gdb/doc/refcard.tex +++ /dev/null @@ -1,646 +0,0 @@ -%%%%%%%%%%%%%%%% gdb-refcard.tex %%%%%%%%%%%%%%%% - -%This file is TeX source for a reference card describing GDB, the GNU debugger. -%$Id: refcard.tex,v 1.1.1.1 1993/10/30 21:59:42 jkh Exp $ -%Copyright (C) 1991, 1992 Free Software Foundation, Inc. -%Permission is granted to make and distribute verbatim copies of -%this reference provided the copyright notices and permission notices -%are preserved on all copies. -% -%TeX markup is a programming language; accordingly this file is source -%for a program to generate a reference. -% -%This program is free software; you can redistribute it and/or modify -%it under the terms of the GNU General Public License as published by -%the Free Software Foundation; either version 1, or (at your option) -%any later version. -% -%This program is distributed in the hope that it will be useful, but -%WITHOUT ANY WARRANTY; without even the implied warranty of -%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%General Public License for more details. -% -%You can find a copy of the GNU General Public License in the GDB -%manual; or write to the Free Software Foundation, Inc., -%675 Mass Ave, Cambridge, MA 02139, USA. -% -%You can contact the author as: pesch@cygnus.com -% -% Roland Pesch -% Cygnus Support -% 1937 Landings Drive -% Mountain View, CA 94043 USA -% -% +1 415 903 1400 -% -% -% -% 22-AUG-1993 Andreas Vogel -% -% Modifications made in order to handle different papersizes correctly. -% You only have to set the total width and height of the paper, the -% horizontal and vertical margin space measured from *paper edge* -% and the interline and interspec spacing. -% In order to support a new papersize, you have to fiddle with the -% latter four dimensions. Just try out a few values. -% All other values will be computed at process time so it should be -% quite easy to support different paper sizes - only four values to -% guess :-) -% -% To find the configuration places, just search for the string -% "CONFIGURATION". -% -% Andreas Vogel (av@ssw.de) -% -% -% -% Uncomment the following `magnification' command if you want to print -% out in a larger font. Caution! You may need larger paper. You had -% best avoid using 3-column output if you try this. See the ``Three -% column format'' section below if you want to print in three column -% format. -% -%\magnification=\magstep 1 -% -% NOTE ON INTENTIONAL OMISSIONS: This reference card includes most GDB -% commands, but due to space constraints there are some things I chose -% to omit. In general, not all synonyms for commands are covered, nor -% all variations of a command. -% The GDB-under-Emacs section omits gdb-mode functions without default -% keybindings. GDB startup options are not described. -% set print sevenbit-strings, set symbol-reloading omitted. -% printsyms, printpsyms, omitted since they're for GDB maintenance primarily -% share omitted due to obsolescence -% set check range/type omitted at least til code is in GDB. -% -%-------------------- Three column format ----------------------- - -%%%% --- To disable three column format, comment out this entire section - -% Three-column format for landscape printing - -%-------- Papersize defs: - -\newdimen\totalwidth \newdimen\totalheight -\newdimen\hmargin \newdimen\vmargin -\newdimen\secskip \newdimen\lskip -\newdimen\barwidth \newdimen\barheight -\newdimen\intersecwidth - -%% -%% START CONFIGURATION - PAPERSIZE DEFINITIONS -%------- Papersize params: -%% US letter paper (8.5x11in) -%% -\totalwidth=11in % total width of paper -\totalheight=8.5in % total height of paper -\hmargin=.25in % horizontal margin width -\vmargin=.25in % vertical margin width -\secskip=1pc % space between refcard secs -\lskip=2pt % extra skip between \sec entries -%------- end papersize params -%% -%% change according to personal taste, not papersize dependent -%% -\barwidth=.1pt % width of the cropmark bar -\barheight=2pt % height of the cropmark bar -\intersecwidth=0.5em % width between \itmwid and \dfnwid -%% -%% END CONFIGURATION - PAPERSIZE DEFINITIONS -%% - -%% -%% values to be computed - nothing to configure -%% -\newdimen\fullhsize % width of area without margins -\newdimen\itmwid % width of item column -\newdimen\dfnwid % width of definition column -\newdimen\temp % only for temporary use - -%% -%% adjust the offsets so the margins are measured *from paper edge* -%% -\hoffset=-1in \advance \hoffset by \hmargin -\voffset=-1in \advance \voffset by \vmargin - -%% -%% fullhsize = totalwidth - (2 * hmargin) -%% -\fullhsize=\totalwidth -\temp=\hmargin \multiply \temp by 2 \advance \fullhsize by -\temp - -%% -%% hsize = (fullhsize - (4 * hmargin) - (2 * barwidth)) / 3 -%% -\hsize=\fullhsize -\temp=\hmargin \multiply \temp by 4 \advance \hsize by -\temp -\temp=\barwidth \multiply \temp by 2 \advance \hsize by -\temp -\divide \hsize by 3 - -%% -%% vsize = totalheight - (2 * vmargin) -%% -\vsize=\totalheight -\temp=\vmargin \multiply \temp by 2 \advance \vsize by -\temp - -%% -%% itmwid = (hsize - intersecwidth) * 1/3 -%% dfnwid = (hsize - intersecwidth) * 2/3 -%% -\temp=\hsize \advance \temp by -\intersecwidth \divide \temp by 3 -\itmwid=\temp -\dfnwid=\hsize \advance \dfnwid by -\itmwid - -%-------- end papersize defs - - -\def\fulline{\hbox to \fullhsize} -\let\lcr=L \newbox\leftcolumn\newbox\centercolumn -\output={\if L\lcr - \global\setbox\leftcolumn=\columnbox \global\let\lcr=C - \else - \if C\lcr - \global\setbox\centercolumn=\columnbox \global\let\lcr=R - \else \tripleformat \global\let\lcr=L - \fi - \fi -% \ifnum\outputpenalty>-20000 \else\dosupereject\fi - } - -%% -%% START CONFIGURATION - ALTERNATIVE FOLDING GUIDES -%% -%% For NO printed folding guide, -%% comment out other \def\vdecor's and uncomment: - -%\def\vdecor{\hskip\hmargin plus1fil\hskip\barwidth plus1fil\hskip\hmargin plus1fil} - -%% For SOLID LINE folding guide, -%% comment out other \def\vdecor's and uncomment: - -%\def\vdecor{\hskip\hmargin plus1fil \vrule width \barwidth \hskip\hmargin plus1fil} - -%% For SMALL MARKS NEAR TOP AND BOTTOM as folding guide, -%% comment out other \def\vdecor's and uncomment: - -\def\vdecor{\hskip\hmargin plus1fil -\vbox to \vsize{\hbox to \barwidth{\vrule height\barheight width\barwidth}\vfill -\hbox to \barwidth{\vrule height\barheight width\barwidth}}%THIS PERCENT SIGN IS ESSENTIAL -\hskip\hmargin plus1fil} - -%% -%% END CONFIGURATION - ALTERNATIVES FOR FOLDING GUIDES -%% - -\def\tripleformat{\shipout\vbox{\fulline{\box\leftcolumn\vdecor - \box\centercolumn\vdecor - \columnbox} - } - \advancepageno} -\def\columnbox{\leftline{\pagebody}} -\def\bye{\par\vfill - \supereject - \if R\lcr \null\vfill\eject\fi - \end} - -%-------------------- end three column format ----------------------- - -%-------------------- Computer Modern font defs: -------------------- -\font\bbf=cmbx10 -\font\vbbf=cmbx12 -\font\smrm=cmr6 -\font\brm=cmr10 -\font\rm=cmr7 -\font\it=cmti7 -\font\tt=cmtt8 -%-------------------- end font defs --------------------------------- - -% -\hyphenpenalty=5000\tolerance=2000\raggedright\raggedbottom -\normalbaselineskip=9pt\baselineskip=9pt -% -\parindent=0pt -\parskip=0pt -\footline={\vbox to0pt{\hss}} -% -\def\ctl#1{{\tt C-#1}} -\def\opt#1{{\brm[{\rm #1}]}} -\def\xtra#1{\noalign{\smallskip{\tt#1}}} -% -\long\def\sec#1;#2\endsec{\vskip \secskip -\halign{% -%COL 1 (of halign): -\vtop{\hsize=\itmwid\tt -##\par\vskip \lskip }\hfil -%COL 2 (of halign): -&\vtop{\hsize=\dfnwid\hangafter=1\hangindent=\intersecwidth -\rm ##\par\vskip \lskip}\cr -%Tail of \long\def fills in halign body with \sec args: -\noalign{{\bbf #1}\vskip \lskip} -#2 -} -} - -{\vbbf GDB QUICK REFERENCE}\hfil{\smrm GDB Version 4}\qquad - -\sec Essential Commands; -gdb {\it program} \opt{{\it core}}&debug {\it program} \opt{using -coredump {\it core}}\cr -b \opt{\it file\tt:}{\it function}&set breakpoint at {\it function} \opt{in \it file}\cr -run \opt{{\it arglist}}&start your program \opt{with {\it arglist}}\cr -bt& backtrace: display program stack\cr -p {\it expr}&display the value of an expression\cr -c &continue running your program\cr -n &next line, stepping over function calls\cr -s &next line, stepping into function calls\cr -\endsec - -\sec Starting GDB; -gdb&start GDB, with no debugging files\cr -gdb {\it program}&begin debugging {\it program}\cr -gdb {\it program core}&debug coredump {\it core} produced by {\it -program}\cr -gdb --help&describe command line options\cr -\endsec - -\sec Stopping GDB; -quit&exit GDB; also {\tt q} or {\tt EOF} (eg \ctl{d})\cr -INTERRUPT&(eg \ctl{c}) terminate current command, or send to running process\cr -\endsec - -\sec Getting Help; -help&list classes of commands\cr -help {\it class}&one-line descriptions for commands in {\it class}\cr -help {\it command}&describe {\it command}\cr -\endsec - -\sec Executing your Program; -run {\it arglist}&start your program with {\it arglist}\cr -run&start your program with current argument list\cr -run $\ldots$ <{\it inf} >{\it outf}&start your program with input, output -redirected\cr -\cr -kill&kill running program\cr -\cr -tty {\it dev}&use {\it dev} as stdin and stdout for next {\tt run}\cr -set args {\it arglist}&specify {\it arglist} for next -{\tt run}\cr -set args&specify empty argument list\cr -show args&display argument list\cr -\cr -show environment&show all environment variables\cr -show env {\it var}&show value of environment variable {\it var}\cr -set env {\it var} {\it string}&set environment variable {\it var}\cr -unset env {\it var}&remove {\it var} from environment\cr -\endsec - -\sec Shell Commands; -cd {\it dir}&change working directory to {\it dir}\cr -pwd&Print working directory\cr -make $\ldots$&call ``{\tt make}''\cr -shell {\it cmd}&execute arbitrary shell command string\cr -\endsec - -\vfill -\line{\smrm \opt{ } surround optional arguments \hfill $\ldots$ show -one or more arguments} -\vskip\baselineskip -\centerline{\smrm \copyright 1991, 1992 Free Software Foundation, Inc.\qquad Permissions on back} -\eject -\sec Breakpoints and Watchpoints; -break \opt{\it file\tt:}{\it line}\par -b \opt{\it file\tt:}{\it line}&set breakpoint at {\it line} number \opt{in \it file}\par -eg:\quad{\tt break main.c:37}\quad\cr -break \opt{\it file\tt:}{\it func}&set breakpoint at {\it -func} \opt{in \it file}\cr -break +{\it offset}\par -break -{\it offset}&set break at {\it offset} lines from current stop\cr -break *{\it addr}&set breakpoint at address {\it addr}\cr -break&set breakpoint at next instruction\cr -break $\ldots$ if {\it expr}&break conditionally on nonzero {\it expr}\cr -cond {\it n} \opt{\it expr}&new conditional expression on breakpoint -{\it n}; make unconditional if no {\it expr}\cr -tbreak $\ldots$&temporary break; disable when reached\cr -rbreak {\it regex}&break on all functions matching {\it regex}\cr -watch {\it expr}&set a watchpoint for expression {\it expr}\cr -catch {\it x}&break at C++ handler for exception {\it x}\cr -\cr -info break&show defined breakpoints\cr -info watch&show defined watchpoints\cr -\cr -clear&delete breakpoints at next instruction\cr -clear \opt{\it file\tt:}{\it fun}&delete breakpoints at entry to {\it fun}()\cr -clear \opt{\it file\tt:}{\it line}&delete breakpoints on source line \cr -delete \opt{{\it n}}&delete breakpoints -\opt{or breakpoint {\it n}}\cr -\cr -disable \opt{{\it n}}&disable breakpoints -\opt{or breakpoint {\it n}} -\cr -enable \opt{{\it n}}&enable breakpoints -\opt{or breakpoint {\it n}} -\cr -enable once \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}}; -disable again when reached -\cr -enable del \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}}; -delete when reached -\cr -\cr -ignore {\it n} {\it count}&ignore breakpoint {\it n}, {\it count} -times\cr -\cr -commands {\it n}\par -\qquad \opt{\tt silent}\par -\qquad {\it command-list}&execute GDB {\it command-list} every time breakpoint {\it n} is reached. \opt{{\tt silent} suppresses default -display}\cr -end&end of {\it command-list}\cr -\endsec - -\sec Program Stack; -backtrace \opt{\it n}\par -bt \opt{\it n}&print trace of all frames in stack; or of {\it n} -frames---innermost if {\it n}{\tt >0}, outermost if {\it n}{\tt <0}\cr -frame \opt{\it n}&select frame number {\it n} or frame at address {\it -n}; if no {\it n}, display current frame\cr -up {\it n}&select frame {\it n} frames up\cr -down {\it n}&select frame {\it n} frames down\cr -info frame \opt{\it addr}&describe selected frame, or frame at -{\it addr}\cr -info args&arguments of selected frame\cr -info locals&local variables of selected frame\cr -info reg \opt{\it rn}$\ldots$\par -info all-reg \opt{\it rn}®ister values \opt{for regs {\it rn\/}} in -selected frame; {\tt all-reg} includes floating point\cr -info catch&exception handlers active in selected frame\cr -\endsec - -\vfill\eject -\sec Execution Control; -continue \opt{\it count}\par -c \opt{\it count}&continue running; if {\it count} specified, ignore -this breakpoint next {\it count} times\cr -\cr -step \opt{\it count}\par -s \opt{\it count}&execute until another line reached; repeat {\it count} times if -specified\cr -stepi \opt{\it count}\par -si \opt{\it count}&step by machine instructions rather than source -lines\cr -\cr -next \opt{\it count}\par -n \opt{\it count}&execute next line, including any function calls\cr -nexti \opt{\it count}\par -ni \opt{\it count}&next machine instruction rather than source -line\cr -\cr -until \opt{\it location}&run until next instruction (or {\it -location})\cr -finish&run until selected stack frame returns\cr -return \opt{\it expr}&pop selected stack frame without executing -\opt{setting return value}\cr -signal {\it num}&resume execution with signal {\it s} (none if {\tt 0})\cr -jump {\it line}\par -jump *{\it address}&resume execution at specified {\it line} number or -{\it address}\cr -set var={\it expr}&evaluate {\it expr} without displaying it; use for -altering program variables\cr -\endsec - -\sec Display; -print \opt{\tt/{\it f}\/} \opt{\it expr}\par -p \opt{\tt/{\it f}\/} \opt{\it expr}&show value of {\it expr} \opt{or -last value \tt \$} according to format {\it f}:\cr -\qquad x&hexadecimal\cr -\qquad d&signed decimal\cr -\qquad u&unsigned decimal\cr -\qquad o&octal\cr -\qquad t&binary\cr -\qquad a&address, absolute and relative\cr -\qquad c&character\cr -\qquad f&floating point\cr -call \opt{\tt /{\it f}\/} {\it expr}&like {\tt print} but does not display -{\tt void}\cr -x \opt{\tt/{\it Nuf}\/} {\it expr}&examine memory at address {\it expr}; -optional format spec follows slash\cr -\quad {\it N}&count of how many units to display\cr -\quad {\it u}&unit size; one of\cr -&{\tt\qquad b}\ individual bytes\cr -&{\tt\qquad h}\ halfwords (two bytes)\cr -&{\tt\qquad w}\ words (four bytes)\cr -&{\tt\qquad g}\ giant words (eight bytes)\cr -\quad {\it f}&printing format. Any {\tt print} format, or\cr -&{\tt\qquad s}\ null-terminated string\cr -&{\tt\qquad i}\ machine instructions\cr -disassem \opt{\it addr}&display memory as machine instructions\cr -\endsec - -\sec Automatic Display; -display \opt{\tt/\it f\/} {\it expr}&show value of {\it expr} each time -program stops \opt{according to format {\it f}\/}\cr -display&display all enabled expressions on list\cr -undisplay {\it n}&remove number(s) {\it n} from list of -automatically displayed expressions\cr -disable disp {\it n}&disable display for expression(s) number {\it -n}\cr -enable disp {\it n}&enable display for expression(s) number {\it -n}\cr -info display&numbered list of display expressions\cr -\endsec - -\vfill\eject - -\sec Expressions; -{\it expr}&an expression in C, C++, or Modula-2 (including function calls), or:\cr -{\it addr\/}@{\it len}&an array of {\it len} elements beginning at {\it -addr}\cr -{\it file}::{\it nm}&a variable or function {\it nm} defined in {\it -file}\cr -$\tt\{${\it type}$\tt\}${\it addr}&read memory at {\it addr} as specified -{\it type}\cr -\$&most recent displayed value\cr -\${\it n}&{\it n}th displayed value\cr -\$\$&displayed value previous to \$\cr -\$\${\it n}&{\it n}th displayed value back from \$\cr -\$\_&last address examined with {\tt x}\cr -\$\_\_&value at address \$\_\cr -\${\it var}&convenience variable; assign any value\cr -\cr -show values \opt{{\it n}}&show last 10 values \opt{or surrounding -\${\it n}}\cr -show convenience&display all convenience variables\cr -\endsec - -\sec Symbol Table; -info address {\it s}&show where symbol {\it s} is stored\cr -info func \opt{\it regex}&show names, types of defined functions -(all, or matching {\it regex})\cr -info var \opt{\it regex}&show names, types of global variables (all, -or matching {\it regex})\cr -whatis \opt{\it expr}\par -ptype \opt{\it expr}&show data type of {\it expr} \opt{or \tt \$} -without evaluating; {\tt ptype} gives more detail\cr -ptype {\it type}&describe type, struct, union, or enum\cr -\endsec - -\sec GDB Scripts; -source {\it script}&read, execute GDB commands from file {\it -script}\cr -\cr -define {\it cmd}\par -\qquad {\it command-list}&create new GDB command {\it cmd}; -execute script defined by {\it command-list}\cr -end&end of {\it command-list}\cr -document {\it cmd}\par -\qquad {\it help-text}&create online documentation -for new GDB command {\it cmd}\cr -end&end of {\it help-text}\cr -\endsec - -\sec Signals; -handle {\it signal} {\it act}&specify GDB actions for {\it signal}:\cr -\quad print&announce signal\cr -\quad noprint&be silent for signal\cr -\quad stop&halt execution on signal\cr -\quad nostop&do not halt execution\cr -\quad pass&allow your program to handle signal\cr -\quad nopass&do not allow your program to see signal\cr -info signals&show table of signals, GDB action for each\cr -\endsec - -\sec Debugging Targets; -target {\it type} {\it param}&connect to target machine, process, or file\cr -help target&display available targets\cr -attach {\it param}&connect to another process\cr -detach&release target from GDB control\cr -\endsec - -\vfill\eject -\sec Controlling GDB; -set {\it param} {\it value}&set one of GDB's internal parameters\cr -show {\it param}&display current setting of parameter\cr -\xtra{\rm Parameters understood by {\tt set} and {\tt show}:} -\quad complaints {\it limit}&number of messages on unusual symbols\cr -\quad confirm {\it on/off}&enable or disable cautionary queries\cr -\quad editing {\it on/off}&control {\tt readline} command-line editing\cr -\quad height {\it lpp}&number of lines before pause in display\cr -\quad language {\it lang}&Language for GDB expressions ({\tt auto}, {\tt c} or -{\tt modula-2})\cr -\quad listsize {\it n}&number of lines shown by {\tt list}\cr -\quad prompt {\it str}&use {\it str} as GDB prompt\cr -\quad radix {\it base}&octal, decimal, or hex number representation\cr -\quad verbose {\it on/off}&control messages when loading -symbols\cr -\quad width {\it cpl}&number of characters before line folded\cr -\quad write {\it on/off}&Allow or forbid patching binary, core files -(when reopened with {\tt exec} or {\tt core}) -\cr -\quad history $\ldots$\par -\quad h $\ldots$&groups with the following options:\cr -\quad h exp {\it off/on}&disable/enable {\tt readline} history expansion\cr -\quad h file {\it filename}&file for recording GDB command history\cr -\quad h size {\it size}&number of commands kept in history list\cr -\quad h save {\it off/on}&control use of external file for -command history\cr -\cr -\quad print $\ldots$\par -\quad p $\ldots$&groups with the following options:\cr -\quad p address {\it on/off}&print memory addresses in stacks, -values\cr -\quad p array {\it off/on}&compact or attractive format for -arrays\cr -\quad p demangl {\it on/off}&source (demangled) or internal form for C++ -symbols\cr -\quad p asm-dem {\it on/off}&demangle C++ symbols in -machine-instruction output\cr -\quad p elements {\it limit}&number of array elements to display\cr -\quad p object {\it on/off}&print C++ derived types for objects\cr -\quad p pretty {\it off/on}&struct display: compact or indented\cr -\quad p union {\it on/off}&display of union members\cr -\quad p vtbl {\it off/on}&display of C++ virtual function -tables\cr -\cr -show commands&show last 10 commands\cr -show commands {\it n}&show 10 commands around number {\it n}\cr -show commands +&show next 10 commands\cr -\endsec - -\sec Working Files; -file \opt{\it file}&use {\it file} for both symbols and executable; -with no arg, discard both\cr -core \opt{\it file}&read {\it file} as coredump; or discard\cr -exec \opt{\it file}&use {\it file} as executable only; or discard\cr -symbol \opt{\it file}&use symbol table from {\it file}; or discard\cr -load {\it file}&dynamically link {\it file\/} and add its symbols\cr -add-sym {\it file} {\it addr}&read additional symbols from {\it file}, -dynamically loaded at {\it addr}\cr -info files&display working files and targets in use\cr -path {\it dirs}&add {\it dirs} to front of path searched for -executable and symbol files\cr -show path&display executable and symbol file path\cr -info share&list names of shared libraries currently loaded\cr -\endsec - -\vfill\eject -\sec Source Files; -dir {\it names}&add directory {\it names} to front of source path\cr -dir&clear source path\cr -show dir&show current source path\cr -\cr -list&show next ten lines of source\cr -list -&show previous ten lines\cr -list {\it lines}&display source surrounding {\it lines}, -specified as:\cr -\quad{\opt{\it file\tt:}\it num}&line number \opt{in named file}\cr -\quad{\opt{\it file\tt:}\it function}&beginning of function \opt{in -named file}\cr -\quad{\tt +\it off}&{\it off} lines after last printed\cr -\quad{\tt -\it off}&{\it off} lines previous to last printed\cr -\quad{\tt*\it address}&line containing {\it address}\cr -list {\it f},{\it l}&from line {\it f} to line {\it l}\cr -info line {\it num}&show starting, ending addresses of compiled code for -source line {\it num}\cr -info source&show name of current source file\cr -info sources&list all source files in use\cr -forw {\it regex}&search following source lines for {\it regex}\cr -rev {\it regex}&search preceding source lines for {\it regex}\cr -\endsec - -\sec GDB under GNU Emacs; -M-x gdb&run GDB under Emacs\cr -\ctl{h} m&describe GDB mode\cr -M-s&step one line ({\tt step})\cr -M-n&next line ({\tt next})\cr -M-i&step one instruction ({\tt stepi})\cr -\ctl{c} \ctl{f}&finish current stack frame ({\tt finish})\cr -M-c&continue ({\tt cont})\cr -M-u&up {\it arg} frames ({\tt up})\cr -M-d&down {\it arg} frames ({\tt down})\cr -\ctl{x} \&© number from point, insert at end\cr -\ctl{x} SPC&(in source file) set break at point\cr -\endsec - -\sec GDB License; -show copying&Display GNU General Public License\cr -show warranty&There is NO WARRANTY for GDB. Display full no-warranty -statement.\cr -\endsec - - -\vfill -{\smrm\parskip=6pt -\centerline{Copyright \copyright 1991, 1992, 1993 Free Software Foundation, Inc.} -\centerline{Roland Pesch (pesch@cygnus.com)} -\centerline{The author assumes no responsibility for any errors on this card.} - -This card may be freely distributed under the terms of the GNU -General Public License. - -\centerline{Please contribute to development of this card by -annotating it.} - -GDB itself is free software; you are welcome to distribute copies of -it under the terms of the GNU General Public License. There is -absolutely no warranty for GDB. -} -\end |