* Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
[deliverable/binutils-gdb.git] / gdb / doc / cygref.tex
CommitLineData
5ac0315a 1%This file is TeX source for a reference card describing GDB, the GNU debugger.
294b2b49 2%Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
5ac0315a
RP
3%Permission is granted to make and distribute verbatim copies of
4%this reference provided the copyright notices and permission notices
5%are preserved on all copies.
6%
7%TeX markup is a programming language; accordingly this file is source
8%for a program to generate a reference.
9%
10%This program is free software; you can redistribute it and/or modify
11%it under the terms of the GNU General Public License as published by
12%the Free Software Foundation; either version 1, or (at your option)
13%any later version.
14%
15%This program is distributed in the hope that it will be useful, but
16%WITHOUT ANY WARRANTY; without even the implied warranty of
17%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18%General Public License for more details.
19%
20%You can find a copy of the GNU General Public License in the GDB
21%manual; or write to the Free Software Foundation, Inc.,
6c9638b4 22%59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5ac0315a
RP
23%
24%You can contact the author as: pesch@cygnus.com
25%
26% Roland Pesch
27% Cygnus Support
c98c5fd4
DZ
28% 1937 Landings Drive
29% Mountain View, CA 94043 USA
5ac0315a 30%
c98c5fd4 31% +1 415 903 1400
5ac0315a
RP
32%
33% Cygnus Support is an organization devoted to commercial
34% support of free software. For general information
35% contact ``info@cygnus.com''
36%
37% NOTE ON INTENTIONAL OMISSIONS: This reference card includes most GDB
38% commands, but due to space constraints there are some things I chose
39% to omit. In general, not all synonyms for commands are covered, nor
40% all variations of a command.
41% The GDB-under-Emacs section omits gdb-mode functions without default
42% keybindings. GDB startup options are not described.
43% set print sevenbit-strings, set symbol-reloading omitted.
44% printsyms, printpsyms, omitted since they're for GDB maintenance primarily
45% share omitted due to obsolescence
46% set check range/type omitted at least til code is in GDB.
47%
294b2b49
RP
48%
49% 22-AUG-1993 Andreas Vogel
50%
51% Modifications made in order to handle different papersizes correctly.
52% You only have to set the total width and height of the paper, the
53% horizontal and vertical margin space measured from *paper edge*
54% and the interline and interspec spacing.
55% In order to support a new papersize, you have to fiddle with the
56% latter four dimensions. Just try out a few values.
57% All other values will be computed at process time so it should be
58% quite easy to support different paper sizes - only four values to
59% guess :-)
60%
61% To find the configuration places, just search for the string
62% "CONFIGURATION".
63%
64% Andreas Vogel (av@ssw.de)
65%
66%
67%
68%
5ac0315a
RP
69\input epsf
70\epsfxsize=1.75in
d98a0a44
RP
71%-------------------- Three column format -----------------------
72
73%%%% --- To disable three column format, comment out this entire section
74
294b2b49
RP
75% Three-column format for landscape printing
76
77%-------- Papersize defs:
78
79\newdimen\totalwidth \newdimen\totalheight
80\newdimen\hmargin \newdimen\vmargin
81\newdimen\secskip \newdimen\lskip
82\newdimen\barwidth \newdimen\barheight
83\newdimen\intersecwidth
84
85%%
86%% START CONFIGURATION - PAPERSIZE DEFINITIONS
87%------- Papersize params:
88%% US letter paper (8.5x11in)
89%%
90\totalwidth=11in % total width of paper
91\totalheight=8.5in % total height of paper
92\hmargin=.25in % horizontal margin width
93\vmargin=.25in % vertical margin width
94\secskip=1pc % space between refcard secs
95\lskip=2pt % extra skip between \sec entries
96%------- end papersize params
97%%
98%% change according to personal taste, not papersize dependent
99%%
100\barwidth=.1pt % width of the cropmark bar
101\barheight=2pt % height of the cropmark bar
102\intersecwidth=0.5em % width between \itmwid and \dfnwid
103%%
104%% END CONFIGURATION - PAPERSIZE DEFINITIONS
105%%
106
107%%
108%% values to be computed - nothing to configure
109%%
110\newdimen\fullhsize % width of area without margins
111\newdimen\itmwid % width of item column
112\newdimen\dfnwid % width of definition column
113\newdimen\temp % only for temporary use
114
115%%
116%% adjust the offsets so the margins are measured *from paper edge*
117%%
118\hoffset=-1in \advance \hoffset by \hmargin
119\voffset=-1in \advance \voffset by \vmargin
120
121%%
122%% fullhsize = totalwidth - (2 * hmargin)
123%%
124\fullhsize=\totalwidth
125\temp=\hmargin \multiply \temp by 2 \advance \fullhsize by -\temp
126
127%%
128%% hsize = (fullhsize - (4 * hmargin) - (2 * barwidth)) / 3
129%%
130\hsize=\fullhsize
131\temp=\hmargin \multiply \temp by 4 \advance \hsize by -\temp
132\temp=\barwidth \multiply \temp by 2 \advance \hsize by -\temp
133\divide \hsize by 3
134
135%%
136%% vsize = totalheight - (2 * vmargin)
137%%
138\vsize=\totalheight
139\temp=\vmargin \multiply \temp by 2 \advance \vsize by -\temp
140
141%%
142%% itmwid = (hsize - intersecwidth) * 1/3
143%% dfnwid = (hsize - intersecwidth) * 2/3
144%%
145\temp=\hsize \advance \temp by -\intersecwidth \divide \temp by 3
146\itmwid=\temp
147\dfnwid=\hsize \advance \dfnwid by -\itmwid
148
149%-------- end papersize defs
150
d98a0a44 151
d98a0a44
RP
152\def\fulline{\hbox to \fullhsize}
153\let\lcr=L \newbox\leftcolumn\newbox\centercolumn
154\output={\if L\lcr
155 \global\setbox\leftcolumn=\columnbox \global\let\lcr=C
156 \else
157 \if C\lcr
158 \global\setbox\centercolumn=\columnbox \global\let\lcr=R
159 \else \tripleformat \global\let\lcr=L
160 \fi
161 \fi
162% \ifnum\outputpenalty>-20000 \else\dosupereject\fi
163 }
294b2b49
RP
164
165%%
166%% START CONFIGURATION - ALTERNATIVE FOLDING GUIDES
167%%
168%% For NO printed folding guide,
169%% comment out other \def\vdecor's and uncomment:
170
171%\def\vdecor{\hskip\hmargin plus1fil\hskip\barwidth plus1fil\hskip\hmargin plus1fil}
172
173%% For SOLID LINE folding guide,
174%% comment out other \def\vdecor's and uncomment:
175
176%\def\vdecor{\hskip\hmargin plus1fil \vrule width \barwidth \hskip\hmargin plus1fil}
177
178%% For SMALL MARKS NEAR TOP AND BOTTOM as folding guide,
179%% comment out other \def\vdecor's and uncomment:
180
181\def\vdecor{\hskip\hmargin plus1fil
182\vbox to \vsize{\hbox to \barwidth{\vrule height\barheight width\barwidth}\vfill
183\hbox to \barwidth{\vrule height\barheight width\barwidth}}%THIS PERCENT SIGN IS ESSENTIAL
184\hskip\hmargin plus1fil}
185
186%%
187%% END CONFIGURATION - ALTERNATIVES FOR FOLDING GUIDES
188%%
189
d98a0a44 190\def\tripleformat{\shipout\vbox{\fulline{\box\leftcolumn\vdecor
294b2b49
RP
191 \box\centercolumn\vdecor
192 \columnbox}
d98a0a44
RP
193 }
194 \advancepageno}
195\def\columnbox{\leftline{\pagebody}}
196\def\bye{\par\vfill
197 \supereject
198 \if R\lcr \null\vfill\eject\fi
199 \end}
200
201%-------------------- end three column format -----------------------
202
203%-------------------- PostScript (K Berry names) font defs: --------------
204\font\bbf=ptmb at 10pt
205\font\vbbf=ptmb at 12pt
206\font\smrm=ptmr at 6pt
207\font\brm=ptmr at 10pt
208\font\rm=ptmr at 8pt
209\font\it=ptmri at 8pt
210\font\tt=pcrr at 8pt
211% Used only for copyright, replacing plain TeX macro.
212\font\sym=psyr at 7pt
213\def\copyright{{\sym\char'323}}
214%-------------------- end font defs ---------------------------------
215
5ac0315a 216%
5ac0315a
RP
217\hyphenpenalty=5000\tolerance=2000\raggedright\raggedbottom
218\normalbaselineskip=9pt\baselineskip=9pt
219%
220\parindent=0pt
221\parskip=0pt
222\footline={\vbox to0pt{\hss}}
223%
224\def\ctl#1{{\tt C-#1}}
225\def\opt#1{{\brm[{\rm #1}]}}
226\def\xtra#1{\noalign{\smallskip{\tt#1}}}
227%
294b2b49 228\long\def\sec#1;#2\endsec{\vskip \secskip
5ac0315a
RP
229\halign{%
230%COL 1 (of halign):
294b2b49
RP
231\vtop{\hsize=\itmwid\tt
232##\par\vskip \lskip }\hfil
5ac0315a 233%COL 2 (of halign):
294b2b49
RP
234&\vtop{\hsize=\dfnwid\hangafter=1\hangindent=\intersecwidth
235\rm ##\par\vskip \lskip}\cr
5ac0315a 236%Tail of \long\def fills in halign body with \sec args:
294b2b49 237\noalign{{\bbf #1}\vskip \lskip}
5ac0315a
RP
238#2
239}
240}
241{\vbbf GDB QUICK REFERENCE}\hfil{\smrm GDB Version 4}
242{\baselineskip=0pt
243\vskip 7.15 in
244\hskip .33in\epsfbox{cyglogo.eps}
245\vskip -7.82 in}
246\vskip 3pt
247
248\sec Essential Commands;
249gdb {\it program} \opt{{\it core}}&debug {\it program} \opt{using
250coredump {\it core}}\cr
251b \opt{\it file\tt:}{\it function}&set breakpoint at {\it function} \opt{in \it file}\cr
252run \opt{{\it arglist}}&start your program \opt{with {\it arglist}}\cr
253bt& backtrace: display program stack\cr
254p {\it expr}&display the value of an expression\cr
255c &continue running your program\cr
256n &next line, stepping over function calls\cr
257s &next line, stepping into function calls\cr
258\endsec
259
260\sec Starting GDB;
261gdb&start GDB, with no debugging files\cr
262gdb {\it program}&begin debugging {\it program}\cr
263gdb {\it program core}&debug coredump {\it core} produced by {\it
264program}\cr
d98a0a44 265gdb --help&describe command line options\cr
5ac0315a
RP
266\endsec
267
268\sec Stopping GDB;
269quit&exit GDB; also {\tt q} or {\tt EOF} (eg \ctl{d})\cr
270INTERRUPT&(eg \ctl{c}) terminate current command, or send to running process\cr
271\endsec
272
273\sec Getting Help;
274help&list classes of commands\cr
275help {\it class}&one-line descriptions for commands in {\it class}\cr
276help {\it command}&describe {\it command}\cr
277\endsec
278
279\sec Executing your Program;
280run {\it arglist}&start your program with {\it arglist}\cr
281run&start your program with current argument list\cr
282run $\ldots$ <{\it inf} >{\it outf}&start your program with input, output
283redirected\cr
284\cr
285kill&kill running program\cr
286\cr
287tty {\it dev}&use {\it dev} as stdin and stdout for next {\tt run}\cr
288set args {\it arglist}&specify {\it arglist} for next
289{\tt run}\cr
290set args&specify empty argument list\cr
291show args&display argument list\cr
292\cr
294b2b49 293show env&show all environment variables\cr
5ac0315a
RP
294show env {\it var}&show value of environment variable {\it var}\cr
295set env {\it var} {\it string}&set environment variable {\it var}\cr
296unset env {\it var}&remove {\it var} from environment\cr
297\endsec
298
299\sec Shell Commands;
300cd {\it dir}&change working directory to {\it dir}\cr
301pwd&Print working directory\cr
302make $\ldots$&call ``{\tt make}''\cr
303shell {\it cmd}&execute arbitrary shell command string\cr
304\endsec
305
306\vfill
307\eject
308\sec Breakpoints and Watchpoints;
309break \opt{\it file\tt:}{\it line}\par
310b \opt{\it file\tt:}{\it line}&set breakpoint at {\it line} number \opt{in \it file}\par
311eg:\quad{\tt break main.c:37}\quad\cr
294b2b49
RP
312break \opt{\it file\tt:}{\it func}&set breakpoint at {\it
313func} \opt{in \it file}\cr
5ac0315a
RP
314break +{\it offset}\par
315break -{\it offset}&set break at {\it offset} lines from current stop\cr
316break *{\it addr}&set breakpoint at address {\it addr}\cr
317break&set breakpoint at next instruction\cr
318break $\ldots$ if {\it expr}&break conditionally on nonzero {\it expr}\cr
319cond {\it n} \opt{\it expr}&new conditional expression on breakpoint
320{\it n}; make unconditional if no {\it expr}\cr
321tbreak $\ldots$&temporary break; disable when reached\cr
322rbreak {\it regex}&break on all functions matching {\it regex}\cr
323watch {\it expr}&set a watchpoint for expression {\it expr}\cr
324catch {\it x}&break at C++ handler for exception {\it x}\cr
325\cr
326info break&show defined breakpoints\cr
327info watch&show defined watchpoints\cr
328\cr
329clear&delete breakpoints at next instruction\cr
330clear \opt{\it file\tt:}{\it fun}&delete breakpoints at entry to {\it fun}()\cr
331clear \opt{\it file\tt:}{\it line}&delete breakpoints on source line \cr
332delete \opt{{\it n}}&delete breakpoints
333\opt{or breakpoint {\it n}}\cr
334\cr
335disable \opt{{\it n}}&disable breakpoints
336\opt{or breakpoint {\it n}}
337\cr
338enable \opt{{\it n}}&enable breakpoints
339\opt{or breakpoint {\it n}}
340\cr
341enable once \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}};
342disable again when reached
343\cr
344enable del \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}};
345delete when reached
346\cr
347\cr
348ignore {\it n} {\it count}&ignore breakpoint {\it n}, {\it count}
349times\cr
350\cr
351commands {\it n}\par
352\qquad \opt{\tt silent}\par
353\qquad {\it command-list}&execute GDB {\it command-list} every time breakpoint {\it n} is reached. \opt{{\tt silent} suppresses default
354display}\cr
355end&end of {\it command-list}\cr
356\endsec
357
358\sec Program Stack;
359backtrace \opt{\it n}\par
360bt \opt{\it n}&print trace of all frames in stack; or of {\it n}
361frames---innermost if {\it n}{\tt >0}, outermost if {\it n}{\tt <0}\cr
362frame \opt{\it n}&select frame number {\it n} or frame at address {\it
363n}; if no {\it n}, display current frame\cr
364up {\it n}&select frame {\it n} frames up\cr
365down {\it n}&select frame {\it n} frames down\cr
366info frame \opt{\it addr}&describe selected frame, or frame at
367{\it addr}\cr
368info args&arguments of selected frame\cr
369info locals&local variables of selected frame\cr
370info reg \opt{\it rn}\par
371info all-reg \opt{\it rn}&register values \opt{for reg {\it rn\/}} in
372selected frame; {\tt all-reg} includes floating point\cr
373info catch&exception handlers active in selected frame\cr
374\endsec
375
376\vfill
377\line{\smrm \opt{ } surround optional arguments.\hfil $\ldots$ show
378one or more arguments}
379\vskip\baselineskip
294b2b49 380\centerline{\smrm \copyright 1991, 1992, 1993 Free Software Foundation, Inc.\qquad Permissions on back}
5ac0315a
RP
381\eject
382\sec Execution Control;
383continue \opt{\it count}\par
384c \opt{\it count}&continue running; if {\it count} specified, ignore
385this breakpoint next {\it count} times\cr
386\cr
387step \opt{\it count}\par
388s \opt{\it count}&execute until another line reached; repeat {\it count} times if
389specified\cr
390stepi \opt{\it count}\par
391si \opt{\it count}&step by machine instructions rather than source
392lines\cr
393\cr
394next \opt{\it count}\par
395n \opt{\it count}&execute next line, including any function calls\cr
396nexti \opt{\it count}\par
397ni \opt{\it count}&next machine instruction rather than source
398line\cr
399\cr
400until \opt{\it location}&run until next instruction (or {\it
401location})\cr
402finish&run until selected stack frame returns\cr
403return \opt{\it expr}&pop selected stack frame without executing
404\opt{setting return value}\cr
405signal {\it num}&resume execution with signal {\it s} (none if {\tt 0})\cr
406jump {\it line}\par
407jump *{\it address}&resume execution at specified {\it line} number or
408{\it address}\cr
409set var={\it expr}&evaluate {\it expr} without displaying it; use for
410altering program variables\cr
411\endsec
412
413\sec Display;
414print \opt{\tt/{\it f}\/} \opt{\it expr}\par
415p \opt{\tt/{\it f}\/} \opt{\it expr}&show value of {\it expr} \opt{or
416last value \tt \$} according to format {\it f}:\cr
417\qquad x&hexadecimal\cr
418\qquad d&signed decimal\cr
419\qquad u&unsigned decimal\cr
420\qquad o&octal\cr
421\qquad t&binary\cr
422\qquad a&address, absolute and relative\cr
423\qquad c&character\cr
424\qquad f&floating point\cr
425call \opt{\tt /{\it f}\/} {\it expr}&like {\tt print} but does not display
426{\tt void}\cr
427x \opt{\tt/{\it Nuf}\/} {\it expr}&examine memory at address {\it expr};
428optional format spec follows slash\cr
429\quad {\it N}&count of how many units to display\cr
430\quad {\it u}&unit size; one of\cr
431&{\tt\qquad b}\ individual bytes\cr
432&{\tt\qquad h}\ halfwords (two bytes)\cr
433&{\tt\qquad w}\ words (four bytes)\cr
434&{\tt\qquad g}\ giant words (eight bytes)\cr
435\quad {\it f}&printing format. Any {\tt print} format, or\cr
436&{\tt\qquad s}\ null-terminated string\cr
437&{\tt\qquad i}\ machine instructions\cr
438disassem \opt{\it addr}&display memory as machine instructions\cr
439\endsec
440
441\sec Automatic Display;
442display \opt{\tt/\it f\/} {\it expr}&show value of {\it expr} each time
443program stops \opt{according to format {\it f}\/}\cr
444display&display all enabled expressions on list\cr
445undisplay {\it n}&remove number(s) {\it n} from list of
446automatically displayed expressions\cr
447disable disp {\it n}&disable display for expression(s) number {\it
448n}\cr
449enable disp {\it n}&enable display for expression(s) number {\it
450n}\cr
451info display&numbered list of display expressions\cr
452\endsec
453
454\vfill\eject
455
456\sec Expressions;
457{\it expr}&an expression in C, C++, or Modula-2 (including function calls), or:\cr
458{\it addr\/}@{\it len}&an array of {\it len} elements beginning at {\it
459addr}\cr
460{\it file}::{\it nm}&a variable or function {\it nm} defined in {\it
461file}\cr
462$\tt\{${\it type}$\tt\}${\it addr}&read memory at {\it addr} as specified
463{\it type}\cr
464\$&most recent displayed value\cr
465\${\it n}&{\it n}th displayed value\cr
466\$\$&displayed value previous to \$\cr
467\$\${\it n}&{\it n}th displayed value back from \$\cr
468\$\_&last address examined with {\tt x}\cr
469\$\_\_&value at address \$\_\cr
470\${\it var}&convenience variable; assign any value\cr
471\cr
472show values \opt{{\it n}}&show last 10 values \opt{or surrounding
473\${\it n}}\cr
294b2b49 474show conv&display all convenience variables\cr
5ac0315a
RP
475\endsec
476
477\sec Symbol Table;
478info address {\it s}&show where symbol {\it s} is stored\cr
479info func \opt{\it regex}&show names, types of defined functions
480(all, or matching {\it regex})\cr
481info var \opt{\it regex}&show names, types of global variables (all,
482or matching {\it regex})\cr
483whatis \opt{\it expr}\par
484ptype \opt{\it expr}&show data type of {\it expr} \opt{or \tt \$}
485without evaluating; {\tt ptype} gives more detail\cr
486ptype {\it type}&describe type, struct, union, or enum\cr
487\endsec
488
489\sec GDB Scripts;
490source {\it script}&read, execute GDB commands from file {\it
491script}\cr
492\cr
493define {\it cmd}\par
494\qquad {\it command-list}&create new GDB command {\it cmd};
495execute script defined by {\it command-list}\cr
496end&end of {\it command-list}\cr
497document {\it cmd}\par
498\qquad {\it help-text}&create online documentation
499for new GDB command {\it cmd}\cr
500end&end of {\it help-text}\cr
501\endsec
502
503\sec Signals;
504handle {\it signal} {\it act}&specify GDB actions for {\it signal}:\cr
505\quad print&announce signal\cr
506\quad noprint&be silent for signal\cr
507\quad stop&halt execution on signal\cr
508\quad nostop&do not halt execution\cr
509\quad pass&allow your program to handle signal\cr
510\quad nopass&do not allow your program to see signal\cr
511info signals&show table of signals, GDB action for each\cr
512\endsec
513
514\sec Debugging Targets;
515target {\it type} {\it param}&connect to target machine, process, or file\cr
516help target&display available targets\cr
517attach {\it param}&connect to another process\cr
518detach&release target from GDB control\cr
519\endsec
520
521\vfill\eject
522\sec Controlling GDB;
523set {\it param} {\it value}&set one of GDB's internal parameters\cr
524show {\it param}&display current setting of parameter\cr
525\xtra{\rm Parameters understood by {\tt set} and {\tt show}:}
294b2b49 526\quad complaint {\it limit}&number of messages on unusual symbols\cr
5ac0315a
RP
527\quad confirm {\it on/off}&enable or disable cautionary queries\cr
528\quad editing {\it on/off}&control {\tt readline} command-line editing\cr
529\quad height {\it lpp}&number of lines before pause in display\cr
530\quad language {\it lang}&Language for GDB expressions ({\tt auto}, {\tt c} or
531{\tt modula-2})\cr
532\quad listsize {\it n}&number of lines shown by {\tt list}\cr
533\quad prompt {\it str}&use {\it str} as GDB prompt\cr
534\quad radix {\it base}&octal, decimal, or hex number representation\cr
535\quad verbose {\it on/off}&control messages when loading
536symbols\cr
537\quad width {\it cpl}&number of characters before line folded\cr
538\quad write {\it on/off}&Allow or forbid patching binary, core files
539(when reopened with {\tt exec} or {\tt core})
540\cr
541\quad history $\ldots$\par
542\quad h $\ldots$&groups with the following options:\cr
543\quad h exp {\it off/on}&disable/enable {\tt readline} history expansion\cr
544\quad h file {\it filename}&file for recording GDB command history\cr
545\quad h size {\it size}&number of commands kept in history list\cr
546\quad h save {\it off/on}&control use of external file for
547command history\cr
548\cr
549\quad print $\ldots$\par
550\quad p $\ldots$&groups with the following options:\cr
551\quad p address {\it on/off}&print memory addresses in stacks,
552values\cr
553\quad p array {\it off/on}&compact or attractive format for
554arrays\cr
555\quad p demangl {\it on/off}&source (demangled) or internal form for C++
556symbols\cr
557\quad p asm-dem {\it on/off}&demangle C++ symbols in
558machine-instruction output\cr
559\quad p elements {\it limit}&number of array elements to display\cr
560\quad p object {\it on/off}&print C++ derived types for objects\cr
561\quad p pretty {\it off/on}&struct display: compact or indented\cr
562\quad p union {\it on/off}&display of union members\cr
563\quad p vtbl {\it off/on}&display of C++ virtual function
564tables\cr
565\cr
566show commands&show last 10 commands\cr
567show commands {\it n}&show 10 commands around number {\it n}\cr
568show commands +&show next 10 commands\cr
569\endsec
570
571\sec Working Files;
572file \opt{\it file}&use {\it file} for both symbols and executable;
573with no arg, discard both\cr
574core \opt{\it file}&read {\it file} as coredump; or discard\cr
575exec \opt{\it file}&use {\it file} as executable only; or discard\cr
576symbol \opt{\it file}&use symbol table from {\it file}; or discard\cr
577load {\it file}&dynamically link {\it file\/} and add its symbols\cr
578add-sym {\it file} {\it addr}&read additional symbols from {\it file},
579dynamically loaded at {\it addr}\cr
580info files&display working files and targets in use\cr
581path {\it dirs}&add {\it dirs} to front of path searched for
582executable and symbol files\cr
583show path&display executable and symbol file path\cr
584info share&list names of shared libraries currently loaded\cr
585\endsec
586
587\vfill\eject
588\sec Source Files;
589dir {\it names}&add directory {\it names} to front of source path\cr
590dir&clear source path\cr
591show dir&show current source path\cr
592\cr
593list&show next ten lines of source\cr
594list -&show previous ten lines\cr
294b2b49
RP
595list {\it lines}&display source surrounding {\it lines},
596specified as:\cr
5ac0315a
RP
597\quad{\opt{\it file\tt:}\it num}&line number \opt{in named file}\cr
598\quad{\opt{\it file\tt:}\it function}&beginning of function \opt{in
599named file}\cr
600\quad{\tt +\it off}&{\it off} lines after last printed\cr
601\quad{\tt -\it off}&{\it off} lines previous to last printed\cr
602\quad{\tt*\it address}&line containing {\it address}\cr
603list {\it f},{\it l}&from line {\it f} to line {\it l}\cr
604info line {\it num}&show starting, ending addresses of compiled code for
605source line {\it num}\cr
606info source&show name of current source file\cr
607info sources&list all source files in use\cr
608forw {\it regex}&search following source lines for {\it regex}\cr
609rev {\it regex}&search preceding source lines for {\it regex}\cr
610\endsec
611
612\sec GDB under GNU Emacs;
613M-x gdb&run GDB under Emacs\cr
614\ctl{h} m&describe GDB mode\cr
615M-s&step one line ({\tt step})\cr
616M-n&next line ({\tt next})\cr
617M-i&step one instruction ({\tt stepi})\cr
618\ctl{c} \ctl{f}&finish current stack frame ({\tt finish})\cr
619M-c&continue ({\tt cont})\cr
620M-u&up {\it arg} frames ({\tt up})\cr
621M-d&down {\it arg} frames ({\tt down})\cr
622\ctl{x} \&&copy number from point, insert at end\cr
623\ctl{x} SPC&(in source file) set break at point\cr
624\endsec
625
626\sec GDB License;
627show copying&Display GNU General Public License\cr
628show warranty&There is NO WARRANTY for GDB. Display full no-warranty
629statement.\cr
630\endsec
631
632
633\vfill
634{\smrm\parskip=6pt
294b2b49
RP
635\centerline{Copyright \copyright 1991, 1992, 1993 Free Software Foundation, Inc.}
636\centerline{Roland Pesch (pesch@cygnus.com)}
5ac0315a
RP
637\centerline{The author assumes no responsibility for any errors on this card.}
638
639This card may be freely distributed under the terms of the GNU
640General Public License.
641
642\centerline{Please contribute to development of this card by
643annotating it.}
644
645GDB itself is free software; you are welcome to distribute copies of
646it under the terms of the GNU General Public License. There is
647absolutely no warranty for GDB.
648}
649\end
This page took 0.592777 seconds and 4 git commands to generate.