]>
Commit | Line | Data |
---|---|---|
bca43169 | 1 | %This file is TeX source for a reference card describing GDB, the GNU debugger. |
98088880 | 2 | %$Id$ |
bca43169 RP |
3 | %Copyright (C) 1991 Free Software Foundation, Inc. |
4 | %Permission is granted to make and distribute verbatim copies of | |
5 | %this reference provided the copyright notices and permission notices | |
6 | %are preserved on all copies. | |
7 | % | |
8 | %TeX markup is a programming language; accordingly this file is source | |
9 | %for a program to generate a reference. | |
10 | % | |
11 | %This program is free software; you can redistribute it and/or modify | |
12 | %it under the terms of the GNU General Public License as published by | |
13 | %the Free Software Foundation; either version 1, or (at your option) | |
14 | %any later version. | |
15 | % | |
16 | %This program is distributed in the hope that it will be useful, but | |
17 | %WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | %MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | %General Public License for more details. | |
20 | % | |
21 | %You can find a copy of the GNU General Public License in the GDB | |
22 | %manual; or write to the Free Software Foundation, Inc., | |
23 | %675 Mass Ave, Cambridge, MA 02139, USA. | |
24 | % | |
25 | %You can contact the author as: pesch@cygnus.com | |
26 | % | |
27 | % Roland Pesch | |
28 | % Cygnus Support | |
29 | % 814 University Ave. | |
30 | % Palo Alto, CA 94301 USA | |
31 | % | |
32 | % +1 415 322 3811 | |
33 | % | |
34 | % Cygnus Support is an organization devoted to commercial | |
35 | % support of free software. For general information | |
36 | % contact ``info@cygnus.com'' | |
37 | % | |
98088880 RP |
38 | % NOTE ON INTENTIONAL OMISSIONS: This reference card includes most GDB |
39 | % commands, but due to space constraints there are some things I chose | |
d54bd32d RP |
40 | % to omit. In general, not all synonyms for commands are covered, nor |
41 | % all variations of a command. | |
98088880 RP |
42 | % The GDB-under-Emacs section omits gdb-mode functions without default |
43 | % keybindings. GDB startup options are not described. | |
d9800dbb | 44 | % set print sevenbit-strings, set symbol-reloading omitted. |
d54bd32d RP |
45 | % printsyms, printpsyms, omitted since they're for GDB maintenance primarily |
46 | % share omitted due to obsolescence | |
d9800dbb | 47 | % set check range/type omitted at least til code is in GDB. |
98088880 | 48 | % |
bca43169 RP |
49 | {% |
50 | \def\$#1${{#1}}% Kluge: collect RCS revision info without $...$ | |
51 | \xdef\manvers{\$Revision$}% | |
d9800dbb RP |
52 | }% |
53 | \input threecol | |
54 | \input rcfonts | |
55 | % | |
bca43169 | 56 | \vsize=8in |
98088880 | 57 | \hyphenpenalty=5000\tolerance=2000\raggedright\raggedbottom |
bca43169 RP |
58 | \normalbaselineskip=9pt\baselineskip=9pt |
59 | % | |
60 | \parindent=0pt | |
61 | \parskip=0pt | |
62 | \footline={\vbox to0pt{\hss}} | |
63 | % | |
64 | \def\ctl#1{{\tt C-#1}} | |
65 | \def\opt#1{{\brm[{\rm #1}]}} | |
66 | \def\xtra#1{\noalign{\smallskip{\tt#1}}} | |
67 | % | |
68 | \long\def\sec#1;#2\endsec{\vskip 1pc | |
69 | \halign{% | |
70 | %COL 1 (of halign): | |
d9800dbb RP |
71 | \vtop{\hsize=1.1in\tt |
72 | ##\par\vskip 2pt }\hfil | |
bca43169 RP |
73 | %COL 2 (of halign): |
74 | &\vtop{\hsize=2.1in\hangafter=1\hangindent=0.5em | |
75 | \rm ##\par\vskip 2pt}\cr | |
76 | %Tail of \long\def fills in halign body with \sec args: | |
77 | \noalign{{\bbf #1}\vskip 2pt} | |
78 | #2 | |
79 | } | |
80 | } | |
81 | ||
d54bd32d | 82 | {\vbbf GDB QUICK REFERENCE}\hfil{\smrm GDB Version 4}\qquad |
98088880 RP |
83 | |
84 | \sec Essential Commands; | |
85 | gdb {\it program} \opt{{\it core}}&debug {\it program} \opt{using | |
86 | coredump {\it core}}\cr | |
98088880 RP |
87 | b \opt{\it file\tt:}{\it function}&set breakpoint at {\it function} \opt{in \it file}\cr |
88 | run \opt{{\it arglist}}&start your program \opt{with {\it arglist}}\cr | |
d9800dbb | 89 | bt& backtrace: display program stack\cr |
98088880 RP |
90 | p {\it expr}&display the value of an expression\cr |
91 | c &continue running your program\cr | |
d9800dbb RP |
92 | n &next line, stepping over function calls\cr |
93 | s &next line, stepping into function calls\cr | |
98088880 | 94 | \endsec |
bca43169 RP |
95 | |
96 | \sec Starting GDB; | |
d54bd32d | 97 | gdb&start GDB, with no debugging files\cr |
bca43169 | 98 | gdb {\it program}&begin debugging {\it program}\cr |
d54bd32d RP |
99 | gdb {\it program core}&debug coredump {\it core} produced by {\it |
100 | program}\cr | |
101 | gdb -help&describe command line options\cr | |
bca43169 RP |
102 | \endsec |
103 | ||
104 | \sec Stopping GDB; | |
98088880 RP |
105 | quit&exit GDB; also {\tt q} or {\tt EOF} (eg \ctl{d})\cr |
106 | INTERRUPT&(eg \ctl{c}) terminate current command, or send to running process\cr | |
bca43169 RP |
107 | \endsec |
108 | ||
109 | \sec Getting Help; | |
98088880 RP |
110 | help&list classes of commands\cr |
111 | help {\it class}&one-line descriptions for commands in {\it class}\cr | |
112 | help {\it command}&describe {\it command}\cr | |
bca43169 RP |
113 | \endsec |
114 | ||
115 | \sec Executing your Program; | |
116 | run {\it arglist}&start your program with {\it arglist}\cr | |
117 | run&start your program with current argument list\cr | |
d54bd32d | 118 | run $\ldots$ <{\it inf} >{\it outf}&start your program with input, output |
bca43169 RP |
119 | redirected\cr |
120 | \cr | |
98088880 | 121 | kill&kill running program\cr |
bca43169 | 122 | \cr |
98088880 | 123 | tty {\it dev}&use {\it dev} as stdin and stdout for next {\tt run}\cr |
bca43169 RP |
124 | set args {\it arglist}&specify {\it arglist} for next |
125 | {\tt run}\cr | |
126 | set args&specify empty argument list\cr | |
127 | show args&display argument list\cr | |
128 | \cr | |
129 | show environment&show all environment variables\cr | |
130 | show env {\it var}&show value of environment variable {\it var}\cr | |
98088880 RP |
131 | set env {\it var} {\it string}&set environment variable {\it var}\cr |
132 | unset env {\it var}&remove {\it var} from environment\cr | |
bca43169 RP |
133 | \endsec |
134 | ||
135 | \sec Shell Commands; | |
98088880 | 136 | cd {\it dir}&change working directory to {\it dir}\cr |
bca43169 | 137 | pwd&Print working directory\cr |
98088880 RP |
138 | make $\ldots$&call ``{\tt make}''\cr |
139 | shell {\it cmd}&execute arbitrary shell command string\cr | |
bca43169 RP |
140 | \endsec |
141 | ||
142 | \vfill | |
d54bd32d RP |
143 | \line{\smrm \opt{ } surround optional arguments \hfil $\ldots$ show |
144 | one or more arguments\rm\qquad} | |
145 | ||
146 | \centerline{\smrm \copyright 1991, 1992 Free Software Foundation, Inc.\qquad Permissions on back} | |
bca43169 RP |
147 | \eject |
148 | \sec Breakpoints and Watchpoints; | |
98088880 RP |
149 | break \opt{\it file\tt:}{\it line}\par |
150 | b \opt{\it file\tt:}{\it line}&set breakpoint at {\it line} number \opt{in \it file}\par | |
bca43169 | 151 | eg:\quad{\tt break main.c:37}\quad\cr |
98088880 RP |
152 | break \opt{\it file\tt:}{\it function}&set breakpoint at {\it |
153 | function} \opt{in \it file}\cr | |
bca43169 | 154 | break +{\it offset}\par |
98088880 RP |
155 | break -{\it offset}&set break at {\it offset} lines from current stop\cr |
156 | break *{\it addr}&set breakpoint at address {\it addr}\cr | |
157 | break&set breakpoint at next instruction\cr | |
158 | break $\ldots$ if {\it expr}&break conditionally on nonzero {\it expr}\cr | |
159 | cond {\it n} \opt{\it expr}&new conditional expression on breakpoint | |
160 | {\it n}; make unconditional if no {\it expr}\cr | |
161 | tbreak $\ldots$&temporary break; disable when reached\cr | |
162 | rbreak {\it regex}&break on all functions matching {\it regex}\cr | |
163 | watch {\it expr}&set a watchpoint for expression {\it expr}\cr | |
164 | catch {\it x}&break at C++ handler for exception {\it x}\cr | |
bca43169 | 165 | \cr |
98088880 RP |
166 | info break&show defined breakpoints\cr |
167 | info watch&show defined watchpoints\cr | |
bca43169 | 168 | \cr |
98088880 RP |
169 | clear&delete breakpoints at next instruction\cr |
170 | clear \opt{\it file\tt:}{\it fun}&delete breakpoints at entry to {\it fun}()\cr | |
171 | clear \opt{\it file\tt:}{\it line}&delete breakpoints on source line \cr | |
d54bd32d RP |
172 | delete \opt{{\it n}}&delete breakpoints |
173 | \opt{or breakpoint {\it n}}\cr | |
174 | \cr | |
175 | disable \opt{{\it n}}&disable breakpoints | |
176 | \opt{or breakpoint {\it n}} | |
177 | \cr | |
178 | enable \opt{{\it n}}&enable breakpoints | |
179 | \opt{or breakpoint {\it n}} | |
180 | \cr | |
181 | enable once \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}}; | |
182 | disable again when reached | |
183 | \cr | |
184 | enable del \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}}; | |
185 | delete when reached | |
bca43169 | 186 | \cr |
bca43169 | 187 | \cr |
98088880 | 188 | ignore {\it n} {\it count}&ignore breakpoint {\it n}, {\it count} |
bca43169 RP |
189 | times\cr |
190 | \cr | |
98088880 | 191 | commands {\it n}\par |
d54bd32d RP |
192 | \qquad \opt{\tt silent}\par |
193 | \qquad {\it command-list}&execute GDB {\it command-list} every time breakpoint {\it n} is reached. \opt{{\tt silent} suppresses default | |
194 | display}\cr | |
195 | end&end of {\it command-list}\cr | |
bca43169 RP |
196 | \endsec |
197 | ||
98088880 RP |
198 | \sec Program Stack; |
199 | backtrace \opt{\it n}\par | |
200 | bt \opt{\it n}&print trace of all frames in stack; or of {\it n} | |
201 | frames---innermost if {\it n}{\tt >0}, outermost if {\it n}{\tt <0}\cr | |
202 | frame \opt{\it n}&select frame number {\it n} or frame at address {\it | |
203 | n}; if no {\it n}, display current frame\cr | |
204 | up {\it n}&select frame {\it n} frames up\cr | |
205 | down {\it n}&select frame {\it n} frames down\cr | |
206 | info frame \opt{\it addr}&describe selected frame, or frame at | |
207 | {\it addr}\cr | |
208 | info args&arguments of selected frame\cr | |
209 | info locals&local variables of selected frame\cr | |
d54bd32d RP |
210 | info reg \opt{\it rn}\par |
211 | info all-reg \opt{\it rn}®ister values \opt{for reg {\it rn\/}} in | |
212 | selected frame; {\tt all-reg} includes floating point\cr | |
98088880 | 213 | info catch&exception handlers active in selected frame\cr |
bca43169 RP |
214 | \endsec |
215 | ||
216 | \vfill\eject | |
217 | \sec Execution Control; | |
218 | continue \opt{\it count}\par | |
98088880 | 219 | c \opt{\it count}&continue running; if {\it count} specified, ignore |
bca43169 RP |
220 | this breakpoint next {\it count} times\cr |
221 | \cr | |
222 | step \opt{\it count}\par | |
98088880 | 223 | s \opt{\it count}&execute until another line reached; repeat {\it count} times if |
bca43169 | 224 | specified\cr |
bca43169 | 225 | stepi \opt{\it count}\par |
98088880 | 226 | si \opt{\it count}&step by machine instructions rather than source |
bca43169 RP |
227 | lines\cr |
228 | \cr | |
229 | next \opt{\it count}\par | |
98088880 | 230 | n \opt{\it count}&execute next line, including any function calls\cr |
bca43169 | 231 | nexti \opt{\it count}\par |
98088880 | 232 | ni \opt{\it count}&next machine instruction rather than source |
bca43169 RP |
233 | line\cr |
234 | \cr | |
98088880 RP |
235 | until \opt{\it location}&run until next instruction (or {\it |
236 | location})\cr | |
237 | finish&run until selected stack frame returns\cr | |
238 | return \opt{\it expr}&pop selected stack frame without executing | |
239 | \opt{setting return value}\cr | |
240 | signal {\it num}&resume execution with signal {\it s} (none if {\tt 0})\cr | |
bca43169 | 241 | jump {\it line}\par |
98088880 | 242 | jump *{\it address}&resume execution at specified {\it line} number or |
bca43169 | 243 | {\it address}\cr |
98088880 | 244 | set var={\it expr}&evaluate {\it expr} without displaying it; use for |
bca43169 RP |
245 | altering program variables\cr |
246 | \endsec | |
247 | ||
98088880 | 248 | \sec Display; |
d54bd32d RP |
249 | print \opt{\tt/{\it f}\/} \opt{\it expr}\par |
250 | p \opt{\tt/{\it f}\/} \opt{\it expr}&show value of {\it expr} \opt{or | |
251 | last value \tt \$} according to format {\it f}:\cr | |
bca43169 RP |
252 | \qquad x&hexadecimal\cr |
253 | \qquad d&signed decimal\cr | |
254 | \qquad u&unsigned decimal\cr | |
255 | \qquad o&octal\cr | |
d54bd32d | 256 | \qquad t&binary\cr |
bca43169 | 257 | \qquad a&address, absolute and relative\cr |
98088880 | 258 | \qquad c&character\cr |
bca43169 | 259 | \qquad f&floating point\cr |
98088880 | 260 | call \opt{\tt /{\it f}\/} {\it expr}&like {\tt print} but does not display |
bca43169 | 261 | {\tt void}\cr |
98088880 RP |
262 | x \opt{\tt/{\it Nuf}\/} {\it expr}&examine memory at address {\it expr}; |
263 | optional format spec follows slash\cr | |
264 | \quad {\it N}&count of how many units to display\cr | |
265 | \quad {\it u}&unit size; one of\cr | |
bca43169 RP |
266 | &{\tt\qquad b}\ individual bytes\cr |
267 | &{\tt\qquad h}\ halfwords (two bytes)\cr | |
268 | &{\tt\qquad w}\ words (four bytes)\cr | |
269 | &{\tt\qquad g}\ giant words (eight bytes)\cr | |
98088880 RP |
270 | \quad {\it f}&printing format. Any {\tt print} format, or\cr |
271 | &{\tt\qquad s}\ null-terminated string\cr | |
272 | &{\tt\qquad i}\ machine instructions\cr | |
d9800dbb | 273 | disassem \opt{\it addr}&display memory as machine instructions\cr |
bca43169 RP |
274 | \endsec |
275 | ||
276 | \sec Automatic Display; | |
98088880 | 277 | display \opt{\tt/\it f\/} {\it expr}&show value of {\it expr} each time |
bca43169 | 278 | program stops \opt{according to format {\it f}\/}\cr |
98088880 RP |
279 | display&display all enabled expressions on list\cr |
280 | undisplay {\it n}&remove number(s) {\it n} from list of | |
bca43169 | 281 | automatically displayed expressions\cr |
d9800dbb | 282 | disable disp {\it n}&disable display for expression(s) number {\it |
98088880 | 283 | n}\cr |
d9800dbb | 284 | enable disp {\it n}&enable display for expression(s) number {\it |
98088880 RP |
285 | n}\cr |
286 | info display&numbered list of display expressions\cr | |
bca43169 RP |
287 | \endsec |
288 | ||
98088880 RP |
289 | \vfill\eject |
290 | ||
291 | \sec Expressions; | |
d9800dbb | 292 | {\it expr}&an expression in C, C++, or Modula-2 (including function calls), or:\cr |
98088880 RP |
293 | {\it addr\/}@{\it len}&an array of {\it len} elements beginning at {\it |
294 | addr}\cr | |
295 | {\it file}::{\it nm}&a variable or function {\it nm} defined in {\it | |
296 | file}\cr | |
297 | $\tt\{${\it type}$\tt\}${\it addr}&read memory at {\it addr} as specified | |
298 | {\it type}\cr | |
299 | \$&most recent displayed value\cr | |
300 | \${\it n}&{\it n}th displayed value\cr | |
301 | \$\$&displayed value previous to \$\cr | |
302 | \$\${\it n}&{\it n}th displayed value back from \$\cr | |
303 | \$\_&last address examined with {\tt x}\cr | |
304 | \$\_\_&value at address \$\_\cr | |
305 | \${\it var}&convenience variable; assign any value\cr | |
306 | \cr | |
307 | show values \opt{{\it n}}&show last 10 values \opt{or surrounding | |
308 | \${\it n}}\cr | |
309 | show convenience&display all convenience variables\cr | |
bca43169 RP |
310 | \endsec |
311 | ||
312 | \sec Symbol Table; | |
98088880 RP |
313 | info address {\it s}&show where symbol {\it s} is stored\cr |
314 | info func \opt{\it regex}&show names, types of defined functions | |
bca43169 | 315 | (all, or matching {\it regex})\cr |
98088880 | 316 | info var \opt{\it regex}&show names, types of global variables (all, |
bca43169 | 317 | or matching {\it regex})\cr |
d54bd32d RP |
318 | whatis \opt{\it expr}\par |
319 | ptype \opt{\it expr}&show data type of {\it expr} \opt{or \tt \$} | |
320 | without evaluating; {\tt ptype} gives more detail\cr | |
98088880 RP |
321 | ptype {\it type}&describe type, struct, union, or enum\cr |
322 | \endsec | |
323 | ||
324 | \sec GDB Scripts; | |
325 | source {\it script}&read, execute GDB commands from file {\it | |
326 | script}\cr | |
327 | \cr | |
328 | define {\it cmd}\par | |
d54bd32d RP |
329 | \qquad {\it command-list}&create new GDB command {\it cmd}; |
330 | execute script defined by {\it command-list}\cr | |
331 | end&end of {\it command-list}\cr | |
98088880 | 332 | document {\it cmd}\par |
d54bd32d RP |
333 | \qquad {\it help-text}&create online documentation |
334 | for new GDB command {\it cmd}\cr | |
335 | end&end of {\it help-text}\cr | |
98088880 RP |
336 | \endsec |
337 | ||
338 | \sec Signals; | |
d9800dbb RP |
339 | handle {\it signal} {\it act}&specify GDB actions for {\it signal}:\cr |
340 | \quad print&announce signal\cr | |
341 | \quad noprint&be silent for signal\cr | |
98088880 RP |
342 | \quad stop&halt execution on signal\cr |
343 | \quad nostop&do not halt execution\cr | |
344 | \quad pass&allow your program to handle signal\cr | |
345 | \quad nopass&do not allow your program to see signal\cr | |
346 | info signals&show table of signals, GDB action for each\cr | |
347 | \endsec | |
348 | ||
349 | \sec Debugging Targets; | |
350 | target {\it type} {\it param}&connect to target machine, process, or file\cr | |
351 | help target&display available targets\cr | |
352 | attach {\it param}&connect to another process\cr | |
353 | detach&release target from GDB control\cr | |
bca43169 RP |
354 | \endsec |
355 | ||
356 | \vfill\eject | |
357 | \sec Controlling GDB; | |
d9800dbb | 358 | set {\it param} {\it value}&set one of GDB's internal parameters\cr |
d54bd32d | 359 | show {\it param}&display current setting of parameter\cr |
bca43169 | 360 | \xtra{\rm Parameters understood by {\tt set} and {\tt show}:} |
98088880 RP |
361 | \quad complaints {\it limit}&number of messages on unusual symbols\cr |
362 | \quad confirm {\it on/off}&enable or disable cautionary queries\cr | |
363 | \quad editing {\it on/off}&control {\tt readline} command-line editing\cr | |
d9800dbb RP |
364 | \quad height {\it lpp}&number of lines before pause in display\cr |
365 | \quad language {\it lang}&Language for GDB expressions ({\tt auto}, {\tt c} or | |
366 | {\tt modula-2})\cr | |
367 | \quad listsize {\it n}&number of lines shown by {\tt list}\cr | |
98088880 RP |
368 | \quad prompt {\it str}&use {\it str} as GDB prompt\cr |
369 | \quad radix {\it base}&octal, decimal, or hex number representation\cr | |
370 | \quad verbose {\it on/off}&control messages when loading | |
d54bd32d | 371 | symbols\cr |
98088880 | 372 | \quad width {\it cpl}&number of characters before line folded\cr |
d9800dbb RP |
373 | \quad write {\it on/off}&Allow or forbid patching binary, core files |
374 | (when reopened with {\tt exec} or {\tt core}) | |
98088880 | 375 | \cr |
d54bd32d RP |
376 | \quad history $\ldots$\par |
377 | \quad h $\ldots$&groups with the following options:\cr | |
378 | \quad h exp {\it off/on}&disable/enable {\tt readline} history expansion\cr | |
98088880 RP |
379 | \quad h file {\it filename}&file for recording GDB command history\cr |
380 | \quad h size {\it size}&number of commands kept in history list\cr | |
381 | \quad h save {\it off/on}&control use of external file for | |
382 | command history\cr | |
383 | \cr | |
d54bd32d RP |
384 | \quad print $\ldots$\par |
385 | \quad p $\ldots$&groups with the following options:\cr | |
98088880 RP |
386 | \quad p address {\it on/off}&print memory addresses in stacks, |
387 | values\cr | |
388 | \quad p array {\it off/on}&compact or attractive format for | |
389 | arrays\cr | |
d9800dbb | 390 | \quad p demangl {\it on/off}&source (demangled) or internal form for C++ |
98088880 RP |
391 | symbols\cr |
392 | \quad p asm-dem {\it on/off}&demangle C++ symbols in | |
393 | machine-instruction output\cr | |
d54bd32d | 394 | \quad p elements {\it limit}&number of array elements to display\cr |
98088880 RP |
395 | \quad p object {\it on/off}&print C++ derived types for objects\cr |
396 | \quad p pretty {\it off/on}&struct display: compact or indented\cr | |
d54bd32d | 397 | \quad p union {\it on/off}&display of union members\cr |
98088880 RP |
398 | \quad p vtbl {\it off/on}&display of C++ virtual function |
399 | tables\cr | |
400 | \cr | |
401 | show commands&show last 10 commands\cr | |
402 | show commands {\it n}&show 10 commands around number {\it n}\cr | |
403 | show commands +&show next 10 commands\cr | |
bca43169 RP |
404 | \endsec |
405 | ||
406 | \sec Working Files; | |
d54bd32d RP |
407 | file \opt{\it file}&use {\it file} for both symbols and executable; |
408 | with no arg, discard both\cr | |
409 | core \opt{\it file}&read {\it file} as coredump; or discard\cr | |
410 | exec \opt{\it file}&use {\it file} as executable only; or discard\cr | |
411 | symbol \opt{\it file}&use symbol table from {\it file}; or discard\cr | |
98088880 RP |
412 | load {\it file}&dynamically link {\it file\/} and add its symbols\cr |
413 | add-sym {\it file} {\it addr}&read additional symbols from {\it file}, | |
bca43169 | 414 | dynamically loaded at {\it addr}\cr |
98088880 RP |
415 | info files&display working files and targets in use\cr |
416 | path {\it dirs}&add {\it dirs} to front of path searched for | |
417 | executable and symbol files\cr | |
d9800dbb | 418 | show path&display executable and symbol file path\cr |
98088880 | 419 | info share&list names of shared libraries currently loaded\cr |
bca43169 RP |
420 | \endsec |
421 | ||
422 | \vfill\eject | |
423 | \sec Source Files; | |
98088880 RP |
424 | dir {\it names}&add directory {\it names} to front of source path\cr |
425 | dir&clear source path\cr | |
426 | show dir&show current source path\cr | |
bca43169 | 427 | \cr |
98088880 RP |
428 | list&show next ten lines of source\cr |
429 | list -&show previous ten lines\cr | |
430 | list {\it lines}&display source centered around {\it lines}, | |
bca43169 | 431 | specified as one of:\cr |
98088880 RP |
432 | \quad{\opt{\it file\tt:}\it num}&line number \opt{in named file}\cr |
433 | \quad{\opt{\it file\tt:}\it function}&beginning of function \opt{in | |
bca43169 RP |
434 | named file}\cr |
435 | \quad{\tt +\it off}&{\it off} lines after last printed\cr | |
436 | \quad{\tt -\it off}&{\it off} lines previous to last printed\cr | |
98088880 | 437 | \quad{\tt*\it address}&line containing {\it address}\cr |
bca43169 | 438 | list {\it f},{\it l}&from line {\it f} to line {\it l}\cr |
98088880 | 439 | info line {\it num}&show starting, ending addresses of compiled code for |
bca43169 | 440 | source line {\it num}\cr |
98088880 RP |
441 | info source&show name of current source file\cr |
442 | info sources&list all source files in use\cr | |
443 | forw {\it regex}&search following source lines for {\it regex}\cr | |
444 | rev {\it regex}&search preceding source lines for {\it regex}\cr | |
bca43169 RP |
445 | \endsec |
446 | ||
447 | \sec GDB under GNU Emacs; | |
98088880 RP |
448 | M-x gdb&run GDB under Emacs\cr |
449 | \ctl{h} m&describe GDB mode\cr | |
450 | M-s&step one line ({\tt step})\cr | |
451 | M-n&next line ({\tt next})\cr | |
452 | M-i&step one instruction ({\tt stepi})\cr | |
453 | \ctl{c} \ctl{f}&finish current stack frame ({\tt finish})\cr | |
454 | M-c&continue ({\tt cont})\cr | |
455 | M-u&up {\it arg} frames ({\tt up})\cr | |
456 | M-d&down {\it arg} frames ({\tt down})\cr | |
457 | \ctl{x} \&© number from point, insert at end\cr | |
bca43169 RP |
458 | \ctl{x} SPC&(in source file) set break at point\cr |
459 | \endsec | |
460 | ||
d9800dbb | 461 | \sec GDB License; |
d54bd32d RP |
462 | show copying&Display GNU General Public License\cr |
463 | show warranty&There is NO WARRANTY for GDB. Display full no-warranty | |
d9800dbb RP |
464 | statement.\cr |
465 | \endsec | |
466 | ||
bca43169 RP |
467 | |
468 | \vfill | |
469 | {\smrm\parskip=6pt | |
d54bd32d RP |
470 | \centerline{Copyright \copyright 1991, 1992 Free Software Foundation, Inc.} |
471 | \centerline{Roland Pesch (pesch@cygnus.com), January 1992---\manvers} | |
98088880 | 472 | \centerline{The author assumes no responsibility for any errors on this card.} |
bca43169 RP |
473 | |
474 | This card may be freely distributed under the terms of the GNU | |
475 | General Public License. | |
476 | ||
d9800dbb RP |
477 | \centerline{Please contribute to development of this card by |
478 | annotating it.} | |
479 | ||
480 | GDB itself is free software; you are welcome to distribute copies of | |
481 | it under the terms of the GNU General Public License. There is | |
482 | absolutely no warranty for GDB. | |
98088880 | 483 | } |
bca43169 | 484 | \end |