]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gdb/gdb/doc/gdb.info-3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gdb / gdb / doc / gdb.info-3
1 This is gdb.info, produced by makeinfo version 4.6 from ./gdb.texinfo.
2
3 INFO-DIR-SECTION Software development
4 START-INFO-DIR-ENTRY
5 * Gdb: (gdb).                     The GNU debugger.
6 END-INFO-DIR-ENTRY
7
8    This file documents the GNU debugger GDB.
9
10    This is the Ninth Edition, of `Debugging with GDB: the GNU
11 Source-Level Debugger' for GDB Version 6.1.1.
12
13    Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
14 1998,
15 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
16
17    Permission is granted to copy, distribute and/or modify this document
18 under the terms of the GNU Free Documentation License, Version 1.1 or
19 any later version published by the Free Software Foundation; with the
20 Invariant Sections being "Free Software" and "Free Software Needs Free
21 Documentation", with the Front-Cover Texts being "A GNU Manual," and
22 with the Back-Cover Texts as in (a) below.
23
24    (a) The Free Software Foundation's Back-Cover Text is: "You have
25 freedom to copy and modify this GNU Manual, like GNU software.  Copies
26 published by the Free Software Foundation raise funds for GNU
27 development."
28
29 \1f
30 File: gdb.info,  Node: Searching,  Prev: Readline Arguments,  Up: Readline Interaction
31
32 Searching for Commands in the History
33 -------------------------------------
34
35 Readline provides commands for searching through the command history
36 for lines containing a specified string.  There are two search modes:
37 "incremental" and "non-incremental".
38
39    Incremental searches begin before the user has finished typing the
40 search string.  As each character of the search string is typed,
41 Readline displays the next entry from the history matching the string
42 typed so far.  An incremental search requires only as many characters
43 as needed to find the desired history entry.  To search backward in the
44 history for a particular string, type `C-r'.  Typing `C-s' searches
45 forward through the history.  The characters present in the value of
46 the `isearch-terminators' variable are used to terminate an incremental
47 search.  If that variable has not been assigned a value, the <ESC> and
48 `C-J' characters will terminate an incremental search.  `C-g' will
49 abort an incremental search and restore the original line.  When the
50 search is terminated, the history entry containing the search string
51 becomes the current line.
52
53    To find other matching entries in the history list, type `C-r' or
54 `C-s' as appropriate.  This will search backward or forward in the
55 history for the next entry matching the search string typed so far.
56 Any other key sequence bound to a Readline command will terminate the
57 search and execute that command.  For instance, a <RET> will terminate
58 the search and accept the line, thereby executing the command from the
59 history list.  A movement command will terminate the search, make the
60 last line found the current line, and begin editing.
61
62    Readline remembers the last incremental search string.  If two
63 `C-r's are typed without any intervening characters defining a new
64 search string, any remembered search string is used.
65
66    Non-incremental searches read the entire search string before
67 starting to search for matching history lines.  The search string may be
68 typed by the user or be part of the contents of the current line.
69
70 \1f
71 File: gdb.info,  Node: Readline Init File,  Next: Bindable Readline Commands,  Prev: Readline Interaction,  Up: Command Line Editing
72
73 Readline Init File
74 ==================
75
76 Although the Readline library comes with a set of Emacs-like
77 keybindings installed by default, it is possible to use a different set
78 of keybindings.  Any user can customize programs that use Readline by
79 putting commands in an "inputrc" file, conventionally in his home
80 directory.  The name of this file is taken from the value of the
81 environment variable `INPUTRC'.  If that variable is unset, the default
82 is `~/.inputrc'.
83
84    When a program which uses the Readline library starts up, the init
85 file is read, and the key bindings are set.
86
87    In addition, the `C-x C-r' command re-reads this init file, thus
88 incorporating any changes that you might have made to it.
89
90 * Menu:
91
92 * Readline Init File Syntax::   Syntax for the commands in the inputrc file.
93
94 * Conditional Init Constructs:: Conditional key bindings in the inputrc file.
95
96 * Sample Init File::            An example inputrc file.
97
98 \1f
99 File: gdb.info,  Node: Readline Init File Syntax,  Next: Conditional Init Constructs,  Up: Readline Init File
100
101 Readline Init File Syntax
102 -------------------------
103
104 There are only a few basic constructs allowed in the Readline init
105 file.  Blank lines are ignored.  Lines beginning with a `#' are
106 comments.  Lines beginning with a `$' indicate conditional constructs
107 (*note Conditional Init Constructs::).  Other lines denote variable
108 settings and key bindings.
109
110 Variable Settings
111      You can modify the run-time behavior of Readline by altering the
112      values of variables in Readline using the `set' command within the
113      init file.  The syntax is simple:
114
115           set VARIABLE VALUE
116
117      Here, for example, is how to change from the default Emacs-like
118      key binding to use `vi' line editing commands:
119
120           set editing-mode vi
121
122      Variable names and values, where appropriate, are recognized
123      without regard to case.
124
125      A great deal of run-time behavior is changeable with the following
126      variables.
127
128     `bell-style'
129           Controls what happens when Readline wants to ring the
130           terminal bell.  If set to `none', Readline never rings the
131           bell.  If set to `visible', Readline uses a visible bell if
132           one is available.  If set to `audible' (the default),
133           Readline attempts to ring the terminal's bell.
134
135     `comment-begin'
136           The string to insert at the beginning of the line when the
137           `insert-comment' command is executed.  The default value is
138           `"#"'.
139
140     `completion-ignore-case'
141           If set to `on', Readline performs filename matching and
142           completion in a case-insensitive fashion.  The default value
143           is `off'.
144
145     `completion-query-items'
146           The number of possible completions that determines when the
147           user is asked whether he wants to see the list of
148           possibilities.  If the number of possible completions is
149           greater than this value, Readline will ask the user whether
150           or not he wishes to view them; otherwise, they are simply
151           listed.  This variable must be set to an integer value
152           greater than or equal to 0.  The default limit is `100'.
153
154     `convert-meta'
155           If set to `on', Readline will convert characters with the
156           eighth bit set to an ASCII key sequence by stripping the
157           eighth bit and prefixing an <ESC> character, converting them
158           to a meta-prefixed key sequence.  The default value is `on'.
159
160     `disable-completion'
161           If set to `On', Readline will inhibit word completion.
162           Completion  characters will be inserted into the line as if
163           they had been mapped to `self-insert'.  The default is `off'.
164
165     `editing-mode'
166           The `editing-mode' variable controls which default set of key
167           bindings is used.  By default, Readline starts up in Emacs
168           editing mode, where the keystrokes are most similar to Emacs.
169           This variable can be set to either `emacs' or `vi'.
170
171     `enable-keypad'
172           When set to `on', Readline will try to enable the application
173           keypad when it is called.  Some systems need this to enable
174           the arrow keys.  The default is `off'.
175
176     `expand-tilde'
177           If set to `on', tilde expansion is performed when Readline
178           attempts word completion.  The default is `off'.
179
180           If set to `on', the history code attempts to place point at
181           the same location on each history line retrived with
182           `previous-history' or `next-history'.
183
184     `horizontal-scroll-mode'
185           This variable can be set to either `on' or `off'.  Setting it
186           to `on' means that the text of the lines being edited will
187           scroll horizontally on a single screen line when they are
188           longer than the width of the screen, instead of wrapping onto
189           a new screen line.  By default, this variable is set to `off'.
190
191     `input-meta'
192           If set to `on', Readline will enable eight-bit input (it will
193           not clear the eighth bit in the characters it reads),
194           regardless of what the terminal claims it can support.  The
195           default value is `off'.  The name `meta-flag' is a synonym
196           for this variable.
197
198     `isearch-terminators'
199           The string of characters that should terminate an incremental
200           search without subsequently executing the character as a
201           command (*note Searching::).  If this variable has not been
202           given a value, the characters <ESC> and `C-J' will terminate
203           an incremental search.
204
205     `keymap'
206           Sets Readline's idea of the current keymap for key binding
207           commands.  Acceptable `keymap' names are `emacs',
208           `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
209           `vi-command', and `vi-insert'.  `vi' is equivalent to
210           `vi-command'; `emacs' is equivalent to `emacs-standard'.  The
211           default value is `emacs'.  The value of the `editing-mode'
212           variable also affects the default keymap.
213
214     `mark-directories'
215           If set to `on', completed directory names have a slash
216           appended.  The default is `on'.
217
218     `mark-modified-lines'
219           This variable, when set to `on', causes Readline to display an
220           asterisk (`*') at the start of history lines which have been
221           modified.  This variable is `off' by default.
222
223     `mark-symlinked-directories'
224           If set to `on', completed names which are symbolic links to
225           directories have a slash appended (subject to the value of
226           `mark-directories').  The default is `off'.
227
228     `match-hidden-files'
229           This variable, when set to `on', causes Readline to match
230           files whose names begin with a `.' (hidden files) when
231           performing filename completion, unless the leading `.' is
232           supplied by the user in the filename to be completed.  This
233           variable is `on' by default.
234
235     `output-meta'
236           If set to `on', Readline will display characters with the
237           eighth bit set directly rather than as a meta-prefixed escape
238           sequence.  The default is `off'.
239
240     `page-completions'
241           If set to `on', Readline uses an internal `more'-like pager
242           to display a screenful of possible completions at a time.
243           This variable is `on' by default.
244
245     `print-completions-horizontally'
246           If set to `on', Readline will display completions with matches
247           sorted horizontally in alphabetical order, rather than down
248           the screen.  The default is `off'.
249
250     `show-all-if-ambiguous'
251           This alters the default behavior of the completion functions.
252           If set to `on', words which have more than one possible
253           completion cause the matches to be listed immediately instead
254           of ringing the bell.  The default value is `off'.
255
256     `visible-stats'
257           If set to `on', a character denoting a file's type is
258           appended to the filename when listing possible completions.
259           The default is `off'.
260
261
262 Key Bindings
263      The syntax for controlling key bindings in the init file is
264      simple.  First you need to find the name of the command that you
265      want to change.  The following sections contain tables of the
266      command name, the default keybinding, if any, and a short
267      description of what the command does.
268
269      Once you know the name of the command, simply place on a line in
270      the init file the name of the key you wish to bind the command to,
271      a colon, and then the name of the command.  The name of the key
272      can be expressed in different ways, depending on what you find most
273      comfortable.
274
275      In addition to command names, readline allows keys to be bound to
276      a string that is inserted when the key is pressed (a MACRO).
277
278     KEYNAME: FUNCTION-NAME or MACRO
279           KEYNAME is the name of a key spelled out in English.  For
280           example:
281                Control-u: universal-argument
282                Meta-Rubout: backward-kill-word
283                Control-o: "> output"
284
285           In the above example, `C-u' is bound to the function
286           `universal-argument', `M-DEL' is bound to the function
287           `backward-kill-word', and `C-o' is bound to run the macro
288           expressed on the right hand side (that is, to insert the text
289           `> output' into the line).
290
291           A number of symbolic character names are recognized while
292           processing this key binding syntax: DEL, ESC, ESCAPE, LFD,
293           NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.
294
295     "KEYSEQ": FUNCTION-NAME or MACRO
296           KEYSEQ differs from KEYNAME above in that strings denoting an
297           entire key sequence can be specified, by placing the key
298           sequence in double quotes.  Some GNU Emacs style key escapes
299           can be used, as in the following example, but the special
300           character names are not recognized.
301
302                "\C-u": universal-argument
303                "\C-x\C-r": re-read-init-file
304                "\e[11~": "Function Key 1"
305
306           In the above example, `C-u' is again bound to the function
307           `universal-argument' (just as it was in the first example),
308           `C-x C-r' is bound to the function `re-read-init-file', and
309           `<ESC> <[> <1> <1> <~>' is bound to insert the text `Function
310           Key 1'.
311
312
313      The following GNU Emacs style escape sequences are available when
314      specifying key sequences:
315
316     `\C-'
317           control prefix
318
319     `\M-'
320           meta prefix
321
322     `\e'
323           an escape character
324
325     `\\'
326           backslash
327
328     `\"'
329           <">, a double quotation mark
330
331     `\''
332           <'>, a single quote or apostrophe
333
334      In addition to the GNU Emacs style escape sequences, a second set
335      of backslash escapes is available:
336
337     `\a'
338           alert (bell)
339
340     `\b'
341           backspace
342
343     `\d'
344           delete
345
346     `\f'
347           form feed
348
349     `\n'
350           newline
351
352     `\r'
353           carriage return
354
355     `\t'
356           horizontal tab
357
358     `\v'
359           vertical tab
360
361     `\NNN'
362           the eight-bit character whose value is the octal value NNN
363           (one to three digits)
364
365     `\xHH'
366           the eight-bit character whose value is the hexadecimal value
367           HH (one or two hex digits)
368
369      When entering the text of a macro, single or double quotes must be
370      used to indicate a macro definition.  Unquoted text is assumed to
371      be a function name.  In the macro body, the backslash escapes
372      described above are expanded.  Backslash will quote any other
373      character in the macro text, including `"' and `''.  For example,
374      the following binding will make `C-x \' insert a single `\' into
375      the line:
376           "\C-x\\": "\\"
377
378
379 \1f
380 File: gdb.info,  Node: Conditional Init Constructs,  Next: Sample Init File,  Prev: Readline Init File Syntax,  Up: Readline Init File
381
382 Conditional Init Constructs
383 ---------------------------
384
385 Readline implements a facility similar in spirit to the conditional
386 compilation features of the C preprocessor which allows key bindings
387 and variable settings to be performed as the result of tests.  There
388 are four parser directives used.
389
390 `$if'
391      The `$if' construct allows bindings to be made based on the
392      editing mode, the terminal being used, or the application using
393      Readline.  The text of the test extends to the end of the line; no
394      characters are required to isolate it.
395
396     `mode'
397           The `mode=' form of the `$if' directive is used to test
398           whether Readline is in `emacs' or `vi' mode.  This may be
399           used in conjunction with the `set keymap' command, for
400           instance, to set bindings in the `emacs-standard' and
401           `emacs-ctlx' keymaps only if Readline is starting out in
402           `emacs' mode.
403
404     `term'
405           The `term=' form may be used to include terminal-specific key
406           bindings, perhaps to bind the key sequences output by the
407           terminal's function keys.  The word on the right side of the
408           `=' is tested against both the full name of the terminal and
409           the portion of the terminal name before the first `-'.  This
410           allows `sun' to match both `sun' and `sun-cmd', for instance.
411
412     `application'
413           The APPLICATION construct is used to include
414           application-specific settings.  Each program using the
415           Readline library sets the APPLICATION NAME, and you can test
416           for a particular value.  This could be used to bind key
417           sequences to functions useful for a specific program.  For
418           instance, the following command adds a key sequence that
419           quotes the current or previous word in Bash:
420                $if Bash
421                # Quote the current or previous word
422                "\C-xq": "\eb\"\ef\""
423                $endif
424
425 `$endif'
426      This command, as seen in the previous example, terminates an `$if'
427      command.
428
429 `$else'
430      Commands in this branch of the `$if' directive are executed if the
431      test fails.
432
433 `$include'
434      This directive takes a single filename as an argument and reads
435      commands and bindings from that file.  For example, the following
436      directive reads from `/etc/inputrc':
437           $include /etc/inputrc
438
439 \1f
440 File: gdb.info,  Node: Sample Init File,  Prev: Conditional Init Constructs,  Up: Readline Init File
441
442 Sample Init File
443 ----------------
444
445 Here is an example of an INPUTRC file.  This illustrates key binding,
446 variable assignment, and conditional syntax.
447
448
449      # This file controls the behaviour of line input editing for
450      # programs that use the GNU Readline library.  Existing
451      # programs include FTP, Bash, and GDB.
452      #
453      # You can re-read the inputrc file with C-x C-r.
454      # Lines beginning with '#' are comments.
455      #
456      # First, include any systemwide bindings and variable
457      # assignments from /etc/Inputrc
458      $include /etc/Inputrc
459      
460      #
461      # Set various bindings for emacs mode.
462      
463      set editing-mode emacs
464      
465      $if mode=emacs
466      
467      Meta-Control-h:    backward-kill-word      Text after the function name is ignored
468      
469      #
470      # Arrow keys in keypad mode
471      #
472      #"\M-OD":        backward-char
473      #"\M-OC":        forward-char
474      #"\M-OA":        previous-history
475      #"\M-OB":        next-history
476      #
477      # Arrow keys in ANSI mode
478      #
479      "\M-[D":        backward-char
480      "\M-[C":        forward-char
481      "\M-[A":        previous-history
482      "\M-[B":        next-history
483      #
484      # Arrow keys in 8 bit keypad mode
485      #
486      #"\M-\C-OD":       backward-char
487      #"\M-\C-OC":       forward-char
488      #"\M-\C-OA":       previous-history
489      #"\M-\C-OB":       next-history
490      #
491      # Arrow keys in 8 bit ANSI mode
492      #
493      #"\M-\C-[D":       backward-char
494      #"\M-\C-[C":       forward-char
495      #"\M-\C-[A":       previous-history
496      #"\M-\C-[B":       next-history
497      
498      C-q: quoted-insert
499      
500      $endif
501      
502      # An old-style binding.  This happens to be the default.
503      TAB: complete
504      
505      # Macros that are convenient for shell interaction
506      $if Bash
507      # edit the path
508      "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
509      # prepare to type a quoted word --
510      # insert open and close double quotes
511      # and move to just after the open quote
512      "\C-x\"": "\"\"\C-b"
513      # insert a backslash (testing backslash escapes
514      # in sequences and macros)
515      "\C-x\\": "\\"
516      # Quote the current or previous word
517      "\C-xq": "\eb\"\ef\""
518      # Add a binding to refresh the line, which is unbound
519      "\C-xr": redraw-current-line
520      # Edit variable on current line.
521      "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
522      $endif
523      
524      # use a visible bell if one is available
525      set bell-style visible
526      
527      # don't strip characters to 7 bits when reading
528      set input-meta on
529      
530      # allow iso-latin1 characters to be inserted rather
531      # than converted to prefix-meta sequences
532      set convert-meta off
533      
534      # display characters with the eighth bit set directly
535      # rather than as meta-prefixed characters
536      set output-meta on
537      
538      # if there are more than 150 possible completions for
539      # a word, ask the user if he wants to see all of them
540      set completion-query-items 150
541      
542      # For FTP
543      $if Ftp
544      "\C-xg": "get \M-?"
545      "\C-xt": "put \M-?"
546      "\M-.": yank-last-arg
547      $endif
548
549 \1f
550 File: gdb.info,  Node: Bindable Readline Commands,  Next: Readline vi Mode,  Prev: Readline Init File,  Up: Command Line Editing
551
552 Bindable Readline Commands
553 ==========================
554
555 * Menu:
556
557 * Commands For Moving::         Moving about the line.
558 * Commands For History::        Getting at previous lines.
559 * Commands For Text::           Commands for changing text.
560 * Commands For Killing::        Commands for killing and yanking.
561 * Numeric Arguments::           Specifying numeric arguments, repeat counts.
562 * Commands For Completion::     Getting Readline to do the typing for you.
563 * Keyboard Macros::             Saving and re-executing typed characters
564 * Miscellaneous Commands::      Other miscellaneous commands.
565
566    This section describes Readline commands that may be bound to key
567 sequences.  Command names without an accompanying key sequence are
568 unbound by default.
569
570    In the following descriptions, "point" refers to the current cursor
571 position, and "mark" refers to a cursor position saved by the
572 `set-mark' command.  The text between the point and mark is referred to
573 as the "region".
574
575 \1f
576 File: gdb.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Bindable Readline Commands
577
578 Commands For Moving
579 -------------------
580
581 `beginning-of-line (C-a)'
582      Move to the start of the current line.
583
584 `end-of-line (C-e)'
585      Move to the end of the line.
586
587 `forward-char (C-f)'
588      Move forward a character.
589
590 `backward-char (C-b)'
591      Move back a character.
592
593 `forward-word (M-f)'
594      Move forward to the end of the next word.  Words are composed of
595      letters and digits.
596
597 `backward-word (M-b)'
598      Move back to the start of the current or previous word.  Words are
599      composed of letters and digits.
600
601 `clear-screen (C-l)'
602      Clear the screen and redraw the current line, leaving the current
603      line at the top of the screen.
604
605 `redraw-current-line ()'
606      Refresh the current line.  By default, this is unbound.
607
608
609 \1f
610 File: gdb.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Bindable Readline Commands
611
612 Commands For Manipulating The History
613 -------------------------------------
614
615 `accept-line (Newline or Return)'
616      Accept the line regardless of where the cursor is.  If this line is
617      non-empty, it may be added to the history list for future recall
618      with `add_history()'.  If this line is a modified history line,
619      the history line is restored to its original state.
620
621 `previous-history (C-p)'
622      Move `back' through the history list, fetching the previous
623      command.
624
625 `next-history (C-n)'
626      Move `forward' through the history list, fetching the next command.
627
628 `beginning-of-history (M-<)'
629      Move to the first line in the history.
630
631 `end-of-history (M->)'
632      Move to the end of the input history, i.e., the line currently
633      being entered.
634
635 `reverse-search-history (C-r)'
636      Search backward starting at the current line and moving `up'
637      through the history as necessary.  This is an incremental search.
638
639 `forward-search-history (C-s)'
640      Search forward starting at the current line and moving `down'
641      through the the history as necessary.  This is an incremental
642      search.
643
644 `non-incremental-reverse-search-history (M-p)'
645      Search backward starting at the current line and moving `up'
646      through the history as necessary using a non-incremental search
647      for a string supplied by the user.
648
649 `non-incremental-forward-search-history (M-n)'
650      Search forward starting at the current line and moving `down'
651      through the the history as necessary using a non-incremental search
652      for a string supplied by the user.
653
654 `history-search-forward ()'
655      Search forward through the history for the string of characters
656      between the start of the current line and the point.  This is a
657      non-incremental search.  By default, this command is unbound.
658
659 `history-search-backward ()'
660      Search backward through the history for the string of characters
661      between the start of the current line and the point.  This is a
662      non-incremental search.  By default, this command is unbound.
663
664 `yank-nth-arg (M-C-y)'
665      Insert the first argument to the previous command (usually the
666      second word on the previous line) at point.  With an argument N,
667      insert the Nth word from the previous command (the words in the
668      previous command begin with word 0).  A negative argument inserts
669      the Nth word from the end of the previous command.
670
671 `yank-last-arg (M-. or M-_)'
672      Insert last argument to the previous command (the last word of the
673      previous history entry).  With an argument, behave exactly like
674      `yank-nth-arg'.  Successive calls to `yank-last-arg' move back
675      through the history list, inserting the last argument of each line
676      in turn.
677
678
679 \1f
680 File: gdb.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Bindable Readline Commands
681
682 Commands For Changing Text
683 --------------------------
684
685 `delete-char (C-d)'
686      Delete the character at point.  If point is at the beginning of
687      the line, there are no characters in the line, and the last
688      character typed was not bound to `delete-char', then return EOF.
689
690 `backward-delete-char (Rubout)'
691      Delete the character behind the cursor.  A numeric argument means
692      to kill the characters instead of deleting them.
693
694 `forward-backward-delete-char ()'
695      Delete the character under the cursor, unless the cursor is at the
696      end of the line, in which case the character behind the cursor is
697      deleted.  By default, this is not bound to a key.
698
699 `quoted-insert (C-q or C-v)'
700      Add the next character typed to the line verbatim.  This is how to
701      insert key sequences like `C-q', for example.
702
703 `tab-insert (M-<TAB>)'
704      Insert a tab character.
705
706 `self-insert (a, b, A, 1, !, ...)'
707      Insert yourself.
708
709 `transpose-chars (C-t)'
710      Drag the character before the cursor forward over the character at
711      the cursor, moving the cursor forward as well.  If the insertion
712      point is at the end of the line, then this transposes the last two
713      characters of the line.  Negative arguments have no effect.
714
715 `transpose-words (M-t)'
716      Drag the word before point past the word after point, moving point
717      past that word as well.  If the insertion point is at the end of
718      the line, this transposes the last two words on the line.
719
720 `upcase-word (M-u)'
721      Uppercase the current (or following) word.  With a negative
722      argument, uppercase the previous word, but do not move the cursor.
723
724 `downcase-word (M-l)'
725      Lowercase the current (or following) word.  With a negative
726      argument, lowercase the previous word, but do not move the cursor.
727
728 `capitalize-word (M-c)'
729      Capitalize the current (or following) word.  With a negative
730      argument, capitalize the previous word, but do not move the cursor.
731
732 `overwrite-mode ()'
733      Toggle overwrite mode.  With an explicit positive numeric argument,
734      switches to overwrite mode.  With an explicit non-positive numeric
735      argument, switches to insert mode.  This command affects only
736      `emacs' mode; `vi' mode does overwrite differently.  Each call to
737      `readline()' starts in insert mode.
738
739      In overwrite mode, characters bound to `self-insert' replace the
740      text at point rather than pushing the text to the right.
741      Characters bound to `backward-delete-char' replace the character
742      before point with a space.
743
744      By default, this command is unbound.
745
746
747 \1f
748 File: gdb.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Bindable Readline Commands
749
750 Killing And Yanking
751 -------------------
752
753 `kill-line (C-k)'
754      Kill the text from point to the end of the line.
755
756 `backward-kill-line (C-x Rubout)'
757      Kill backward to the beginning of the line.
758
759 `unix-line-discard (C-u)'
760      Kill backward from the cursor to the beginning of the current line.
761
762 `kill-whole-line ()'
763      Kill all characters on the current line, no matter where point is.
764      By default, this is unbound.
765
766 `kill-word (M-d)'
767      Kill from point to the end of the current word, or if between
768      words, to the end of the next word.  Word boundaries are the same
769      as `forward-word'.
770
771 `backward-kill-word (M-<DEL>)'
772      Kill the word behind point.  Word boundaries are the same as
773      `backward-word'.
774
775 `unix-word-rubout (C-w)'
776      Kill the word behind point, using white space as a word boundary.
777      The killed text is saved on the kill-ring.
778
779 `delete-horizontal-space ()'
780      Delete all spaces and tabs around point.  By default, this is
781      unbound.
782
783 `kill-region ()'
784      Kill the text in the current region.  By default, this command is
785      unbound.
786
787 `copy-region-as-kill ()'
788      Copy the text in the region to the kill buffer, so it can be yanked
789      right away.  By default, this command is unbound.
790
791 `copy-backward-word ()'
792      Copy the word before point to the kill buffer.  The word
793      boundaries are the same as `backward-word'.  By default, this
794      command is unbound.
795
796 `copy-forward-word ()'
797      Copy the word following point to the kill buffer.  The word
798      boundaries are the same as `forward-word'.  By default, this
799      command is unbound.
800
801 `yank (C-y)'
802      Yank the top of the kill ring into the buffer at point.
803
804 `yank-pop (M-y)'
805      Rotate the kill-ring, and yank the new top.  You can only do this
806      if the prior command is `yank' or `yank-pop'.
807
808 \1f
809 File: gdb.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Bindable Readline Commands
810
811 Specifying Numeric Arguments
812 ----------------------------
813
814 `digit-argument (M-0, M-1, ... M--)'
815      Add this digit to the argument already accumulating, or start a new
816      argument.  `M--' starts a negative argument.
817
818 `universal-argument ()'
819      This is another way to specify an argument.  If this command is
820      followed by one or more digits, optionally with a leading minus
821      sign, those digits define the argument.  If the command is
822      followed by digits, executing `universal-argument' again ends the
823      numeric argument, but is otherwise ignored.  As a special case, if
824      this command is immediately followed by a character that is
825      neither a digit or minus sign, the argument count for the next
826      command is multiplied by four.  The argument count is initially
827      one, so executing this function the first time makes the argument
828      count four, a second time makes the argument count sixteen, and so
829      on.  By default, this is not bound to a key.
830
831 \1f
832 File: gdb.info,  Node: Commands For Completion,  Next: Keyboard Macros,  Prev: Numeric Arguments,  Up: Bindable Readline Commands
833
834 Letting Readline Type For You
835 -----------------------------
836
837 `complete (<TAB>)'
838      Attempt to perform completion on the text before point.  The
839      actual completion performed is application-specific.  The default
840      is filename completion.
841
842 `possible-completions (M-?)'
843      List the possible completions of the text before point.
844
845 `insert-completions (M-*)'
846      Insert all completions of the text before point that would have
847      been generated by `possible-completions'.
848
849 `menu-complete ()'
850      Similar to `complete', but replaces the word to be completed with
851      a single match from the list of possible completions.  Repeated
852      execution of `menu-complete' steps through the list of possible
853      completions, inserting each match in turn.  At the end of the list
854      of completions, the bell is rung (subject to the setting of
855      `bell-style') and the original text is restored.  An argument of N
856      moves N positions forward in the list of matches; a negative
857      argument may be used to move backward through the list.  This
858      command is intended to be bound to <TAB>, but is unbound by
859      default.
860
861 `delete-char-or-list ()'
862      Deletes the character under the cursor if not at the beginning or
863      end of the line (like `delete-char').  If at the end of the line,
864      behaves identically to `possible-completions'.  This command is
865      unbound by default.
866
867
868 \1f
869 File: gdb.info,  Node: Keyboard Macros,  Next: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Bindable Readline Commands
870
871 Keyboard Macros
872 ---------------
873
874 `start-kbd-macro (C-x ()'
875      Begin saving the characters typed into the current keyboard macro.
876
877 `end-kbd-macro (C-x ))'
878      Stop saving the characters typed into the current keyboard macro
879      and save the definition.
880
881 `call-last-kbd-macro (C-x e)'
882      Re-execute the last keyboard macro defined, by making the
883      characters in the macro appear as if typed at the keyboard.
884
885
886 \1f
887 File: gdb.info,  Node: Miscellaneous Commands,  Prev: Keyboard Macros,  Up: Bindable Readline Commands
888
889 Some Miscellaneous Commands
890 ---------------------------
891
892 `re-read-init-file (C-x C-r)'
893      Read in the contents of the INPUTRC file, and incorporate any
894      bindings or variable assignments found there.
895
896 `abort (C-g)'
897      Abort the current editing command and ring the terminal's bell
898      (subject to the setting of `bell-style').
899
900 `do-uppercase-version (M-a, M-b, M-X, ...)'
901      If the metafied character X is lowercase, run the command that is
902      bound to the corresponding uppercase character.
903
904 `prefix-meta (<ESC>)'
905      Metafy the next character typed.  This is for keyboards without a
906      meta key.  Typing `<ESC> f' is equivalent to typing `M-f'.
907
908 `undo (C-_ or C-x C-u)'
909      Incremental undo, separately remembered for each line.
910
911 `revert-line (M-r)'
912      Undo all changes made to this line.  This is like executing the
913      `undo' command enough times to get back to the beginning.
914
915 `tilde-expand (M-~)'
916      Perform tilde expansion on the current word.
917
918 `set-mark (C-@)'
919      Set the mark to the point.  If a numeric argument is supplied, the
920      mark is set to that position.
921
922 `exchange-point-and-mark (C-x C-x)'
923      Swap the point with the mark.  The current cursor position is set
924      to the saved position, and the old cursor position is saved as the
925      mark.
926
927 `character-search (C-])'
928      A character is read and point is moved to the next occurrence of
929      that character.  A negative count searches for previous
930      occurrences.
931
932 `character-search-backward (M-C-])'
933      A character is read and point is moved to the previous occurrence
934      of that character.  A negative count searches for subsequent
935      occurrences.
936
937 `insert-comment (M-#)'
938      Without a numeric argument, the value of the `comment-begin'
939      variable is inserted at the beginning of the current line.  If a
940      numeric argument is supplied, this command acts as a toggle:  if
941      the characters at the beginning of the line do not match the value
942      of `comment-begin', the value is inserted, otherwise the
943      characters in `comment-begin' are deleted from the beginning of
944      the line.  In either case, the line is accepted as if a newline
945      had been typed.
946
947 `dump-functions ()'
948      Print all of the functions and their key bindings to the Readline
949      output stream.  If a numeric argument is supplied, the output is
950      formatted in such a way that it can be made part of an INPUTRC
951      file.  This command is unbound by default.
952
953 `dump-variables ()'
954      Print all of the settable variables and their values to the
955      Readline output stream.  If a numeric argument is supplied, the
956      output is formatted in such a way that it can be made part of an
957      INPUTRC file.  This command is unbound by default.
958
959 `dump-macros ()'
960      Print all of the Readline key sequences bound to macros and the
961      strings they output.  If a numeric argument is supplied, the
962      output is formatted in such a way that it can be made part of an
963      INPUTRC file.  This command is unbound by default.
964
965 `emacs-editing-mode (C-e)'
966      When in `vi' command mode, this causes a switch to `emacs' editing
967      mode.
968
969 `vi-editing-mode (M-C-j)'
970      When in `emacs' editing mode, this causes a switch to `vi' editing
971      mode.
972
973
974 \1f
975 File: gdb.info,  Node: Readline vi Mode,  Prev: Bindable Readline Commands,  Up: Command Line Editing
976
977 Readline vi Mode
978 ================
979
980 While the Readline library does not have a full set of `vi' editing
981 functions, it does contain enough to allow simple editing of the line.
982 The Readline `vi' mode behaves as specified in the POSIX 1003.2
983 standard.
984
985    In order to switch interactively between `emacs' and `vi' editing
986 modes, use the command `M-C-j' (bound to emacs-editing-mode when in
987 `vi' mode and to vi-editing-mode in `emacs' mode).  The Readline
988 default is `emacs' mode.
989
990    When you enter a line in `vi' mode, you are already placed in
991 `insertion' mode, as if you had typed an `i'.  Pressing <ESC> switches
992 you into `command' mode, where you can edit the text of the line with
993 the standard `vi' movement keys, move to previous history lines with
994 `k' and subsequent lines with `j', and so forth.
995
996 \1f
997 File: gdb.info,  Node: Using History Interactively,  Next: Installing GDB,  Prev: Command Line Editing,  Up: Top
998
999 Using History Interactively
1000 ***************************
1001
1002 This chapter describes how to use the GNU History Library interactively,
1003 from a user's standpoint.  It should be considered a user's guide.
1004
1005 * Menu:
1006
1007 * History Interaction::         What it feels like using History as a user.
1008
1009 \1f
1010 File: gdb.info,  Node: History Interaction,  Up: Using History Interactively
1011
1012 History Expansion
1013 =================
1014
1015 The History library provides a history expansion feature that is similar
1016 to the history expansion provided by `csh'.  This section describes the
1017 syntax used to manipulate the history information.
1018
1019    History expansions introduce words from the history list into the
1020 input stream, making it easy to repeat commands, insert the arguments
1021 to a previous command into the current input line, or fix errors in
1022 previous commands quickly.
1023
1024    History expansion takes place in two parts.  The first is to
1025 determine which line from the history list should be used during
1026 substitution.  The second is to select portions of that line for
1027 inclusion into the current one.  The line selected from the history is
1028 called the "event", and the portions of that line that are acted upon
1029 are called "words".  Various "modifiers" are available to manipulate
1030 the selected words.  The line is broken into words in the same fashion
1031 that Bash does, so that several words surrounded by quotes are
1032 considered one word.  History expansions are introduced by the
1033 appearance of the history expansion character, which is `!' by default.
1034
1035 * Menu:
1036
1037 * Event Designators::   How to specify which history line to use.
1038 * Word Designators::    Specifying which words are of interest.
1039 * Modifiers::           Modifying the results of substitution.
1040
1041 \1f
1042 File: gdb.info,  Node: Event Designators,  Next: Word Designators,  Up: History Interaction
1043
1044 Event Designators
1045 -----------------
1046
1047 An event designator is a reference to a command line entry in the
1048 history list.
1049
1050 `!'
1051      Start a history substitution, except when followed by a space, tab,
1052      the end of the line, `=' or `('.
1053
1054 `!N'
1055      Refer to command line N.
1056
1057 `!-N'
1058      Refer to the command N lines back.
1059
1060 `!!'
1061      Refer to the previous command.  This is a synonym for `!-1'.
1062
1063 `!STRING'
1064      Refer to the most recent command starting with STRING.
1065
1066 `!?STRING[?]'
1067      Refer to the most recent command containing STRING.  The trailing
1068      `?' may be omitted if the STRING is followed immediately by a
1069      newline.
1070
1071 `^STRING1^STRING2^'
1072      Quick Substitution.  Repeat the last command, replacing STRING1
1073      with STRING2.  Equivalent to `!!:s/STRING1/STRING2/'.
1074
1075 `!#'
1076      The entire command line typed so far.
1077
1078
1079 \1f
1080 File: gdb.info,  Node: Word Designators,  Next: Modifiers,  Prev: Event Designators,  Up: History Interaction
1081
1082 Word Designators
1083 ----------------
1084
1085 Word designators are used to select desired words from the event.  A
1086 `:' separates the event specification from the word designator.  It may
1087 be omitted if the word designator begins with a `^', `$', `*', `-', or
1088 `%'.  Words are numbered from the beginning of the line, with the first
1089 word being denoted by 0 (zero).  Words are inserted into the current
1090 line separated by single spaces.
1091
1092    For example,
1093
1094 `!!'
1095      designates the preceding command.  When you type this, the
1096      preceding command is repeated in toto.
1097
1098 `!!:$'
1099      designates the last argument of the preceding command.  This may be
1100      shortened to `!$'.
1101
1102 `!fi:2'
1103      designates the second argument of the most recent command starting
1104      with the letters `fi'.
1105
1106    Here are the word designators:
1107
1108 `0 (zero)'
1109      The `0'th word.  For many applications, this is the command word.
1110
1111 `N'
1112      The Nth word.
1113
1114 `^'
1115      The first argument; that is, word 1.
1116
1117 `$'
1118      The last argument.
1119
1120 `%'
1121      The word matched by the most recent `?STRING?' search.
1122
1123 `X-Y'
1124      A range of words; `-Y' abbreviates `0-Y'.
1125
1126 `*'
1127      All of the words, except the `0'th.  This is a synonym for `1-$'.
1128      It is not an error to use `*' if there is just one word in the
1129      event; the empty string is returned in that case.
1130
1131 `X*'
1132      Abbreviates `X-$'
1133
1134 `X-'
1135      Abbreviates `X-$' like `X*', but omits the last word.
1136
1137
1138    If a word designator is supplied without an event specification, the
1139 previous command is used as the event.
1140
1141 \1f
1142 File: gdb.info,  Node: Modifiers,  Prev: Word Designators,  Up: History Interaction
1143
1144 Modifiers
1145 ---------
1146
1147 After the optional word designator, you can add a sequence of one or
1148 more of the following modifiers, each preceded by a `:'.
1149
1150 `h'
1151      Remove a trailing pathname component, leaving only the head.
1152
1153 `t'
1154      Remove all leading  pathname  components, leaving the tail.
1155
1156 `r'
1157      Remove a trailing suffix of the form `.SUFFIX', leaving the
1158      basename.
1159
1160 `e'
1161      Remove all but the trailing suffix.
1162
1163 `p'
1164      Print the new command but do not execute it.
1165
1166 `s/OLD/NEW/'
1167      Substitute NEW for the first occurrence of OLD in the event line.
1168      Any delimiter may be used in place of `/'.  The delimiter may be
1169      quoted in OLD and NEW with a single backslash.  If `&' appears in
1170      NEW, it is replaced by OLD.  A single backslash will quote the
1171      `&'.  The final delimiter is optional if it is the last character
1172      on the input line.
1173
1174 `&'
1175      Repeat the previous substitution.
1176
1177 `g'
1178      Cause changes to be applied over the entire event line.  Used in
1179      conjunction with `s', as in `gs/OLD/NEW/', or with `&'.
1180
1181
1182 \1f
1183 File: gdb.info,  Node: Formatting Documentation,  Next: Command Line Editing,  Prev: GDB Bugs,  Up: Top
1184
1185 Formatting Documentation
1186 ************************
1187
1188 The GDB 4 release includes an already-formatted reference card, ready
1189 for printing with PostScript or Ghostscript, in the `gdb' subdirectory
1190 of the main source directory(1).  If you can use PostScript or
1191 Ghostscript with your printer, you can print the reference card
1192 immediately with `refcard.ps'.
1193
1194    The release also includes the source for the reference card.  You
1195 can format it, using TeX, by typing:
1196
1197      make refcard.dvi
1198
1199    The GDB reference card is designed to print in "landscape" mode on
1200 US "letter" size paper; that is, on a sheet 11 inches wide by 8.5 inches
1201 high.  You will need to specify this form of printing as an option to
1202 your DVI output program.
1203
1204    All the documentation for GDB comes as part of the machine-readable
1205 distribution.  The documentation is written in Texinfo format, which is
1206 a documentation system that uses a single source file to produce both
1207 on-line information and a printed manual.  You can use one of the Info
1208 formatting commands to create the on-line version of the documentation
1209 and TeX (or `texi2roff') to typeset the printed version.
1210
1211    GDB includes an already formatted copy of the on-line Info version
1212 of this manual in the `gdb' subdirectory.  The main Info file is
1213 `gdb-6.1.1/gdb/gdb.info', and it refers to subordinate files matching
1214 `gdb.info*' in the same directory.  If necessary, you can print out
1215 these files, or read them with any editor; but they are easier to read
1216 using the `info' subsystem in GNU Emacs or the standalone `info'
1217 program, available as part of the GNU Texinfo distribution.
1218
1219    If you want to format these Info files yourself, you need one of the
1220 Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
1221
1222    If you have `makeinfo' installed, and are in the top level GDB
1223 source directory (`gdb-6.1.1', in the case of version 6.1.1), you can
1224 make the Info file by typing:
1225
1226      cd gdb
1227      make gdb.info
1228
1229    If you want to typeset and print copies of this manual, you need TeX,
1230 a program to print its DVI output files, and `texinfo.tex', the Texinfo
1231 definitions file.
1232
1233    TeX is a typesetting program; it does not print files directly, but
1234 produces output files called DVI files.  To print a typeset document,
1235 you need a program to print DVI files.  If your system has TeX
1236 installed, chances are it has such a program.  The precise command to
1237 use depends on your system; `lpr -d' is common; another (for PostScript
1238 devices) is `dvips'.  The DVI print command may require a file name
1239 without any extension or a `.dvi' extension.
1240
1241    TeX also requires a macro definitions file called `texinfo.tex'.
1242 This file tells TeX how to typeset a document written in Texinfo
1243 format.  On its own, TeX cannot either read or typeset a Texinfo file.
1244 `texinfo.tex' is distributed with GDB and is located in the
1245 `gdb-VERSION-NUMBER/texinfo' directory.
1246
1247    If you have TeX and a DVI printer program installed, you can typeset
1248 and print this manual.  First switch to the the `gdb' subdirectory of
1249 the main source directory (for example, to `gdb-6.1.1/gdb') and type:
1250
1251      make gdb.dvi
1252
1253    Then give `gdb.dvi' to your DVI printing program.
1254
1255    ---------- Footnotes ----------
1256
1257    (1) In `gdb-6.1.1/gdb/refcard.ps' of the version 6.1.1 release.
1258
1259 \1f
1260 File: gdb.info,  Node: Installing GDB,  Next: Maintenance Commands,  Prev: Using History Interactively,  Up: Top
1261
1262 Installing GDB
1263 **************
1264
1265 GDB comes with a `configure' script that automates the process of
1266 preparing GDB for installation; you can then use `make' to build the
1267 `gdb' program.
1268
1269    The GDB distribution includes all the source code you need for GDB
1270 in a single directory, whose name is usually composed by appending the
1271 version number to `gdb'.
1272
1273    For example, the GDB version 6.1.1 distribution is in the
1274 `gdb-6.1.1' directory.  That directory contains:
1275
1276 `gdb-6.1.1/configure (and supporting files)'
1277      script for configuring GDB and all its supporting libraries
1278
1279 `gdb-6.1.1/gdb'
1280      the source specific to GDB itself
1281
1282 `gdb-6.1.1/bfd'
1283      source for the Binary File Descriptor library
1284
1285 `gdb-6.1.1/include'
1286      GNU include files
1287
1288 `gdb-6.1.1/libiberty'
1289      source for the `-liberty' free software library
1290
1291 `gdb-6.1.1/opcodes'
1292      source for the library of opcode tables and disassemblers
1293
1294 `gdb-6.1.1/readline'
1295      source for the GNU command-line interface
1296
1297 `gdb-6.1.1/glob'
1298      source for the GNU filename pattern-matching subroutine
1299
1300 `gdb-6.1.1/mmalloc'
1301      source for the GNU memory-mapped malloc package
1302
1303    The simplest way to configure and build GDB is to run `configure'
1304 from the `gdb-VERSION-NUMBER' source directory, which in this example
1305 is the `gdb-6.1.1' directory.
1306
1307    First switch to the `gdb-VERSION-NUMBER' source directory if you are
1308 not already in it; then run `configure'.  Pass the identifier for the
1309 platform on which GDB will run as an argument.
1310
1311    For example:
1312
1313      cd gdb-6.1.1
1314      ./configure HOST
1315      make
1316
1317 where HOST is an identifier such as `sun4' or `decstation', that
1318 identifies the platform where GDB will run.  (You can often leave off
1319 HOST; `configure' tries to guess the correct value by examining your
1320 system.)
1321
1322    Running `configure HOST' and then running `make' builds the `bfd',
1323 `readline', `mmalloc', and `libiberty' libraries, then `gdb' itself.
1324 The configured source files, and the binaries, are left in the
1325 corresponding source directories.
1326
1327    `configure' is a Bourne-shell (`/bin/sh') script; if your system
1328 does not recognize this automatically when you run a different shell,
1329 you may need to run `sh' on it explicitly:
1330
1331      sh configure HOST
1332
1333    If you run `configure' from a directory that contains source
1334 directories for multiple libraries or programs, such as the `gdb-6.1.1'
1335 source directory for version 6.1.1, `configure' creates configuration
1336 files for every directory level underneath (unless you tell it not to,
1337 with the `--norecursion' option).
1338
1339    You should run the `configure' script from the top directory in the
1340 source tree, the `gdb-VERSION-NUMBER' directory.  If you run
1341 `configure' from one of the subdirectories, you will configure only
1342 that subdirectory.  That is usually not what you want.  In particular,
1343 if you run the first `configure' from the `gdb' subdirectory of the
1344 `gdb-VERSION-NUMBER' directory, you will omit the configuration of
1345 `bfd', `readline', and other sibling directories of the `gdb'
1346 subdirectory.  This leads to build errors about missing include files
1347 such as `bfd/bfd.h'.
1348
1349    You can install `gdb' anywhere; it has no hardwired paths.  However,
1350 you should make sure that the shell on your path (named by the `SHELL'
1351 environment variable) is publicly readable.  Remember that GDB uses the
1352 shell to start your program--some systems refuse to let GDB debug child
1353 processes whose programs are not readable.
1354
1355 * Menu:
1356
1357 * Separate Objdir::             Compiling GDB in another directory
1358 * Config Names::                Specifying names for hosts and targets
1359 * Configure Options::           Summary of options for configure
1360
1361 \1f
1362 File: gdb.info,  Node: Separate Objdir,  Next: Config Names,  Up: Installing GDB
1363
1364 Compiling GDB in another directory
1365 ==================================
1366
1367 If you want to run GDB versions for several host or target machines,
1368 you need a different `gdb' compiled for each combination of host and
1369 target.  `configure' is designed to make this easy by allowing you to
1370 generate each configuration in a separate subdirectory, rather than in
1371 the source directory.  If your `make' program handles the `VPATH'
1372 feature (GNU `make' does), running `make' in each of these directories
1373 builds the `gdb' program specified there.
1374
1375    To build `gdb' in a separate directory, run `configure' with the
1376 `--srcdir' option to specify where to find the source.  (You also need
1377 to specify a path to find `configure' itself from your working
1378 directory.  If the path to `configure' would be the same as the
1379 argument to `--srcdir', you can leave out the `--srcdir' option; it is
1380 assumed.)
1381
1382    For example, with version 6.1.1, you can build GDB in a separate
1383 directory for a Sun 4 like this:
1384
1385      cd gdb-6.1.1
1386      mkdir ../gdb-sun4
1387      cd ../gdb-sun4
1388      ../gdb-6.1.1/configure sun4
1389      make
1390
1391    When `configure' builds a configuration using a remote source
1392 directory, it creates a tree for the binaries with the same structure
1393 (and using the same names) as the tree under the source directory.  In
1394 the example, you'd find the Sun 4 library `libiberty.a' in the
1395 directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
1396
1397    Make sure that your path to the `configure' script has just one
1398 instance of `gdb' in it.  If your path to `configure' looks like
1399 `../gdb-6.1.1/gdb/configure', you are configuring only one subdirectory
1400 of GDB, not the whole package.  This leads to build errors about
1401 missing include files such as `bfd/bfd.h'.
1402
1403    One popular reason to build several GDB configurations in separate
1404 directories is to configure GDB for cross-compiling (where GDB runs on
1405 one machine--the "host"--while debugging programs that run on another
1406 machine--the "target").  You specify a cross-debugging target by giving
1407 the `--target=TARGET' option to `configure'.
1408
1409    When you run `make' to build a program or library, you must run it
1410 in a configured directory--whatever directory you were in when you
1411 called `configure' (or one of its subdirectories).
1412
1413    The `Makefile' that `configure' generates in each source directory
1414 also runs recursively.  If you type `make' in a source directory such
1415 as `gdb-6.1.1' (or in a separate configured directory configured with
1416 `--srcdir=DIRNAME/gdb-6.1.1'), you will build all the required
1417 libraries, and then build GDB.
1418
1419    When you have multiple hosts or targets configured in separate
1420 directories, you can run `make' on them in parallel (for example, if
1421 they are NFS-mounted on each of the hosts); they will not interfere
1422 with each other.
1423
1424 \1f
1425 File: gdb.info,  Node: Config Names,  Next: Configure Options,  Prev: Separate Objdir,  Up: Installing GDB
1426
1427 Specifying names for hosts and targets
1428 ======================================
1429
1430 The specifications used for hosts and targets in the `configure' script
1431 are based on a three-part naming scheme, but some short predefined
1432 aliases are also supported.  The full naming scheme encodes three pieces
1433 of information in the following pattern:
1434
1435      ARCHITECTURE-VENDOR-OS
1436
1437    For example, you can use the alias `sun4' as a HOST argument, or as
1438 the value for TARGET in a `--target=TARGET' option.  The equivalent
1439 full name is `sparc-sun-sunos4'.
1440
1441    The `configure' script accompanying GDB does not provide any query
1442 facility to list all supported host and target names or aliases.
1443 `configure' calls the Bourne shell script `config.sub' to map
1444 abbreviations to full names; you can read the script, if you wish, or
1445 you can use it to test your guesses on abbreviations--for example:
1446
1447      % sh config.sub i386-linux
1448      i386-pc-linux-gnu
1449      % sh config.sub alpha-linux
1450      alpha-unknown-linux-gnu
1451      % sh config.sub hp9k700
1452      hppa1.1-hp-hpux
1453      % sh config.sub sun4
1454      sparc-sun-sunos4.1.1
1455      % sh config.sub sun3
1456      m68k-sun-sunos4.1.1
1457      % sh config.sub i986v
1458      Invalid configuration `i986v': machine `i986v' not recognized
1459
1460 `config.sub' is also distributed in the GDB source directory
1461 (`gdb-6.1.1', for version 6.1.1).
1462
1463 \1f
1464 File: gdb.info,  Node: Configure Options,  Prev: Config Names,  Up: Installing GDB
1465
1466 `configure' options
1467 ===================
1468
1469 Here is a summary of the `configure' options and arguments that are
1470 most often useful for building GDB.  `configure' also has several other
1471 options not listed here.  *note (configure.info)What Configure Does::,
1472 for a full explanation of `configure'.
1473
1474      configure [--help]
1475                [--prefix=DIR]
1476                [--exec-prefix=DIR]
1477                [--srcdir=DIRNAME]
1478                [--norecursion] [--rm]
1479                [--target=TARGET]
1480                HOST
1481
1482 You may introduce options with a single `-' rather than `--' if you
1483 prefer; but you may abbreviate option names if you use `--'.
1484
1485 `--help'
1486      Display a quick summary of how to invoke `configure'.
1487
1488 `--prefix=DIR'
1489      Configure the source to install programs and files under directory
1490      `DIR'.
1491
1492 `--exec-prefix=DIR'
1493      Configure the source to install programs under directory `DIR'.
1494
1495 `--srcdir=DIRNAME'
1496      *Warning: using this option requires GNU `make', or another `make'
1497      that implements the `VPATH' feature.*
1498      Use this option to make configurations in directories separate
1499      from the GDB source directories.  Among other things, you can use
1500      this to build (or maintain) several configurations simultaneously,
1501      in separate directories.  `configure' writes configuration
1502      specific files in the current directory, but arranges for them to
1503      use the source in the directory DIRNAME.  `configure' creates
1504      directories under the working directory in parallel to the source
1505      directories below DIRNAME.
1506
1507 `--norecursion'
1508      Configure only the directory level where `configure' is executed;
1509      do not propagate configuration to subdirectories.
1510
1511 `--target=TARGET'
1512      Configure GDB for cross-debugging programs running on the specified
1513      TARGET.  Without this option, GDB is configured to debug programs
1514      that run on the same machine (HOST) as GDB itself.
1515
1516      There is no convenient way to generate a list of all available
1517      targets.
1518
1519 `HOST ...'
1520      Configure GDB to run on the specified HOST.
1521
1522      There is no convenient way to generate a list of all available
1523      hosts.
1524
1525    There are many other options available as well, but they are
1526 generally needed for special purposes only.
1527
1528 \1f
1529 File: gdb.info,  Node: Maintenance Commands,  Next: Remote Protocol,  Prev: Installing GDB,  Up: Top
1530
1531 Maintenance Commands
1532 ********************
1533
1534 In addition to commands intended for GDB users, GDB includes a number
1535 of commands intended for GDB developers.  These commands are provided
1536 here for reference.
1537
1538 `maint info breakpoints'
1539      Using the same format as `info breakpoints', display both the
1540      breakpoints you've set explicitly, and those GDB is using for
1541      internal purposes.  Internal breakpoints are shown with negative
1542      breakpoint numbers.  The type column identifies what kind of
1543      breakpoint is shown:
1544
1545     `breakpoint'
1546           Normal, explicitly set breakpoint.
1547
1548     `watchpoint'
1549           Normal, explicitly set watchpoint.
1550
1551     `longjmp'
1552           Internal breakpoint, used to handle correctly stepping through
1553           `longjmp' calls.
1554
1555     `longjmp resume'
1556           Internal breakpoint at the target of a `longjmp'.
1557
1558     `until'
1559           Temporary internal breakpoint used by the GDB `until' command.
1560
1561     `finish'
1562           Temporary internal breakpoint used by the GDB `finish'
1563           command.
1564
1565     `shlib events'
1566           Shared library events.
1567
1568
1569 `maint internal-error'
1570 `maint internal-warning'
1571      Cause GDB to call the internal function `internal_error' or
1572      `internal_warning' and hence behave as though an internal error or
1573      internal warning has been detected.  In addition to reporting the
1574      internal problem, these functions give the user the opportunity to
1575      either quit GDB or create a core file of the current GDB session.
1576
1577           (gdb) maint internal-error testing, 1, 2
1578           .../maint.c:121: internal-error: testing, 1, 2
1579           A problem internal to GDB has been detected.  Further
1580           debugging may prove unreliable.
1581           Quit this debugging session? (y or n) n
1582           Create a core file? (y or n) n
1583           (gdb)
1584
1585      Takes an optional parameter that is used as the text of the error
1586      or warning message.
1587
1588 `maint print dummy-frames'
1589      Prints the contents of GDB's internal dummy-frame stack.
1590
1591           (gdb) b add
1592           ...
1593           (gdb) print add(2,3)
1594           Breakpoint 2, add (a=2, b=3) at ...
1595           58      return (a + b);
1596           The program being debugged stopped while in a function called from GDB.
1597           ...
1598           (gdb) maint print dummy-frames
1599           0x1a57c80: pc=0x01014068 fp=0x0200bddc sp=0x0200bdd6
1600            top=0x0200bdd4 id={stack=0x200bddc,code=0x101405c}
1601            call_lo=0x01014000 call_hi=0x01014001
1602           (gdb)
1603
1604      Takes an optional file parameter.
1605
1606 `maint print registers'
1607 `maint print raw-registers'
1608 `maint print cooked-registers'
1609 `maint print register-groups'
1610      Print GDB's internal register data structures.
1611
1612      The command `maint print raw-registers' includes the contents of
1613      the raw register cache; the command `maint print cooked-registers'
1614      includes the (cooked) value of all registers; and the command
1615      `maint print register-groups' includes the groups that each
1616      register is a member of.  *Note Registers: (gdbint)Registers.
1617
1618      Takes an optional file parameter.
1619
1620 `maint print reggroups'
1621      Print GDB's internal register group data structures.
1622
1623      Takes an optional file parameter.
1624
1625           (gdb) maint print reggroups
1626            Group      Type
1627            general    user
1628            float      user
1629            all        user
1630            vector     user
1631            system     user
1632            save       internal
1633            restore    internal
1634
1635 `maint set profile'
1636 `maint show profile'
1637      Control profiling of GDB.
1638
1639      Profiling will be disabled until you use the `maint set profile'
1640      command to enable it.  When you enable profiling, the system will
1641      begin collecting timing and execution count data; when you disable
1642      profiling or exit GDB, the results will be written to a log file.
1643      Remember that if you use profiling, GDB will overwrite the
1644      profiling log file (often called `gmon.out').  If you have a
1645      record of important profiling data in a `gmon.out' file, be sure
1646      to move it to a safe location.
1647
1648      Configuring with `--enable-profiling' arranges for GDB to be
1649      compiled with the `-pg' compiler option.
1650
1651
1652 \1f
1653 File: gdb.info,  Node: Remote Protocol,  Next: Agent Expressions,  Prev: Maintenance Commands,  Up: Top
1654
1655 GDB Remote Serial Protocol
1656 **************************
1657
1658 * Menu:
1659
1660 * Overview::
1661 * Packets::
1662 * Stop Reply Packets::
1663 * General Query Packets::
1664 * Register Packet Format::
1665 * Examples::
1666 * File-I/O remote protocol extension::
1667
1668 \1f
1669 File: gdb.info,  Node: Overview,  Next: Packets,  Up: Remote Protocol
1670
1671 Overview
1672 ========
1673
1674 There may be occasions when you need to know something about the
1675 protocol--for example, if there is only one serial port to your target
1676 machine, you might want your program to do something special if it
1677 recognizes a packet meant for GDB.
1678
1679    In the examples below, `->' and `<-' are used to indicate
1680 transmitted and received data respectfully.
1681
1682    All GDB commands and responses (other than acknowledgments) are sent
1683 as a PACKET.  A PACKET is introduced with the character `$', the actual
1684 PACKET-DATA, and the terminating character `#' followed by a two-digit
1685 CHECKSUM:
1686
1687      `$'PACKET-DATA`#'CHECKSUM
1688
1689 The two-digit CHECKSUM is computed as the modulo 256 sum of all
1690 characters between the leading `$' and the trailing `#' (an eight bit
1691 unsigned checksum).
1692
1693    Implementors should note that prior to GDB 5.0 the protocol
1694 specification also included an optional two-digit SEQUENCE-ID:
1695
1696      `$'SEQUENCE-ID`:'PACKET-DATA`#'CHECKSUM
1697
1698 That SEQUENCE-ID was appended to the acknowledgment.  GDB has never
1699 output SEQUENCE-IDs.  Stubs that handle packets added since GDB 5.0
1700 must not accept SEQUENCE-ID.
1701
1702    When either the host or the target machine receives a packet, the
1703 first response expected is an acknowledgment: either `+' (to indicate
1704 the package was received correctly) or `-' (to request retransmission):
1705
1706      -> `$'PACKET-DATA`#'CHECKSUM
1707      <- `+'
1708
1709 The host (GDB) sends COMMANDs, and the target (the debugging stub
1710 incorporated in your program) sends a RESPONSE.  In the case of step
1711 and continue COMMANDs, the response is only sent when the operation has
1712 completed (the target has again stopped).
1713
1714    PACKET-DATA consists of a sequence of characters with the exception
1715 of `#' and `$' (see `X' packet for additional exceptions).
1716
1717    Fields within the packet should be separated using `,' `;' or `:'.
1718 Except where otherwise noted all numbers are represented in HEX with
1719 leading zeros suppressed.
1720
1721    Implementors should note that prior to GDB 5.0, the character `:'
1722 could not appear as the third character in a packet (as it would
1723 potentially conflict with the SEQUENCE-ID).
1724
1725    Response DATA can be run-length encoded to save space.  A `*' means
1726 that the next character is an ASCII encoding giving a repeat count
1727 which stands for that many repetitions of the character preceding the
1728 `*'.  The encoding is `n+29', yielding a printable character where `n
1729 >=3' (which is where rle starts to win).  The printable characters `$',
1730 `#', `+' and `-' or with a numeric value greater than 126 should not be
1731 used.
1732
1733    So:
1734      "`0* '"
1735
1736 means the same as "0000".
1737
1738    The error response returned for some packets includes a two character
1739 error number.  That number is not well defined.
1740
1741    For any COMMAND not supported by the stub, an empty response
1742 (`$#00') should be returned.  That way it is possible to extend the
1743 protocol.  A newer GDB can tell if a packet is supported based on that
1744 response.
1745
1746    A stub is required to support the `g', `G', `m', `M', `c', and `s'
1747 COMMANDs.  All other COMMANDs are optional.
1748
1749 \1f
1750 File: gdb.info,  Node: Packets,  Next: Stop Reply Packets,  Prev: Overview,  Up: Remote Protocol
1751
1752 Packets
1753 =======
1754
1755 The following table provides a complete list of all currently defined
1756 COMMANDs and their corresponding response DATA.
1757
1758 `!' -- extended mode
1759      Enable extended mode.  In extended mode, the remote server is made
1760      persistent.  The `R' packet is used to restart the program being
1761      debugged.
1762
1763      Reply:
1764     `OK'
1765           The remote target both supports and has enabled extended mode.
1766
1767 `?' -- last signal
1768      Indicate the reason the target halted.  The reply is the same as
1769      for step and continue.
1770
1771      Reply: *Note Stop Reply Packets::, for the reply specifications.
1772
1773 `a' -- reserved
1774      Reserved for future use.
1775
1776 `A'ARGLEN`,'ARGNUM`,'ARG`,...' --  set program arguments *(reserved)*
1777      Initialized `argv[]' array passed into program. ARGLEN specifies
1778      the number of bytes in the hex encoded byte stream ARG.  See
1779      `gdbserver' for more details.
1780
1781      Reply:
1782     `OK'
1783
1784     `ENN'
1785
1786 `b'BAUD -- set baud *(deprecated)*
1787      Change the serial line speed to BAUD.
1788
1789      JTC: _When does the transport layer state change?  When it's
1790      received, or after the ACK is transmitted.  In either case, there
1791      are problems if the command or the acknowledgment packet is
1792      dropped._
1793
1794      Stan: _If people really wanted to add something like this, and get
1795      it working for the first time, they ought to modify ser-unix.c to
1796      send some kind of out-of-band message to a specially-setup stub
1797      and have the switch happen "in between" packets, so that from
1798      remote protocol's point of view, nothing actually happened._
1799
1800 `B'ADDR,MODE -- set breakpoint *(deprecated)*
1801      Set (MODE is `S') or clear (MODE is `C') a breakpoint at ADDR.
1802
1803      This packet has been replaced by the `Z' and `z' packets (*note
1804      insert breakpoint or watchpoint packet::).
1805
1806 `c'ADDR -- continue
1807      ADDR is address to resume.  If ADDR is omitted, resume at current
1808      address.
1809
1810      Reply: *Note Stop Reply Packets::, for the reply specifications.
1811
1812 `C'SIG`;'ADDR -- continue with signal
1813      Continue with signal SIG (hex signal number).  If `;'ADDR is
1814      omitted, resume at same address.
1815
1816      Reply: *Note Stop Reply Packets::, for the reply specifications.
1817
1818 `d' -- toggle debug *(deprecated)*
1819      Toggle debug flag.
1820
1821 `D' -- detach
1822      Detach GDB from the remote system.  Sent to the remote target
1823      before GDB disconnects via the `detach' command.
1824
1825      Reply:
1826     `_no response_'
1827           GDB does not check for any response after sending this packet.
1828
1829 `e' -- reserved
1830      Reserved for future use.
1831
1832 `E' -- reserved
1833      Reserved for future use.
1834
1835 `f' -- reserved
1836      Reserved for future use.
1837
1838 `F'RC`,'EE`,'CF`;'XX -- Reply to target's F packet.
1839      This packet is send by GDB as reply to a `F' request packet sent
1840      by the target.  This is part of the File-I/O protocol extension.
1841      *Note File-I/O remote protocol extension::, for the specification.
1842
1843 `g' -- read registers
1844      Read general registers.
1845
1846      Reply:
1847     `XX...'
1848           Each byte of register data is described by two hex digits.
1849           The bytes with the register are transmitted in target byte
1850           order.  The size of each register and their position within
1851           the `g' PACKET are determined by the GDB internal macros
1852           DEPRECATED_REGISTER_RAW_SIZE and REGISTER_NAME macros.  The
1853           specification of several standard `g' packets is specified
1854           below.
1855
1856     `ENN'
1857           for an error.
1858
1859 `G'XX... -- write regs
1860      *Note read registers packet::, for a description of the XX...
1861      data.
1862
1863      Reply:
1864     `OK'
1865           for success
1866
1867     `ENN'
1868           for an error
1869
1870 `h' -- reserved
1871      Reserved for future use.
1872
1873 `H'CT... -- set thread
1874      Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
1875      C depends on the operation to be performed: it should be `c' for
1876      step and continue operations, `g' for other operations.  The
1877      thread designator T... may be -1, meaning all the threads, a
1878      thread number, or zero which means pick any thread.
1879
1880      Reply:
1881     `OK'
1882           for success
1883
1884     `ENN'
1885           for an error
1886
1887 `i'ADDR`,'NNN -- cycle step *(draft)*
1888      Step the remote target by a single clock cycle.  If `,'NNN is
1889      present, cycle step NNN cycles.  If ADDR is present, cycle step
1890      starting at that address.
1891
1892 `I' -- signal then cycle step *(reserved)*
1893      *Note step with signal packet::.  *Note cycle step packet::.
1894
1895 `j' -- reserved
1896      Reserved for future use.
1897
1898 `J' -- reserved
1899      Reserved for future use.
1900
1901 `k' -- kill request
1902      FIXME: _There is no description of how to operate when a specific
1903      thread context has been selected (i.e. does 'k' kill only that
1904      thread?)_.
1905
1906 `K' -- reserved
1907      Reserved for future use.
1908
1909 `l' -- reserved
1910      Reserved for future use.
1911
1912 `L' -- reserved
1913      Reserved for future use.
1914
1915 `m'ADDR`,'LENGTH -- read memory
1916      Read LENGTH bytes of memory starting at address ADDR.  Neither GDB
1917      nor the stub assume that sized memory transfers are assumed using
1918      word aligned accesses. FIXME: _A word aligned memory transfer
1919      mechanism is needed._
1920
1921      Reply:
1922     `XX...'
1923           XX... is mem contents. Can be fewer bytes than requested if
1924           able to read only part of the data.  Neither GDB nor the stub
1925           assume that sized memory transfers are assumed using word
1926           aligned accesses. FIXME: _A word aligned memory transfer
1927           mechanism is needed._
1928
1929     `ENN'
1930           NN is errno
1931
1932 `M'ADDR,LENGTH`:'XX... -- write mem
1933      Write LENGTH bytes of memory starting at address ADDR.  XX... is
1934      the data.
1935
1936      Reply:
1937     `OK'
1938           for success
1939
1940     `ENN'
1941           for an error (this includes the case where only part of the
1942           data was written).
1943
1944 `n' -- reserved
1945      Reserved for future use.
1946
1947 `N' -- reserved
1948      Reserved for future use.
1949
1950 `o' -- reserved
1951      Reserved for future use.
1952
1953 `O' -- reserved
1954      Reserved for future use.
1955
1956 `p'N... -- read reg *(reserved)*
1957      *Note write register packet::.
1958
1959      Reply:
1960     `R....'
1961           The hex encoded value of the register in target byte order.
1962
1963 `P'N...`='R... -- write register
1964      Write register N... with value R..., which contains two hex digits
1965      for each byte in the register (target byte order).
1966
1967      Reply:
1968     `OK'
1969           for success
1970
1971     `ENN'
1972           for an error
1973
1974 `q'QUERY -- general query
1975      Request info about QUERY.  In general GDB queries have a leading
1976      upper case letter.  Custom vendor queries should use a company
1977      prefix (in lower case) ex: `qfsf.var'.  QUERY may optionally be
1978      followed by a `,' or `;' separated list.  Stubs must ensure that
1979      they match the full QUERY name.
1980
1981      Reply:
1982     `XX...'
1983           Hex encoded data from query.  The reply can not be empty.
1984
1985     `ENN'
1986           error reply
1987
1988     `'
1989           Indicating an unrecognized QUERY.
1990
1991 `Q'VAR`='VAL -- general set
1992      Set value of VAR to VAL.
1993
1994      *Note general query packet::, for a discussion of naming
1995      conventions.
1996
1997 `r' -- reset *(deprecated)*
1998      Reset the entire system.
1999
2000 `R'XX -- remote restart
2001      Restart the program being debugged.  XX, while needed, is ignored.
2002      This packet is only available in extended mode.
2003
2004      Reply:
2005     `_no reply_'
2006           The `R' packet has no reply.
2007
2008 `s'ADDR -- step
2009      ADDR is address to resume.  If ADDR is omitted, resume at same
2010      address.
2011
2012      Reply: *Note Stop Reply Packets::, for the reply specifications.
2013
2014 `S'SIG`;'ADDR -- step with signal
2015      Like `C' but step not continue.
2016
2017      Reply: *Note Stop Reply Packets::, for the reply specifications.
2018
2019 `t'ADDR`:'PP`,'MM -- search
2020      Search backwards starting at address ADDR for a match with pattern
2021      PP and mask MM.  PP and MM are 4 bytes.  ADDR must be at least 3
2022      digits.
2023
2024 `T'XX -- thread alive
2025      Find out if the thread XX is alive.
2026
2027      Reply:
2028     `OK'
2029           thread is still alive
2030
2031     `ENN'
2032           thread is dead
2033
2034 `u' -- reserved
2035      Reserved for future use.
2036
2037 `U' -- reserved
2038      Reserved for future use.
2039
2040 `v' -- verbose packet prefix
2041      Packets starting with `v' are identified by a multi-letter name,
2042      up to the first `;' or `?' (or the end of the packet).
2043
2044 `vCont'[;ACTION[`:'TID]]... -- extended resume
2045      Resume the inferior.  Different actions may be specified for each
2046      thread.  If an action is specified with no TID, then it is applied
2047      to any threads that don't have a specific action specified; if no
2048      default action is specified then other threads should remain
2049      stopped.  Specifying multiple default actions is an error;
2050      specifying no actions is also an error.  Thread IDs are specified
2051      in hexadecimal.  Currently supported actions are:
2052
2053     `c'
2054           Continue.
2055
2056     `CSIG'
2057           Continue with signal SIG.  SIG should be two hex digits.
2058
2059     `s'
2060           Step.
2061
2062     `SSIG'
2063           Step with signal SIG.  SIG should be two hex digits.
2064
2065      The optional ADDR argument normally associated with these packets
2066      is not supported in `vCont'.
2067
2068      Reply: *Note Stop Reply Packets::, for the reply specifications.
2069
2070 `vCont?' -- extended resume query
2071      Query support for the `vCont' packet.
2072
2073      Reply:
2074     ``vCont'[;ACTION]...'
2075           The `vCont' packet is supported.  Each ACTION is a supported
2076           command in the `vCont' packet.
2077
2078     `'
2079           The `vCont' packet is not supported.
2080
2081 `V' -- reserved
2082      Reserved for future use.
2083
2084 `w' -- reserved
2085      Reserved for future use.
2086
2087 `W' -- reserved
2088      Reserved for future use.
2089
2090 `x' -- reserved
2091      Reserved for future use.
2092
2093 `X'ADDR`,'LENGTH:XX... -- write mem (binary)
2094      ADDR is address, LENGTH is number of bytes, XX...  is binary data.
2095      The characters `$', `#', and `0x7d' are escaped using `0x7d'.
2096
2097      Reply:
2098     `OK'
2099           for success
2100
2101     `ENN'
2102           for an error
2103
2104 `y' -- reserved
2105      Reserved for future use.
2106
2107 `Y' reserved
2108      Reserved for future use.
2109
2110 `z'TYPE`,'ADDR`,'LENGTH -- remove breakpoint or watchpoint *(draft)*
2111 `Z'TYPE`,'ADDR`,'LENGTH -- insert breakpoint or watchpoint *(draft)*
2112      Insert (`Z') or remove (`z') a TYPE breakpoint or watchpoint
2113      starting at address ADDRESS and covering the next LENGTH bytes.
2114
2115      Each breakpoint and watchpoint packet TYPE is documented
2116      separately.
2117
2118      _Implementation notes: A remote target shall return an empty string
2119      for an unrecognized breakpoint or watchpoint packet TYPE.  A
2120      remote target shall support either both or neither of a given
2121      `Z'TYPE... and `z'TYPE... packet pair.  To avoid potential
2122      problems with duplicate packets, the operations should be
2123      implemented in an idempotent way._
2124
2125 `z'`0'`,'ADDR`,'LENGTH -- remove memory breakpoint *(draft)*
2126
2127 `Z'`0'`,'ADDR`,'LENGTH -- insert memory breakpoint *(draft)*
2128      Insert (`Z0') or remove (`z0') a memory breakpoint at address
2129      `addr' of size `length'.
2130
2131      A memory breakpoint is implemented by replacing the instruction at
2132      ADDR with a software breakpoint or trap instruction.  The `length'
2133      is used by targets that indicates the size of the breakpoint (in
2134      bytes) that should be inserted (e.g., the ARM and MIPS can insert
2135      either a 2 or 4 byte breakpoint).
2136
2137      _Implementation note: It is possible for a target to copy or move
2138      code that contains memory breakpoints (e.g., when implementing
2139      overlays).  The behavior of this packet, in the presence of such a
2140      target, is not defined._
2141
2142      Reply:
2143     `OK'
2144           success
2145
2146     `'
2147           not supported
2148
2149     `ENN'
2150           for an error
2151
2152 `z'`1'`,'ADDR`,'LENGTH -- remove hardware breakpoint *(draft)*
2153
2154 `Z'`1'`,'ADDR`,'LENGTH -- insert hardware breakpoint *(draft)*
2155      Insert (`Z1') or remove (`z1') a hardware breakpoint at address
2156      `addr' of size `length'.
2157
2158      A hardware breakpoint is implemented using a mechanism that is not
2159      dependant on being able to modify the target's memory.
2160
2161      _Implementation note: A hardware breakpoint is not affected by code
2162      movement._
2163
2164      Reply:
2165     `OK'
2166           success
2167
2168     `'
2169           not supported
2170
2171     `ENN'
2172           for an error
2173
2174 `z'`2'`,'ADDR`,'LENGTH -- remove write watchpoint *(draft)*
2175
2176 `Z'`2'`,'ADDR`,'LENGTH -- insert write watchpoint *(draft)*
2177      Insert (`Z2') or remove (`z2') a write watchpoint.
2178
2179      Reply:
2180     `OK'
2181           success
2182
2183     `'
2184           not supported
2185
2186     `ENN'
2187           for an error
2188
2189 `z'`3'`,'ADDR`,'LENGTH -- remove read watchpoint *(draft)*
2190
2191 `Z'`3'`,'ADDR`,'LENGTH -- insert read watchpoint *(draft)*
2192      Insert (`Z3') or remove (`z3') a read watchpoint.
2193
2194      Reply:
2195     `OK'
2196           success
2197
2198     `'
2199           not supported
2200
2201     `ENN'
2202           for an error
2203
2204 `z'`4'`,'ADDR`,'LENGTH -- remove access watchpoint *(draft)*
2205
2206 `Z'`4'`,'ADDR`,'LENGTH -- insert access watchpoint *(draft)*
2207      Insert (`Z4') or remove (`z4') an access watchpoint.
2208
2209      Reply:
2210     `OK'
2211           success
2212
2213     `'
2214           not supported
2215
2216     `ENN'
2217           for an error
2218
2219
2220 \1f
2221 File: gdb.info,  Node: Stop Reply Packets,  Next: General Query Packets,  Prev: Packets,  Up: Remote Protocol
2222
2223 Stop Reply Packets
2224 ==================
2225
2226 The `C', `c', `S', `s' and `?' packets can receive any of the below as
2227 a reply.  In the case of the `C', `c', `S' and `s' packets, that reply
2228 is only returned when the target halts.  In the below the exact meaning
2229 of `signal number' is poorly defined.  In general one of the UNIX
2230 signal numbering conventions is used.
2231
2232 `SAA'
2233      AA is the signal number
2234
2235 ``T'AAN...`:'R...`;'N...`:'R...`;'N...`:'R...`;''
2236      AA = two hex digit signal number; N... = register number (hex),
2237      R...  = target byte ordered register contents, size defined by
2238      `DEPRECATED_REGISTER_RAW_SIZE'; N... = `thread', R... = thread
2239      process ID, this is a hex integer; N... = (`watch' | `rwatch' |
2240      `awatch', R... = data address, this is a hex integer; N... = other
2241      string not starting with valid hex digit.  GDB should ignore this
2242      N..., R... pair and go on to the next.  This way we can extend the
2243      protocol.
2244
2245 `WAA'
2246      The process exited, and AA is the exit status.  This is only
2247      applicable to certain targets.
2248
2249 `XAA'
2250      The process terminated with signal AA.
2251
2252 `OXX...'
2253      XX... is hex encoding of ASCII data.  This can happen at any time
2254      while the program is running and the debugger should continue to
2255      wait for `W', `T', etc.
2256
2257 `FCALL-ID`,'PARAMETER...'
2258      CALL-ID is the identifier which says which host system call should
2259      be called.  This is just the name of the function.  Translation
2260      into the correct system call is only applicable as it's defined in
2261      GDB.  *Note File-I/O remote protocol extension::, for a list of
2262      implemented system calls.
2263
2264      PARAMETER... is a list of parameters as defined for this very
2265      system call.
2266
2267      The target replies with this packet when it expects GDB to call a
2268      host system call on behalf of the target.  GDB replies with an
2269      appropriate `F' packet and keeps up waiting for the next reply
2270      packet from the target.  The latest `C', `c', `S' or `s' action is
2271      expected to be continued.  *Note File-I/O remote protocol
2272      extension::, for more details.
2273
2274
2275 \1f
2276 File: gdb.info,  Node: General Query Packets,  Next: Register Packet Format,  Prev: Stop Reply Packets,  Up: Remote Protocol
2277
2278 General Query Packets
2279 =====================
2280
2281 The following set and query packets have already been defined.
2282
2283 `q'`C' -- current thread
2284      Return the current thread id.
2285
2286      Reply:
2287     ``QC'PID'
2288           Where PID is a HEX encoded 16 bit process id.
2289
2290     `*'
2291           Any other reply implies the old pid.
2292
2293 `q'`fThreadInfo' - all thread ids
2294      `q'`sThreadInfo'
2295
2296      Obtain a list of active thread ids from the target (OS).  Since
2297      there may be too many active threads to fit into one reply packet,
2298      this query works iteratively: it may require more than one
2299      query/reply sequence to obtain the entire list of threads.  The
2300      first query of the sequence will be the `qf'`ThreadInfo' query;
2301      subsequent queries in the sequence will be the `qs'`ThreadInfo'
2302      query.
2303
2304      NOTE: replaces the `qL' query (see below).
2305
2306      Reply:
2307     ``m'ID'
2308           A single thread id
2309
2310     ``m'ID,ID...'
2311           a comma-separated list of thread ids
2312
2313     ``l''
2314           (lower case 'el') denotes end of list.
2315
2316      In response to each query, the target will reply with a list of
2317      one or more thread ids, in big-endian hex, separated by commas.
2318      GDB will respond to each reply with a request for more thread ids
2319      (using the `qs' form of the query), until the target responds with
2320      `l' (lower-case el, for `'last'').
2321
2322 `q'`ThreadExtraInfo'`,'ID -- extra thread info
2323      Where ID is a thread-id in big-endian hex.  Obtain a printable
2324      string description of a thread's attributes from the target OS.
2325      This string may contain anything that the target OS thinks is
2326      interesting for GDB to tell the user about the thread.  The string
2327      is displayed in GDB's `info threads' display.  Some examples of
2328      possible thread extra info strings are "Runnable", or "Blocked on
2329      Mutex".
2330
2331      Reply:
2332     `XX...'
2333           Where XX... is a hex encoding of ASCII data, comprising the
2334           printable string containing the extra information about the
2335           thread's attributes.
2336
2337 `q'`L'STARTFLAGTHREADCOUNTNEXTTHREAD -- query LIST or THREADLIST *(deprecated)*
2338      Obtain thread information from RTOS.  Where: STARTFLAG (one hex
2339      digit) is one to indicate the first query and zero to indicate a
2340      subsequent query; THREADCOUNT (two hex digits) is the maximum
2341      number of threads the response packet can contain; and NEXTTHREAD
2342      (eight hex digits), for subsequent queries (STARTFLAG is zero), is
2343      returned in the response as ARGTHREAD.
2344
2345      NOTE: this query is replaced by the `q'`fThreadInfo' query (see
2346      above).
2347
2348      Reply:
2349     ``q'`M'COUNTDONEARGTHREADTHREAD...'
2350           Where: COUNT (two hex digits) is the number of threads being
2351           returned; DONE (one hex digit) is zero to indicate more
2352           threads and one indicates no further threads; ARGTHREADID
2353           (eight hex digits) is NEXTTHREAD from the request packet;
2354           THREAD...  is a sequence of thread IDs from the target.
2355           THREADID (eight hex digits).  See
2356           `remote.c:parse_threadlist_response()'.
2357
2358 `q'`CRC:'ADDR`,'LENGTH -- compute CRC of memory block
2359      Reply:
2360     ``E'NN'
2361           An error (such as memory fault)
2362
2363     ``C'CRC32'
2364           A 32 bit cyclic redundancy check of the specified memory
2365           region.
2366
2367 `q'`Offsets' -- query sect offs
2368      Get section offsets that the target used when re-locating the
2369      downloaded image.  _Note: while a `Bss' offset is included in the
2370      response, GDB ignores this and instead applies the `Data' offset
2371      to the `Bss' section._
2372
2373      Reply:
2374     ``Text='XXX`;Data='YYY`;Bss='ZZZ'
2375
2376 `q'`P'MODETHREADID -- thread info request
2377      Returns information on THREADID.  Where: MODE is a hex encoded 32
2378      bit mode; THREADID is a hex encoded 64 bit thread ID.
2379
2380      Reply:
2381     `*'
2382
2383      See `remote.c:remote_unpack_thread_info_response()'.
2384
2385 `q'`Rcmd,'COMMAND -- remote command
2386      COMMAND (hex encoded) is passed to the local interpreter for
2387      execution.  Invalid commands should be reported using the output
2388      string.  Before the final result packet, the target may also
2389      respond with a number of intermediate `O'OUTPUT console output
2390      packets.  _Implementors should note that providing access to a
2391      stubs's interpreter may have security implications_.
2392
2393      Reply:
2394     `OK'
2395           A command response with no output.
2396
2397     `OUTPUT'
2398           A command response with the hex encoded output string OUTPUT.
2399
2400     ``E'NN'
2401           Indicate a badly formed request.
2402
2403     ``''
2404           When `q'`Rcmd' is not recognized.
2405
2406 `qSymbol::' -- symbol lookup
2407      Notify the target that GDB is prepared to serve symbol lookup
2408      requests.  Accept requests from the target for the values of
2409      symbols.
2410
2411      Reply:
2412     ``OK''
2413           The target does not need to look up any (more) symbols.
2414
2415     ``qSymbol:'SYM_NAME'
2416           The target requests the value of symbol SYM_NAME (hex
2417           encoded).  GDB may provide the value by using the
2418           `qSymbol:'SYM_VALUE:SYM_NAME message, described below.
2419
2420 `qSymbol:'SYM_VALUE:SYM_NAME -- symbol value
2421      Set the value of SYM_NAME to SYM_VALUE.
2422
2423      SYM_NAME (hex encoded) is the name of a symbol whose value the
2424      target has previously requested.
2425
2426      SYM_VALUE (hex) is the value for symbol SYM_NAME.  If GDB cannot
2427      supply a value for SYM_NAME, then this field will be empty.
2428
2429      Reply:
2430     ``OK''
2431           The target does not need to look up any (more) symbols.
2432
2433     ``qSymbol:'SYM_NAME'
2434           The target requests the value of a new symbol SYM_NAME (hex
2435           encoded).  GDB will continue to supply the values of symbols
2436           (if available), until the target ceases to request them.
2437
2438 `qPart':OBJECT:`read':ANNEX:OFFSET,LENGTH -- read special data
2439      Read uninterpreted bytes from the target's special data area
2440      identified by the keyword `object'.  Request LENGTH bytes starting
2441      at OFFSET bytes into the data.  The content and encoding of ANNEX
2442      is specific to the object; it can supply additional details about
2443      what data to access.
2444
2445      Here are the specific requests of this form defined so far.  All
2446      ``qPart':OBJECT:`read':...' requests use the same reply formats,
2447      listed below.
2448
2449     `qPart':`auxv':`read'::OFFSET,LENGTH
2450           Access the target's "auxiliary vector".  *Note Auxiliary
2451           Vector::.  Note ANNEX must be empty.
2452
2453      Reply:
2454     `OK'
2455           The OFFSET in the request is at the end of the data.  There
2456           is no more data to be read.
2457
2458     XX...
2459           Hex encoded data bytes read.  This may be fewer bytes than
2460           the LENGTH in the request.
2461
2462     `E00'
2463           The request was malformed, or ANNEX was invalid.
2464
2465     `E'NN
2466           The offset was invalid, or there was an error encountered
2467           reading the data.  NN is a hex-encoded `errno' value.
2468
2469     `""' (empty)
2470           An empty reply indicates the OBJECT or ANNEX string was not
2471           recognized by the stub.
2472
2473 `qPart':OBJECT:`write':ANNEX:OFFSET:DATA...
2474      Write uninterpreted bytes into the target's special data area
2475      identified by the keyword `object', starting at OFFSET bytes into
2476      the data.  DATA... is the hex-encoded data to be written.  The
2477      content and encoding of ANNEX is specific to the object; it can
2478      supply additional details about what data to access.
2479
2480      No requests of this form are presently in use.  This specification
2481      serves as a placeholder to document the common format that new
2482      specific request specifications ought to use.
2483
2484      Reply:
2485     NN
2486           NN (hex encoded) is the number of bytes written.  This may be
2487           fewer bytes than supplied in the request.
2488
2489     `E00'
2490           The request was malformed, or ANNEX was invalid.
2491
2492     `E'NN
2493           The offset was invalid, or there was an error encountered
2494           writing the data.  NN is a hex-encoded `errno' value.
2495
2496     `""' (empty)
2497           An empty reply indicates the OBJECT or ANNEX string was not
2498           recognized by the stub, or that the object does not support
2499           writing.
2500
2501 `qPart':OBJECT:OPERATION:...
2502      Requests of this form may be added in the future.  When a stub does
2503      not recognize the OBJECT keyword, or its support for OBJECT does
2504      not recognize the OPERATION keyword, the stub must respond with an
2505      empty packet.
2506
2507 \1f
2508 File: gdb.info,  Node: Register Packet Format,  Next: Examples,  Prev: General Query Packets,  Up: Remote Protocol
2509
2510 Register Packet Format
2511 ======================
2512
2513 The following `g'/`G' packets have previously been defined.  In the
2514 below, some thirty-two bit registers are transferred as sixty-four
2515 bits.  Those registers should be zero/sign extended (which?)  to fill
2516 the space allocated.  Register bytes are transfered in target byte
2517 order.  The two nibbles within a register byte are transfered
2518 most-significant - least-significant.
2519
2520 MIPS32
2521      All registers are transfered as thirty-two bit quantities in the
2522      order: 32 general-purpose; sr; lo; hi; bad; cause; pc; 32
2523      floating-point registers; fsr; fir; fp.
2524
2525 MIPS64
2526      All registers are transfered as sixty-four bit quantities
2527      (including thirty-two bit registers such as `sr').  The ordering
2528      is the same as `MIPS32'.
2529
2530
2531 \1f
2532 File: gdb.info,  Node: Examples,  Next: File-I/O remote protocol extension,  Prev: Register Packet Format,  Up: Remote Protocol
2533
2534 Examples
2535 ========
2536
2537 Example sequence of a target being re-started.  Notice how the restart
2538 does not get any direct output:
2539
2540      -> `R00'
2541      <- `+'
2542      _target restarts_
2543      -> `?'
2544      <- `+'
2545      <- `T001:1234123412341234'
2546      -> `+'
2547
2548    Example sequence of a target being stepped by a single instruction:
2549
2550      -> `G1445...'
2551      <- `+'
2552      -> `s'
2553      <- `+'
2554      _time passes_
2555      <- `T001:1234123412341234'
2556      -> `+'
2557      -> `g'
2558      <- `+'
2559      <- `1455...'
2560      -> `+'
2561
2562 \1f
2563 File: gdb.info,  Node: File-I/O remote protocol extension,  Prev: Examples,  Up: Remote Protocol
2564
2565 File-I/O remote protocol extension
2566 ==================================
2567
2568 * Menu:
2569
2570 * File-I/O Overview::
2571 * Protocol basics::
2572 * The F request packet::
2573 * The F reply packet::
2574 * Memory transfer::
2575 * The Ctrl-C message::
2576 * Console I/O::
2577 * The isatty call::
2578 * The system call::
2579 * List of supported calls::
2580 * Protocol specific representation of datatypes::
2581 * Constants::
2582 * File-I/O Examples::
2583
2584 \1f
2585 File: gdb.info,  Node: File-I/O Overview,  Next: Protocol basics,  Up: File-I/O remote protocol extension
2586
2587 File-I/O Overview
2588 -----------------
2589
2590 The File I/O remote protocol extension (short: File-I/O) allows the
2591 target to use the hosts file system and console I/O when calling various
2592 system calls.  System calls on the target system are translated into a
2593 remote protocol packet to the host system which then performs the needed
2594 actions and returns with an adequate response packet to the target
2595 system.  This simulates file system operations even on targets that
2596 lack file systems.
2597
2598    The protocol is defined host- and target-system independent.  It uses
2599 it's own independent representation of datatypes and values.  Both, GDB
2600 and the target's GDB stub are responsible for translating the system
2601 dependent values into the unified protocol values when data is
2602 transmitted.
2603
2604    The communication is synchronous.  A system call is possible only
2605 when GDB is waiting for the `C', `c', `S' or `s' packets.  While GDB
2606 handles the request for a system call, the target is stopped to allow
2607 deterministic access to the target's memory.  Therefore File-I/O is not
2608 interuptible by target signals.  It is possible to interrupt File-I/O
2609 by a user interrupt (Ctrl-C), though.
2610
2611    The target's request to perform a host system call does not finish
2612 the latest `C', `c', `S' or `s' action.  That means, after finishing
2613 the system call, the target returns to continuing the previous activity
2614 (continue, step).  No additional continue or step request from GDB is
2615 required.
2616
2617      (gdb) continue
2618        <- target requests 'system call X'
2619        target is stopped, GDB executes system call
2620        -> GDB returns result
2621        ... target continues, GDB returns to wait for the target
2622        <- target hits breakpoint and sends a Txx packet
2623
2624    The protocol is only used for files on the host file system and for
2625 I/O on the console.  Character or block special devices, pipes, named
2626 pipes or sockets or any other communication method on the host system
2627 are not supported by this protocol.
2628
2629 \1f
2630 File: gdb.info,  Node: Protocol basics,  Next: The F request packet,  Prev: File-I/O Overview,  Up: File-I/O remote protocol extension
2631
2632 Protocol basics
2633 ---------------
2634
2635 The File-I/O protocol uses the `F' packet, as request as well as as
2636 reply packet.  Since a File-I/O system call can only occur when GDB is
2637 waiting for the continuing or stepping target, the File-I/O request is
2638 a reply that GDB has to expect as a result of a former `C', `c', `S' or
2639 `s' packet.  This `F' packet contains all information needed to allow
2640 GDB to call the appropriate host system call:
2641
2642    * A unique identifier for the requested system call.
2643
2644    * All parameters to the system call.  Pointers are given as addresses
2645      in the target memory address space.  Pointers to strings are given
2646      as pointer/length pair.  Numerical values are given as they are.
2647      Numerical control values are given in a protocol specific
2648      representation.
2649
2650
2651    At that point GDB has to perform the following actions.
2652
2653    * If parameter pointer values are given, which point to data needed
2654      as input to a system call, GDB requests this data from the target
2655      with a standard `m' packet request.  This additional communication
2656      has to be expected by the target implementation and is handled as
2657      any other `m' packet.
2658
2659    * GDB translates all value from protocol representation to host
2660      representation as needed.  Datatypes are coerced into the host
2661      types.
2662
2663    * GDB calls the system call
2664
2665    * It then coerces datatypes back to protocol representation.
2666
2667    * If pointer parameters in the request packet point to buffer space
2668      in which a system call is expected to copy data to, the data is
2669      transmitted to the target using a `M' or `X' packet.  This packet
2670      has to be expected by the target implementation and is handled as
2671      any other `M' or `X' packet.
2672
2673
2674    Eventually GDB replies with another `F' packet which contains all
2675 necessary information for the target to continue.  This at least
2676 contains
2677
2678    * Return value.
2679
2680    * `errno', if has been changed by the system call.
2681
2682    * "Ctrl-C" flag.
2683
2684
2685    After having done the needed type and value coercion, the target
2686 continues the latest continue or step action.
2687
2688 \1f
2689 File: gdb.info,  Node: The F request packet,  Next: The F reply packet,  Prev: Protocol basics,  Up: File-I/O remote protocol extension
2690
2691 The `F' request packet
2692 ----------------------
2693
2694 The `F' request packet has the following format:
2695
2696           `F'CALL-ID`,'PARAMETER...
2697
2698      CALL-ID is the identifier to indicate the host system call to be
2699      called.  This is just the name of the function.
2700
2701      PARAMETER... are the parameters to the system call.
2702
2703
2704    Parameters are hexadecimal integer values, either the real values in
2705 case of scalar datatypes, as pointers to target buffer space in case of
2706 compound datatypes and unspecified memory areas or as pointer/length
2707 pairs in case of string parameters.  These are appended to the call-id,
2708 each separated from its predecessor by a comma.  All values are
2709 transmitted in ASCII string representation, pointer/length pairs
2710 separated by a slash.
2711
2712 \1f
2713 File: gdb.info,  Node: The F reply packet,  Next: Memory transfer,  Prev: The F request packet,  Up: File-I/O remote protocol extension
2714
2715 The `F' reply packet
2716 --------------------
2717
2718 The `F' reply packet has the following format:
2719
2720           `F'RETCODE`,'ERRNO`,'CTRL-C FLAG`;'CALL SPECIFIC ATTACHMENT
2721
2722      RETCODE is the return code of the system call as hexadecimal value.
2723
2724      ERRNO is the errno set by the call, in protocol specific
2725      representation.  This parameter can be omitted if the call was
2726      successful.
2727
2728      CTRL-C FLAG is only send if the user requested a break.  In this
2729      case, ERRNO must be send as well, even if the call was successful.
2730      The CTRL-C FLAG itself consists of the character 'C':
2731
2732           F0,0,C
2733
2734      or, if the call was interupted before the host call has been
2735      performed:
2736
2737           F-1,4,C
2738
2739      assuming 4 is the protocol specific representation of `EINTR'.
2740
2741
2742 \1f
2743 File: gdb.info,  Node: Memory transfer,  Next: The Ctrl-C message,  Prev: The F reply packet,  Up: File-I/O remote protocol extension
2744
2745 Memory transfer
2746 ---------------
2747
2748 Structured data which is transferred using a memory read or write as
2749 e.g.  a `struct stat' is expected to be in a protocol specific format
2750 with all scalar multibyte datatypes being big endian.  This should be
2751 done by the target before the `F' packet is sent resp. by GDB before it
2752 transfers memory to the target.  Transferred pointers to structured
2753 data should point to the already coerced data at any time.
2754
2755 \1f
2756 File: gdb.info,  Node: The Ctrl-C message,  Next: Console I/O,  Prev: Memory transfer,  Up: File-I/O remote protocol extension
2757
2758 The Ctrl-C message
2759 ------------------
2760
2761 A special case is, if the CTRL-C FLAG is set in the GDB reply packet.
2762 In this case the target should behave, as if it had gotten a break
2763 message.  The meaning for the target is "system call interupted by
2764 `SIGINT'".  Consequentially, the target should actually stop (as with a
2765 break message) and return to GDB with a `T02' packet.  In this case,
2766 it's important for the target to know, in which state the system call
2767 was interrupted.  Since this action is by design not an atomic
2768 operation, we have to differ between two cases:
2769
2770    * The system call hasn't been performed on the host yet.
2771
2772    * The system call on the host has been finished.
2773
2774
2775    These two states can be distinguished by the target by the value of
2776 the returned `errno'.  If it's the protocol representation of `EINTR',
2777 the system call hasn't been performed.  This is equivalent to the
2778 `EINTR' handling on POSIX systems.  In any other case, the target may
2779 presume that the system call has been finished -- successful or not --
2780 and should behave as if the break message arrived right after the
2781 system call.
2782
2783    GDB must behave reliable.  If the system call has not been called
2784 yet, GDB may send the `F' reply immediately, setting `EINTR' as `errno'
2785 in the packet.  If the system call on the host has been finished before
2786 the user requests a break, the full action must be finshed by GDB.
2787 This requires sending `M' or `X' packets as they fit.  The `F' packet
2788 may only be send when either nothing has happened or the full action
2789 has been completed.
2790
2791 \1f
2792 File: gdb.info,  Node: Console I/O,  Next: The isatty call,  Prev: The Ctrl-C message,  Up: File-I/O remote protocol extension
2793
2794 Console I/O
2795 -----------
2796
2797 By default and if not explicitely closed by the target system, the file
2798 descriptors 0, 1 and 2 are connected to the GDB console.  Output on the
2799 GDB console is handled as any other file output operation (`write(1,
2800 ...)' or `write(2, ...)').  Console input is handled by GDB so that
2801 after the target read request from file descriptor 0 all following
2802 typing is buffered until either one of the following conditions is met:
2803
2804    * The user presses `Ctrl-C'.  The behaviour is as explained above,
2805      the `read' system call is treated as finished.
2806
2807    * The user presses `Enter'.  This is treated as end of input with a
2808      trailing line feed.
2809
2810    * The user presses `Ctrl-D'.  This is treated as end of input.  No
2811      trailing character, especially no Ctrl-D is appended to the input.
2812
2813
2814    If the user has typed more characters as fit in the buffer given to
2815 the read call, the trailing characters are buffered in GDB until either
2816 another `read(0, ...)' is requested by the target or debugging is
2817 stopped on users request.
2818
2819 \1f
2820 File: gdb.info,  Node: The isatty call,  Next: The system call,  Prev: Console I/O,  Up: File-I/O remote protocol extension
2821
2822 The isatty(3) call
2823 ------------------
2824
2825 A special case in this protocol is the library call `isatty' which is
2826 implemented as it's own call inside of this protocol.  It returns 1 to
2827 the target if the file descriptor given as parameter is attached to the
2828 GDB console, 0 otherwise.  Implementing through system calls would
2829 require implementing `ioctl' and would be more complex than needed.
2830
2831 \1f
2832 File: gdb.info,  Node: The system call,  Next: List of supported calls,  Prev: The isatty call,  Up: File-I/O remote protocol extension
2833
2834 The system(3) call
2835 ------------------
2836
2837 The other special case in this protocol is the `system' call which is
2838 implemented as it's own call, too.  GDB is taking over the full task of
2839 calling the necessary host calls to perform the `system' call.  The
2840 return value of `system' is simplified before it's returned to the
2841 target.  Basically, the only signal transmitted back is `EINTR' in case
2842 the user pressed `Ctrl-C'.  Otherwise the return value consists
2843 entirely of the exit status of the called command.
2844
2845    Due to security concerns, the `system' call is refused to be called
2846 by GDB by default.  The user has to allow this call explicitly by
2847 entering
2848
2849 ``set remote system-call-allowed 1''
2850
2851    Disabling the `system' call is done by
2852
2853 ``set remote system-call-allowed 0''
2854
2855    The current setting is shown by typing
2856
2857 ``show remote system-call-allowed''
2858
2859 \1f
2860 File: gdb.info,  Node: List of supported calls,  Next: Protocol specific representation of datatypes,  Prev: The system call,  Up: File-I/O remote protocol extension
2861
2862 List of supported calls
2863 -----------------------
2864
2865 * Menu:
2866
2867 * open::
2868 * close::
2869 * read::
2870 * write::
2871 * lseek::
2872 * rename::
2873 * unlink::
2874 * stat/fstat::
2875 * gettimeofday::
2876 * isatty::
2877 * system::
2878
2879 \1f
2880 File: gdb.info,  Node: open,  Next: close,  Up: List of supported calls
2881
2882 open
2883 ....
2884
2885 Synopsis:
2886      int open(const char *pathname, int flags);
2887      int open(const char *pathname, int flags, mode_t mode);
2888      
2889 Request:
2890      Fopen,pathptr/len,flags,mode
2891
2892 `flags' is the bitwise or of the following values:
2893
2894 `O_CREAT'
2895      If the file does not exist it will be created.  The host rules
2896      apply as far as file ownership and time stamps are concerned.
2897
2898 `O_EXCL'
2899      When used with O_CREAT, if the file already exists it is an error
2900      and open() fails.
2901
2902 `O_TRUNC'
2903      If the file already exists and the open mode allows writing
2904      (O_RDWR or O_WRONLY is given) it will be truncated to length 0.
2905
2906 `O_APPEND'
2907      The file is opened in append mode.
2908
2909 `O_RDONLY'
2910      The file is opened for reading only.
2911
2912 `O_WRONLY'
2913      The file is opened for writing only.
2914
2915 `O_RDWR'
2916      The file is opened for reading and writing.
2917
2918      Each other bit is silently ignored.
2919
2920
2921 `mode' is the bitwise or of the following values:
2922
2923 `S_IRUSR'
2924      User has read permission.
2925
2926 `S_IWUSR'
2927      User has write permission.
2928
2929 `S_IRGRP'
2930      Group has read permission.
2931
2932 `S_IWGRP'
2933      Group has write permission.
2934
2935 `S_IROTH'
2936      Others have read permission.
2937
2938 `S_IWOTH'
2939      Others have write permission.
2940
2941      Each other bit is silently ignored.
2942
2943
2944 Return value:
2945      open returns the new file descriptor or -1 if an error
2946      occured.
2947      
2948 Errors:
2949
2950
2951 `EEXIST'
2952      pathname already exists and O_CREAT and O_EXCL were used.
2953
2954 `EISDIR'
2955      pathname refers to a directory.
2956
2957 `EACCES'
2958      The requested access is not allowed.
2959
2960 `ENAMETOOLONG'
2961      pathname was too long.
2962
2963 `ENOENT'
2964      A directory component in pathname does not exist.
2965
2966 `ENODEV'
2967      pathname refers to a device, pipe, named pipe or socket.
2968
2969 `EROFS'
2970      pathname refers to a file on a read-only filesystem and write
2971      access was requested.
2972
2973 `EFAULT'
2974      pathname is an invalid pointer value.
2975
2976 `ENOSPC'
2977      No space on device to create the file.
2978
2979 `EMFILE'
2980      The process already has the maximum number of files open.
2981
2982 `ENFILE'
2983      The limit on the total number of files open on the system has been
2984      reached.
2985
2986 `EINTR'
2987      The call was interrupted by the user.
2988
2989 \1f
2990 File: gdb.info,  Node: close,  Next: read,  Prev: open,  Up: List of supported calls
2991
2992 close
2993 .....
2994
2995 Synopsis:
2996      int close(int fd);
2997      
2998 Request:
2999      Fclose,fd
3000      
3001 Return value:
3002      close returns zero on success, or -1 if an error occurred.
3003      
3004 Errors:
3005
3006
3007 `EBADF'
3008      fd isn't a valid open file descriptor.
3009
3010 `EINTR'
3011      The call was interrupted by the user.
3012
3013 \1f
3014 File: gdb.info,  Node: read,  Next: write,  Prev: close,  Up: List of supported calls
3015
3016 read
3017 ....
3018
3019 Synopsis:
3020      int read(int fd, void *buf, unsigned int count);
3021      
3022 Request:
3023      Fread,fd,bufptr,count
3024      
3025 Return value:
3026      On success, the number of bytes read is returned.
3027      Zero indicates end of file.  If count is zero, read
3028      returns zero as well.  On error, -1 is returned.
3029      
3030 Errors:
3031
3032
3033 `EBADF'
3034      fd is not a valid file descriptor or is not open for reading.
3035
3036 `EFAULT'
3037      buf is an invalid pointer value.
3038
3039 `EINTR'
3040      The call was interrupted by the user.
3041
3042 \1f
3043 File: gdb.info,  Node: write,  Next: lseek,  Prev: read,  Up: List of supported calls
3044
3045 write
3046 .....
3047
3048 Synopsis:
3049      int write(int fd, const void *buf, unsigned int count);
3050      
3051 Request:
3052      Fwrite,fd,bufptr,count
3053      
3054 Return value:
3055      On success, the number of bytes written are returned.
3056      Zero indicates nothing was written.  On error, -1
3057      is returned.
3058      
3059 Errors:
3060
3061
3062 `EBADF'
3063      fd is not a valid file descriptor or is not open for writing.
3064
3065 `EFAULT'
3066      buf is an invalid pointer value.
3067
3068 `EFBIG'
3069      An attempt was made to write a file that exceeds the host specific
3070      maximum file size allowed.
3071
3072 `ENOSPC'
3073      No space on device to write the data.
3074
3075 `EINTR'
3076      The call was interrupted by the user.
3077
3078 \1f
3079 File: gdb.info,  Node: lseek,  Next: rename,  Prev: write,  Up: List of supported calls
3080
3081 lseek
3082 .....
3083
3084 Synopsis:
3085      long lseek (int fd, long offset, int flag);
3086      
3087 Request:
3088      Flseek,fd,offset,flag
3089
3090    `flag' is one of:
3091
3092 `SEEK_SET'
3093      The offset is set to offset bytes.
3094
3095 `SEEK_CUR'
3096      The offset is set to its current location plus offset bytes.
3097
3098 `SEEK_END'
3099      The offset is set to the size of the file plus offset bytes.
3100
3101 Return value:
3102      On success, the resulting unsigned offset in bytes from
3103      the beginning of the file is returned.  Otherwise, a
3104      value of -1 is returned.
3105      
3106 Errors:
3107
3108
3109 `EBADF'
3110      fd is not a valid open file descriptor.
3111
3112 `ESPIPE'
3113      fd is associated with the GDB console.
3114
3115 `EINVAL'
3116      flag is not a proper value.
3117
3118 `EINTR'
3119      The call was interrupted by the user.
3120
3121 \1f
3122 File: gdb.info,  Node: rename,  Next: unlink,  Prev: lseek,  Up: List of supported calls
3123
3124 rename
3125 ......
3126
3127 Synopsis:
3128      int rename(const char *oldpath, const char *newpath);
3129      
3130 Request:
3131      Frename,oldpathptr/len,newpathptr/len
3132      
3133 Return value:
3134      On success, zero is returned.  On error, -1 is returned.
3135      
3136 Errors:
3137
3138
3139 `EISDIR'
3140      newpath is an existing directory, but oldpath is not a directory.
3141
3142 `EEXIST'
3143      newpath is a non-empty directory.
3144
3145 `EBUSY'
3146      oldpath or newpath is a directory that is in use by some process.
3147
3148 `EINVAL'
3149      An attempt was made to make a directory a subdirectory of itself.
3150
3151 `ENOTDIR'
3152      A  component used as a directory in oldpath or new path is not a
3153      directory.  Or oldpath is a directory and newpath exists but is
3154      not a directory.
3155
3156 `EFAULT'
3157      oldpathptr or newpathptr are invalid pointer values.
3158
3159 `EACCES'
3160      No access to the file or the path of the file.
3161
3162 `ENAMETOOLONG'
3163      oldpath or newpath was too long.
3164
3165 `ENOENT'
3166      A directory component in oldpath or newpath does not exist.
3167
3168 `EROFS'
3169      The file is on a read-only filesystem.
3170
3171 `ENOSPC'
3172      The device containing the file has no room for the new directory
3173      entry.
3174
3175 `EINTR'
3176      The call was interrupted by the user.
3177
3178 \1f
3179 File: gdb.info,  Node: unlink,  Next: stat/fstat,  Prev: rename,  Up: List of supported calls
3180
3181 unlink
3182 ......
3183
3184 Synopsis:
3185      int unlink(const char *pathname);
3186      
3187 Request:
3188      Funlink,pathnameptr/len
3189      
3190 Return value:
3191      On success, zero is returned.  On error, -1 is returned.
3192      
3193 Errors:
3194
3195
3196 `EACCES'
3197      No access to the file or the path of the file.
3198
3199 `EPERM'
3200      The system does not allow unlinking of directories.
3201
3202 `EBUSY'
3203      The file pathname cannot be unlinked because it's being used by
3204      another process.
3205
3206 `EFAULT'
3207      pathnameptr is an invalid pointer value.
3208
3209 `ENAMETOOLONG'
3210      pathname was too long.
3211
3212 `ENOENT'
3213      A directory component in pathname does not exist.
3214
3215 `ENOTDIR'
3216      A component of the path is not a directory.
3217
3218 `EROFS'
3219      The file is on a read-only filesystem.
3220
3221 `EINTR'
3222      The call was interrupted by the user.
3223
3224 \1f
3225 File: gdb.info,  Node: stat/fstat,  Next: gettimeofday,  Prev: unlink,  Up: List of supported calls
3226
3227 stat/fstat
3228 ..........
3229
3230 Synopsis:
3231      int stat(const char *pathname, struct stat *buf);
3232      int fstat(int fd, struct stat *buf);
3233      
3234 Request:
3235      Fstat,pathnameptr/len,bufptr
3236      Ffstat,fd,bufptr
3237      
3238 Return value:
3239      On success, zero is returned.  On error, -1 is returned.
3240      
3241 Errors:
3242
3243
3244 `EBADF'
3245      fd is not a valid open file.
3246
3247 `ENOENT'
3248      A directory component in pathname does not exist or the path is an
3249      empty string.
3250
3251 `ENOTDIR'
3252      A component of the path is not a directory.
3253
3254 `EFAULT'
3255      pathnameptr is an invalid pointer value.
3256
3257 `EACCES'
3258      No access to the file or the path of the file.
3259
3260 `ENAMETOOLONG'
3261      pathname was too long.
3262
3263 `EINTR'
3264      The call was interrupted by the user.
3265
3266 \1f
3267 File: gdb.info,  Node: gettimeofday,  Next: isatty,  Prev: stat/fstat,  Up: List of supported calls
3268
3269 gettimeofday
3270 ............
3271
3272 Synopsis:
3273      int gettimeofday(struct timeval *tv, void *tz);
3274      
3275 Request:
3276      Fgettimeofday,tvptr,tzptr
3277      
3278 Return value:
3279      On success, 0 is returned, -1 otherwise.
3280      
3281 Errors:
3282
3283
3284 `EINVAL'
3285      tz is a non-NULL pointer.
3286
3287 `EFAULT'
3288      tvptr and/or tzptr is an invalid pointer value.
3289
3290 \1f
3291 File: gdb.info,  Node: isatty,  Next: system,  Prev: gettimeofday,  Up: List of supported calls
3292
3293 isatty
3294 ......
3295
3296 Synopsis:
3297      int isatty(int fd);
3298      
3299 Request:
3300      Fisatty,fd
3301      
3302 Return value:
3303      Returns 1 if fd refers to the GDB console, 0 otherwise.
3304      
3305 Errors:
3306
3307
3308 `EINTR'
3309      The call was interrupted by the user.
3310
3311 \1f
3312 File: gdb.info,  Node: system,  Prev: isatty,  Up: List of supported calls
3313
3314 system
3315 ......
3316
3317 Synopsis:
3318      int system(const char *command);
3319      
3320 Request:
3321      Fsystem,commandptr/len
3322      
3323 Return value:
3324      The value returned is -1 on error and the return status
3325      of the command otherwise.  Only the exit status of the
3326      command is returned, which is extracted from the hosts
3327      system return value by calling WEXITSTATUS(retval).
3328      In case /bin/sh could not be executed, 127 is returned.
3329      
3330 Errors:
3331
3332
3333 `EINTR'
3334      The call was interrupted by the user.
3335
3336 \1f
3337 File: gdb.info,  Node: Protocol specific representation of datatypes,  Next: Constants,  Prev: List of supported calls,  Up: File-I/O remote protocol extension
3338
3339 Protocol specific representation of datatypes
3340 ---------------------------------------------
3341
3342 * Menu:
3343
3344 * Integral datatypes::
3345 * Pointer values::
3346 * struct stat::
3347 * struct timeval::
3348
3349 \1f
3350 File: gdb.info,  Node: Integral datatypes,  Next: Pointer values,  Up: Protocol specific representation of datatypes
3351
3352 Integral datatypes
3353 ..................
3354
3355 The integral datatypes used in the system calls are
3356
3357      int, unsigned int, long, unsigned long, mode_t and time_t
3358
3359    `Int', `unsigned int', `mode_t' and `time_t' are implemented as 32
3360 bit values in this protocol.
3361
3362    `Long' and `unsigned long' are implemented as 64 bit types.
3363
3364    *Note Limits::, for corresponding MIN and MAX values (similar to
3365 those in `limits.h') to allow range checking on host and target.
3366
3367    `time_t' datatypes are defined as seconds since the Epoch.
3368
3369    All integral datatypes transferred as part of a memory read or write
3370 of a structured datatype e.g. a `struct stat' have to be given in big
3371 endian byte order.
3372
3373 \1f
3374 File: gdb.info,  Node: Pointer values,  Next: struct stat,  Prev: Integral datatypes,  Up: Protocol specific representation of datatypes
3375
3376 Pointer values
3377 ..............
3378
3379 Pointers to target data are transmitted as they are.  An exception is
3380 made for pointers to buffers for which the length isn't transmitted as
3381 part of the function call, namely strings.  Strings are transmitted as
3382 a pointer/length pair, both as hex values, e.g.
3383
3384      `1aaf/12'
3385
3386 which is a pointer to data of length 18 bytes at position 0x1aaf.  The
3387 length is defined as the full string length in bytes, including the
3388 trailing null byte.  Example:
3389
3390      ``hello, world'' at address 0x123456
3391
3392 is transmitted as
3393
3394      `123456/d'
3395
3396 \1f
3397 File: gdb.info,  Node: struct stat,  Next: struct timeval,  Prev: Pointer values,  Up: Protocol specific representation of datatypes
3398
3399 struct stat
3400 ...........
3401
3402 The buffer of type struct stat used by the target and GDB is defined as
3403 follows:
3404
3405      struct stat {
3406          unsigned int  st_dev;      /* device */
3407          unsigned int  st_ino;      /* inode */
3408          mode_t        st_mode;     /* protection */
3409          unsigned int  st_nlink;    /* number of hard links */
3410          unsigned int  st_uid;      /* user ID of owner */
3411          unsigned int  st_gid;      /* group ID of owner */
3412          unsigned int  st_rdev;     /* device type (if inode device) */
3413          unsigned long st_size;     /* total size, in bytes */
3414          unsigned long st_blksize;  /* blocksize for filesystem I/O */
3415          unsigned long st_blocks;   /* number of blocks allocated */
3416          time_t        st_atime;    /* time of last access */
3417          time_t        st_mtime;    /* time of last modification */
3418          time_t        st_ctime;    /* time of last change */
3419      };
3420
3421    The integral datatypes are conforming to the definitions given in the
3422 approriate section (see *Note Integral datatypes::, for details) so this
3423 structure is of size 64 bytes.
3424
3425    The values of several fields have a restricted meaning and/or range
3426 of values.
3427
3428      st_dev:     0       file
3429                  1       console
3430      
3431      st_ino:     No valid meaning for the target.  Transmitted unchanged.
3432      
3433      st_mode:    Valid mode bits are described in Appendix C.  Any other
3434                  bits have currently no meaning for the target.
3435      
3436      st_uid:     No valid meaning for the target.  Transmitted unchanged.
3437      
3438      st_gid:     No valid meaning for the target.  Transmitted unchanged.
3439      
3440      st_rdev:    No valid meaning for the target.  Transmitted unchanged.
3441      
3442      st_atime, st_mtime, st_ctime:
3443                  These values have a host and file system dependent
3444                  accuracy.  Especially on Windows hosts the file systems
3445                  don't support exact timing values.
3446
3447    The target gets a struct stat of the above representation and is
3448 responsible to coerce it to the target representation before continuing.
3449
3450    Note that due to size differences between the host and target
3451 representation of stat members, these members could eventually get
3452 truncated on the target.
3453
3454 \1f
3455 File: gdb.info,  Node: struct timeval,  Prev: struct stat,  Up: Protocol specific representation of datatypes
3456
3457 struct timeval
3458 ..............
3459
3460 The buffer of type struct timeval used by the target and GDB is defined
3461 as follows:
3462
3463      struct timeval {
3464          time_t tv_sec;  /* second */
3465          long   tv_usec; /* microsecond */
3466      };
3467
3468    The integral datatypes are conforming to the definitions given in the
3469 approriate section (see *Note Integral datatypes::, for details) so this
3470 structure is of size 8 bytes.
3471
3472 \1f
3473 File: gdb.info,  Node: Constants,  Next: File-I/O Examples,  Prev: Protocol specific representation of datatypes,  Up: File-I/O remote protocol extension
3474
3475 Constants
3476 ---------
3477
3478 The following values are used for the constants inside of the protocol.
3479 GDB and target are resposible to translate these values before and
3480 after the call as needed.
3481
3482 * Menu:
3483
3484 * Open flags::
3485 * mode_t values::
3486 * Errno values::
3487 * Lseek flags::
3488 * Limits::
3489
3490 \1f
3491 File: gdb.info,  Node: Open flags,  Next: mode_t values,  Up: Constants
3492
3493 Open flags
3494 ..........
3495
3496 All values are given in hexadecimal representation.
3497
3498        O_RDONLY        0x0
3499        O_WRONLY        0x1
3500        O_RDWR          0x2
3501        O_APPEND        0x8
3502        O_CREAT       0x200
3503        O_TRUNC       0x400
3504        O_EXCL        0x800
3505
3506 \1f
3507 File: gdb.info,  Node: mode_t values,  Next: Errno values,  Prev: Open flags,  Up: Constants
3508
3509 mode_t values
3510 .............
3511
3512 All values are given in octal representation.
3513
3514        S_IFREG       0100000
3515        S_IFDIR        040000
3516        S_IRUSR          0400
3517        S_IWUSR          0200
3518        S_IXUSR          0100
3519        S_IRGRP           040
3520        S_IWGRP           020
3521        S_IXGRP           010
3522        S_IROTH            04
3523        S_IWOTH            02
3524        S_IXOTH            01
3525
3526 \1f
3527 File: gdb.info,  Node: Errno values,  Next: Lseek flags,  Prev: mode_t values,  Up: Constants
3528
3529 Errno values
3530 ............
3531
3532 All values are given in decimal representation.
3533
3534        EPERM           1
3535        ENOENT          2
3536        EINTR           4
3537        EBADF           9
3538        EACCES         13
3539        EFAULT         14
3540        EBUSY          16
3541        EEXIST         17
3542        ENODEV         19
3543        ENOTDIR        20
3544        EISDIR         21
3545        EINVAL         22
3546        ENFILE         23
3547        EMFILE         24
3548        EFBIG          27
3549        ENOSPC         28
3550        ESPIPE         29
3551        EROFS          30
3552        ENAMETOOLONG   91
3553        EUNKNOWN       9999
3554
3555    EUNKNOWN is used as a fallback error value if a host system returns
3556 any error value not in the list of supported error numbers.
3557
3558 \1f
3559 File: gdb.info,  Node: Lseek flags,  Next: Limits,  Prev: Errno values,  Up: Constants
3560
3561 Lseek flags
3562 ...........
3563
3564        SEEK_SET      0
3565        SEEK_CUR      1
3566        SEEK_END      2
3567
3568 \1f
3569 File: gdb.info,  Node: Limits,  Prev: Lseek flags,  Up: Constants
3570
3571 Limits
3572 ......
3573
3574 All values are given in decimal representation.
3575
3576        INT_MIN       -2147483648
3577        INT_MAX        2147483647
3578        UINT_MAX       4294967295
3579        LONG_MIN      -9223372036854775808
3580        LONG_MAX       9223372036854775807
3581        ULONG_MAX      18446744073709551615
3582
3583 \1f
3584 File: gdb.info,  Node: File-I/O Examples,  Prev: Constants,  Up: File-I/O remote protocol extension
3585
3586 File-I/O Examples
3587 -----------------
3588
3589 Example sequence of a write call, file descriptor 3, buffer is at target
3590 address 0x1234, 6 bytes should be written:
3591
3592      <- `Fwrite,3,1234,6'
3593      _request memory read from target_
3594      -> `m1234,6'
3595      <- XXXXXX
3596      _return "6 bytes written"_
3597      -> `F6'
3598
3599    Example sequence of a read call, file descriptor 3, buffer is at
3600 target address 0x1234, 6 bytes should be read:
3601
3602      <- `Fread,3,1234,6'
3603      _request memory write to target_
3604      -> `X1234,6:XXXXXX'
3605      _return "6 bytes read"_
3606      -> `F6'
3607
3608    Example sequence of a read call, call fails on the host due to
3609 invalid file descriptor (EBADF):
3610
3611      <- `Fread,3,1234,6'
3612      -> `F-1,9'
3613
3614    Example sequence of a read call, user presses Ctrl-C before syscall
3615 on host is called:
3616
3617      <- `Fread,3,1234,6'
3618      -> `F-1,4,C'
3619      <- `T02'
3620
3621    Example sequence of a read call, user presses Ctrl-C after syscall on
3622 host is called:
3623
3624      <- `Fread,3,1234,6'
3625      -> `X1234,6:XXXXXX'
3626      <- `T02'
3627
3628 \1f
3629 File: gdb.info,  Node: Agent Expressions,  Next: Copying,  Prev: Remote Protocol,  Up: Top
3630
3631 The GDB Agent Expression Mechanism
3632 **********************************
3633
3634 In some applications, it is not feasable for the debugger to interrupt
3635 the program's execution long enough for the developer to learn anything
3636 helpful about its behavior.  If the program's correctness depends on its
3637 real-time behavior, delays introduced by a debugger might cause the
3638 program to fail, even when the code itself is correct.  It is useful to
3639 be able to observe the program's behavior without interrupting it.
3640
3641    Using GDB's `trace' and `collect' commands, the user can specify
3642 locations in the program, and arbitrary expressions to evaluate when
3643 those locations are reached.  Later, using the `tfind' command, she can
3644 examine the values those expressions had when the program hit the trace
3645 points.  The expressions may also denote objects in memory --
3646 structures or arrays, for example -- whose values GDB should record;
3647 while visiting a particular tracepoint, the user may inspect those
3648 objects as if they were in memory at that moment.  However, because GDB
3649 records these values without interacting with the user, it can do so
3650 quickly and unobtrusively, hopefully not disturbing the program's
3651 behavior.
3652
3653    When GDB is debugging a remote target, the GDB "agent" code running
3654 on the target computes the values of the expressions itself.  To avoid
3655 having a full symbolic expression evaluator on the agent, GDB translates
3656 expressions in the source language into a simpler bytecode language, and
3657 then sends the bytecode to the agent; the agent then executes the
3658 bytecode, and records the values for GDB to retrieve later.
3659
3660    The bytecode language is simple; there are forty-odd opcodes, the
3661 bulk of which are the usual vocabulary of C operands (addition,
3662 subtraction, shifts, and so on) and various sizes of literals and
3663 memory reference operations.  The bytecode interpreter operates
3664 strictly on machine-level values -- various sizes of integers and
3665 floating point numbers -- and requires no information about types or
3666 symbols; thus, the interpreter's internal data structures are simple,
3667 and each bytecode requires only a few native machine instructions to
3668 implement it.  The interpreter is small, and strict limits on the
3669 memory and time required to evaluate an expression are easy to
3670 determine, making it suitable for use by the debugging agent in
3671 real-time applications.
3672
3673 * Menu:
3674
3675 * General Bytecode Design::     Overview of the interpreter.
3676 * Bytecode Descriptions::       What each one does.
3677 * Using Agent Expressions::     How agent expressions fit into the big picture.
3678 * Varying Target Capabilities:: How to discover what the target can do.
3679 * Tracing on Symmetrix::        Special info for implementation on EMC's
3680                                 boxes.
3681 * Rationale::                   Why we did it this way.
3682
3683 \1f
3684 File: gdb.info,  Node: General Bytecode Design,  Next: Bytecode Descriptions,  Up: Agent Expressions
3685
3686 General Bytecode Design
3687 =======================
3688
3689 The agent represents bytecode expressions as an array of bytes.  Each
3690 instruction is one byte long (thus the term "bytecode").  Some
3691 instructions are followed by operand bytes; for example, the `goto'
3692 instruction is followed by a destination for the jump.
3693
3694    The bytecode interpreter is a stack-based machine; most instructions
3695 pop their operands off the stack, perform some operation, and push the
3696 result back on the stack for the next instruction to consume.  Each
3697 element of the stack may contain either a integer or a floating point
3698 value; these values are as many bits wide as the largest integer that
3699 can be directly manipulated in the source language.  Stack elements
3700 carry no record of their type; bytecode could push a value as an
3701 integer, then pop it as a floating point value.  However, GDB will not
3702 generate code which does this.  In C, one might define the type of a
3703 stack element as follows:
3704      union agent_val {
3705        LONGEST l;
3706        DOUBLEST d;
3707      };
3708
3709 where `LONGEST' and `DOUBLEST' are `typedef' names for the largest
3710 integer and floating point types on the machine.
3711
3712    By the time the bytecode interpreter reaches the end of the
3713 expression, the value of the expression should be the only value left
3714 on the stack.  For tracing applications, `trace' bytecodes in the
3715 expression will have recorded the necessary data, and the value on the
3716 stack may be discarded.  For other applications, like conditional
3717 breakpoints, the value may be useful.
3718
3719    Separate from the stack, the interpreter has two registers:
3720 `pc'
3721      The address of the next bytecode to execute.
3722
3723 `start'
3724      The address of the start of the bytecode expression, necessary for
3725      interpreting the `goto' and `if_goto' instructions.
3726
3727
3728 Neither of these registers is directly visible to the bytecode language
3729 itself, but they are useful for defining the meanings of the bytecode
3730 operations.
3731
3732    There are no instructions to perform side effects on the running
3733 program, or call the program's functions; we assume that these
3734 expressions are only used for unobtrusive debugging, not for patching
3735 the running code.
3736
3737    Most bytecode instructions do not distinguish between the various
3738 sizes of values, and operate on full-width values; the upper bits of the
3739 values are simply ignored, since they do not usually make a difference
3740 to the value computed.  The exceptions to this rule are:
3741 memory reference instructions (`ref'N)
3742      There are distinct instructions to fetch different word sizes from
3743      memory.  Once on the stack, however, the values are treated as
3744      full-size integers.  They may need to be sign-extended; the `ext'
3745      instruction exists for this purpose.
3746
3747 the sign-extension instruction (`ext' N)
3748      These clearly need to know which portion of their operand is to be
3749      extended to occupy the full length of the word.
3750
3751
3752    If the interpreter is unable to evaluate an expression completely for
3753 some reason (a memory location is inaccessible, or a divisor is zero,
3754 for example), we say that interpretation "terminates with an error".
3755 This means that the problem is reported back to the interpreter's caller
3756 in some helpful way.  In general, code using agent expressions should
3757 assume that they may attempt to divide by zero, fetch arbitrary memory
3758 locations, and misbehave in other ways.
3759
3760    Even complicated C expressions compile to a few bytecode
3761 instructions; for example, the expression `x + y * z' would typically
3762 produce code like the following, assuming that `x' and `y' live in
3763 registers, and `z' is a global variable holding a 32-bit `int':
3764      reg 1
3765      reg 2
3766      const32 address of z
3767      ref32
3768      ext 32
3769      mul
3770      add
3771      end
3772
3773    In detail, these mean:
3774 `reg 1'
3775      Push the value of register 1 (presumably holding `x') onto the
3776      stack.
3777
3778 `reg 2'
3779      Push the value of register 2 (holding `y').
3780
3781 `const32 address of z'
3782      Push the address of `z' onto the stack.
3783
3784 `ref32'
3785      Fetch a 32-bit word from the address at the top of the stack;
3786      replace the address on the stack with the value.  Thus, we replace
3787      the address of `z' with `z''s value.
3788
3789 `ext 32'
3790      Sign-extend the value on the top of the stack from 32 bits to full
3791      length.  This is necessary because `z' is a signed integer.
3792
3793 `mul'
3794      Pop the top two numbers on the stack, multiply them, and push their
3795      product.  Now the top of the stack contains the value of the
3796      expression `y * z'.
3797
3798 `add'
3799      Pop the top two numbers, add them, and push the sum.  Now the top
3800      of the stack contains the value of `x + y * z'.
3801
3802 `end'
3803      Stop executing; the value left on the stack top is the value to be
3804      recorded.
3805
3806
3807 \1f
3808 File: gdb.info,  Node: Bytecode Descriptions,  Next: Using Agent Expressions,  Prev: General Bytecode Design,  Up: Agent Expressions
3809
3810 Bytecode Descriptions
3811 =====================
3812
3813 Each bytecode description has the following form:
3814
3815 `add' (0x02): A B => A+B
3816      Pop the top two stack items, A and B, as integers; push their sum,
3817      as an integer.
3818
3819
3820    In this example, `add' is the name of the bytecode, and `(0x02)' is
3821 the one-byte value used to encode the bytecode, in hexidecimal.  The
3822 phrase "A B => A+B" shows the stack before and after the bytecode
3823 executes.  Beforehand, the stack must contain at least two values, A
3824 and B; since the top of the stack is to the right, B is on the top of
3825 the stack, and A is underneath it.  After execution, the bytecode will
3826 have popped A and B from the stack, and replaced them with a single
3827 value, A+B.  There may be other values on the stack below those shown,
3828 but the bytecode affects only those shown.
3829
3830    Here is another example:
3831
3832 `const8' (0x22) N: => N
3833      Push the 8-bit integer constant N on the stack, without sign
3834      extension.
3835
3836
3837    In this example, the bytecode `const8' takes an operand N directly
3838 from the bytecode stream; the operand follows the `const8' bytecode
3839 itself.  We write any such operands immediately after the name of the
3840 bytecode, before the colon, and describe the exact encoding of the
3841 operand in the bytecode stream in the body of the bytecode description.
3842
3843    For the `const8' bytecode, there are no stack items given before the
3844 =>; this simply means that the bytecode consumes no values from the
3845 stack.  If a bytecode consumes no values, or produces no values, the
3846 list on either side of the => may be empty.
3847
3848    If a value is written as A, B, or N, then the bytecode treats it as
3849 an integer.  If a value is written is ADDR, then the bytecode treats it
3850 as an address.
3851
3852    We do not fully describe the floating point operations here; although
3853 this design can be extended in a clean way to handle floating point
3854 values, they are not of immediate interest to the customer, so we avoid
3855 describing them, to save time.
3856
3857 `float' (0x01): =>
3858      Prefix for floating-point bytecodes.  Not implemented yet.
3859
3860 `add' (0x02): A B => A+B
3861      Pop two integers from the stack, and push their sum, as an integer.
3862
3863 `sub' (0x03): A B => A-B
3864      Pop two integers from the stack, subtract the top value from the
3865      next-to-top value, and push the difference.
3866
3867 `mul' (0x04): A B => A*B
3868      Pop two integers from the stack, multiply them, and push the
3869      product on the stack.  Note that, when one multiplies two N-bit
3870      numbers yielding another N-bit number, it is irrelevant whether the
3871      numbers are signed or not; the results are the same.
3872
3873 `div_signed' (0x05): A B => A/B
3874      Pop two signed integers from the stack; divide the next-to-top
3875      value by the top value, and push the quotient.  If the divisor is
3876      zero, terminate with an error.
3877
3878 `div_unsigned' (0x06): A B => A/B
3879      Pop two unsigned integers from the stack; divide the next-to-top
3880      value by the top value, and push the quotient.  If the divisor is
3881      zero, terminate with an error.
3882
3883 `rem_signed' (0x07): A B => A MODULO B
3884      Pop two signed integers from the stack; divide the next-to-top
3885      value by the top value, and push the remainder.  If the divisor is
3886      zero, terminate with an error.
3887
3888 `rem_unsigned' (0x08): A B => A MODULO B
3889      Pop two unsigned integers from the stack; divide the next-to-top
3890      value by the top value, and push the remainder.  If the divisor is
3891      zero, terminate with an error.
3892
3893 `lsh' (0x09): A B => A<<B
3894      Pop two integers from the stack; let A be the next-to-top value,
3895      and B be the top value.  Shift A left by B bits, and push the
3896      result.
3897
3898 `rsh_signed' (0x0a): A B => `(signed)'A>>B
3899      Pop two integers from the stack; let A be the next-to-top value,
3900      and B be the top value.  Shift A right by B bits, inserting copies
3901      of the top bit at the high end, and push the result.
3902
3903 `rsh_unsigned' (0x0b): A B => A>>B
3904      Pop two integers from the stack; let A be the next-to-top value,
3905      and B be the top value.  Shift A right by B bits, inserting zero
3906      bits at the high end, and push the result.
3907
3908 `log_not' (0x0e): A => !A
3909      Pop an integer from the stack; if it is zero, push the value one;
3910      otherwise, push the value zero.
3911
3912 `bit_and' (0x0f): A B => A&B
3913      Pop two integers from the stack, and push their bitwise `and'.
3914
3915 `bit_or' (0x10): A B => A|B
3916      Pop two integers from the stack, and push their bitwise `or'.
3917
3918 `bit_xor' (0x11): A B => A^B
3919      Pop two integers from the stack, and push their bitwise
3920      exclusive-`or'.
3921
3922 `bit_not' (0x12): A => ~A
3923      Pop an integer from the stack, and push its bitwise complement.
3924
3925 `equal' (0x13): A B => A=B
3926      Pop two integers from the stack; if they are equal, push the value
3927      one; otherwise, push the value zero.
3928
3929 `less_signed' (0x14): A B => A<B
3930      Pop two signed integers from the stack; if the next-to-top value
3931      is less than the top value, push the value one; otherwise, push
3932      the value zero.
3933
3934 `less_unsigned' (0x15): A B => A<B
3935      Pop two unsigned integers from the stack; if the next-to-top value
3936      is less than the top value, push the value one; otherwise, push
3937      the value zero.
3938
3939 `ext' (0x16) N: A => A, sign-extended from N bits
3940      Pop an unsigned value from the stack; treating it as an N-bit
3941      twos-complement value, extend it to full length.  This means that
3942      all bits to the left of bit N-1 (where the least significant bit
3943      is bit 0) are set to the value of bit N-1.  Note that N may be
3944      larger than or equal to the width of the stack elements of the
3945      bytecode engine; in this case, the bytecode should have no effect.
3946
3947      The number of source bits to preserve, N, is encoded as a single
3948      byte unsigned integer following the `ext' bytecode.
3949
3950 `zero_ext' (0x2a) N: A => A, zero-extended from N bits
3951      Pop an unsigned value from the stack; zero all but the bottom N
3952      bits.  This means that all bits to the left of bit N-1 (where the
3953      least significant bit is bit 0) are set to the value of bit N-1.
3954
3955      The number of source bits to preserve, N, is encoded as a single
3956      byte unsigned integer following the `zero_ext' bytecode.
3957
3958 `ref8' (0x17): ADDR => A
3959 `ref16' (0x18): ADDR => A
3960 `ref32' (0x19): ADDR => A
3961 `ref64' (0x1a): ADDR => A
3962      Pop an address ADDR from the stack.  For bytecode `ref'N, fetch an
3963      N-bit value from ADDR, using the natural target endianness.  Push
3964      the fetched value as an unsigned integer.
3965
3966      Note that ADDR may not be aligned in any particular way; the
3967      `refN' bytecodes should operate correctly for any address.
3968
3969      If attempting to access memory at ADDR would cause a processor
3970      exception of some sort, terminate with an error.
3971
3972 `ref_float' (0x1b): ADDR => D
3973 `ref_double' (0x1c): ADDR => D
3974 `ref_long_double' (0x1d): ADDR => D
3975 `l_to_d' (0x1e): A => D
3976 `d_to_l' (0x1f): D => A
3977      Not implemented yet.
3978
3979 `dup' (0x28): A => A A
3980      Push another copy of the stack's top element.
3981
3982 `swap' (0x2b): A B => B A
3983      Exchange the top two items on the stack.
3984
3985 `pop' (0x29): A =>
3986      Discard the top value on the stack.
3987
3988 `if_goto' (0x20) OFFSET: A =>
3989      Pop an integer off the stack; if it is non-zero, branch to the
3990      given offset in the bytecode string.  Otherwise, continue to the
3991      next instruction in the bytecode stream.  In other words, if A is
3992      non-zero, set the `pc' register to `start' + OFFSET.  Thus, an
3993      offset of zero denotes the beginning of the expression.
3994
3995      The OFFSET is stored as a sixteen-bit unsigned value, stored
3996      immediately following the `if_goto' bytecode.  It is always stored
3997      most significant byte first, regardless of the target's normal
3998      endianness.  The offset is not guaranteed to fall at any particular
3999      alignment within the bytecode stream; thus, on machines where
4000      fetching a 16-bit on an unaligned address raises an exception, you
4001      should fetch the offset one byte at a time.
4002
4003 `goto' (0x21) OFFSET: =>
4004      Branch unconditionally to OFFSET; in other words, set the `pc'
4005      register to `start' + OFFSET.
4006
4007      The offset is stored in the same way as for the `if_goto' bytecode.
4008
4009 `const8' (0x22) N: => N
4010 `const16' (0x23) N: => N
4011 `const32' (0x24) N: => N
4012 `const64' (0x25) N: => N
4013      Push the integer constant N on the stack, without sign extension.
4014      To produce a small negative value, push a small twos-complement
4015      value, and then sign-extend it using the `ext' bytecode.
4016
4017      The constant N is stored in the appropriate number of bytes
4018      following the `const'B bytecode.  The constant N is always stored
4019      most significant byte first, regardless of the target's normal
4020      endianness.  The constant is not guaranteed to fall at any
4021      particular alignment within the bytecode stream; thus, on machines
4022      where fetching a 16-bit on an unaligned address raises an
4023      exception, you should fetch N one byte at a time.
4024
4025 `reg' (0x26) N: => A
4026      Push the value of register number N, without sign extension.  The
4027      registers are numbered following GDB's conventions.
4028
4029      The register number N is encoded as a 16-bit unsigned integer
4030      immediately following the `reg' bytecode.  It is always stored most
4031      significant byte first, regardless of the target's normal
4032      endianness.  The register number is not guaranteed to fall at any
4033      particular alignment within the bytecode stream; thus, on machines
4034      where fetching a 16-bit on an unaligned address raises an
4035      exception, you should fetch the register number one byte at a time.
4036
4037 `trace' (0x0c): ADDR SIZE =>
4038      Record the contents of the SIZE bytes at ADDR in a trace buffer,
4039      for later retrieval by GDB.
4040
4041 `trace_quick' (0x0d) SIZE: ADDR => ADDR
4042      Record the contents of the SIZE bytes at ADDR in a trace buffer,
4043      for later retrieval by GDB.  SIZE is a single byte unsigned
4044      integer following the `trace' opcode.
4045
4046      This bytecode is equivalent to the sequence `dup const8 SIZE
4047      trace', but we provide it anyway to save space in bytecode strings.
4048
4049 `trace16' (0x30) SIZE: ADDR => ADDR
4050      Identical to trace_quick, except that SIZE is a 16-bit big-endian
4051      unsigned integer, not a single byte.  This should probably have
4052      been named `trace_quick16', for consistency.
4053
4054 `end' (0x27): =>
4055      Stop executing bytecode; the result should be the top element of
4056      the stack.  If the purpose of the expression was to compute an
4057      lvalue or a range of memory, then the next-to-top of the stack is
4058      the lvalue's address, and the top of the stack is the lvalue's
4059      size, in bytes.
4060
4061
4062 \1f
4063 File: gdb.info,  Node: Using Agent Expressions,  Next: Varying Target Capabilities,  Prev: Bytecode Descriptions,  Up: Agent Expressions
4064
4065 Using Agent Expressions
4066 =======================
4067
4068 Here is a sketch of a full non-stop debugging cycle, showing how agent
4069 expressions fit into the process.
4070
4071    * The user selects trace points in the program's code at which GDB
4072      should collect data.
4073
4074    * The user specifies expressions to evaluate at each trace point.
4075      These expressions may denote objects in memory, in which case
4076      those objects' contents are recorded as the program runs, or
4077      computed values, in which case the values themselves are recorded.
4078
4079    * GDB transmits the tracepoints and their associated expressions to
4080      the GDB agent, running on the debugging target.
4081
4082    * The agent arranges to be notified when a trace point is hit.  Note
4083      that, on some systems, the target operating system is completely
4084      responsible for collecting the data; see *Note Tracing on
4085      Symmetrix::.
4086
4087    * When execution on the target reaches a trace point, the agent
4088      evaluates the expressions associated with that trace point, and
4089      records the resulting values and memory ranges.
4090
4091    * Later, when the user selects a given trace event and inspects the
4092      objects and expression values recorded, GDB talks to the agent to
4093      retrieve recorded data as necessary to meet the user's requests.
4094      If the user asks to see an object whose contents have not been
4095      recorded, GDB reports an error.
4096
4097
4098 \1f
4099 File: gdb.info,  Node: Varying Target Capabilities,  Next: Tracing on Symmetrix,  Prev: Using Agent Expressions,  Up: Agent Expressions
4100
4101 Varying Target Capabilities
4102 ===========================
4103
4104 Some targets don't support floating-point, and some would rather not
4105 have to deal with `long long' operations.  Also, different targets will
4106 have different stack sizes, and different bytecode buffer lengths.
4107
4108    Thus, GDB needs a way to ask the target about itself.  We haven't
4109 worked out the details yet, but in general, GDB should be able to send
4110 the target a packet asking it to describe itself.  The reply should be a
4111 packet whose length is explicit, so we can add new information to the
4112 packet in future revisions of the agent, without confusing old versions
4113 of GDB, and it should contain a version number.  It should contain at
4114 least the following information:
4115
4116    * whether floating point is supported
4117
4118    * whether `long long' is supported
4119
4120    * maximum acceptable size of bytecode stack
4121
4122    * maximum acceptable length of bytecode expressions
4123
4124    * which registers are actually available for collection
4125
4126    * whether the target supports disabled tracepoints
4127
4128
4129 \1f
4130 File: gdb.info,  Node: Tracing on Symmetrix,  Next: Rationale,  Prev: Varying Target Capabilities,  Up: Agent Expressions
4131
4132 Tracing on Symmetrix
4133 ====================
4134
4135 This section documents the API used by the GDB agent to collect data on
4136 Symmetrix systems.
4137
4138    Cygnus originally implemented these tracing features to help EMC
4139 Corporation debug their Symmetrix high-availability disk drives.  The
4140 Symmetrix application code already includes substantial tracing
4141 facilities; the GDB agent for the Symmetrix system uses those facilities
4142 for its own data collection, via the API described here.
4143
4144  - Function: DTC_RESPONSE adbg_find_memory_in_frame (FRAME_DEF *FRAME,
4145           char *ADDRESS, char **BUFFER, unsigned int *SIZE)
4146      Search the trace frame FRAME for memory saved from ADDRESS.  If
4147      the memory is available, provide the address of the buffer holding
4148      it; otherwise, provide the address of the next saved area.
4149
4150         * If the memory at ADDRESS was saved in FRAME, set `*BUFFER' to
4151           point to the buffer in which that memory was saved, set
4152           `*SIZE' to the number of bytes from ADDRESS that are saved at
4153           `*BUFFER', and return `OK_TARGET_RESPONSE'.  (Clearly, in
4154           this case, the function will always set `*SIZE' to a value
4155           greater than zero.)
4156
4157         * If FRAME does not record any memory at ADDRESS, set `*SIZE'
4158           to the distance from ADDRESS to the start of the saved region
4159           with the lowest address higher than ADDRESS.  If there is no
4160           memory saved from any higher address, set `*SIZE' to zero.
4161           Return `NOT_FOUND_TARGET_RESPONSE'.
4162
4163      These two possibilities allow the caller to either retrieve the
4164      data, or walk the address space to the next saved area.
4165
4166    This function allows the GDB agent to map the regions of memory
4167 saved in a particular frame, and retrieve their contents efficiently.
4168
4169    This function also provides a clean interface between the GDB agent
4170 and the Symmetrix tracing structures, making it easier to adapt the GDB
4171 agent to future versions of the Symmetrix system, and vice versa.  This
4172 function searches all data saved in FRAME, whether the data is there at
4173 the request of a bytecode expression, or because it falls in one of the
4174 format's memory ranges, or because it was saved from the top of the
4175 stack.  EMC can arbitrarily change and enhance the tracing mechanism,
4176 but as long as this function works properly, all collected memory is
4177 visible to GDB.
4178
4179    The function itself is straightforward to implement.  A single pass
4180 over the trace frame's stack area, memory ranges, and expression blocks
4181 can yield the address of the buffer (if the requested address was
4182 saved), and also note the address of the next higher range of memory,
4183 to be returned when the search fails.
4184
4185    As an example, suppose the trace frame `f' has saved sixteen bytes
4186 from address `0x8000' in a buffer at `0x1000', and thirty-two bytes
4187 from address `0xc000' in a buffer at `0x1010'.  Here are some sample
4188 calls, and the effect each would have:
4189
4190 `adbg_find_memory_in_frame (f, (char*) 0x8000, &buffer, &size)'
4191      This would set `buffer' to `0x1000', set `size' to sixteen, and
4192      return `OK_TARGET_RESPONSE', since `f' saves sixteen bytes from
4193      `0x8000' at `0x1000'.
4194
4195 `adbg_find_memory_in_frame (f, (char *) 0x8004, &buffer, &size)'
4196      This would set `buffer' to `0x1004', set `size' to twelve, and
4197      return `OK_TARGET_RESPONSE', since `f' saves the twelve bytes from
4198      `0x8004' starting four bytes into the buffer at `0x1000'.  This
4199      shows that request addresses may fall in the middle of saved
4200      areas; the function should return the address and size of the
4201      remainder of the buffer.
4202
4203 `adbg_find_memory_in_frame (f, (char *) 0x8100, &buffer, &size)'
4204      This would set `size' to `0x3f00' and return
4205      `NOT_FOUND_TARGET_RESPONSE', since there is no memory saved in `f'
4206      from the address `0x8100', and the next memory available is at
4207      `0x8100 + 0x3f00', or `0xc000'.  This shows that request addresses
4208      may fall outside of all saved memory ranges; the function should
4209      indicate the next saved area, if any.
4210
4211 `adbg_find_memory_in_frame (f, (char *) 0x7000, &buffer, &size)'
4212      This would set `size' to `0x1000' and return
4213      `NOT_FOUND_TARGET_RESPONSE', since the next saved memory is at
4214      `0x7000 + 0x1000', or `0x8000'.
4215
4216 `adbg_find_memory_in_frame (f, (char *) 0xf000, &buffer, &size)'
4217      This would set `size' to zero, and return
4218      `NOT_FOUND_TARGET_RESPONSE'.  This shows how the function tells the
4219      caller that no further memory ranges have been saved.
4220
4221
4222    As another example, here is a function which will print out the
4223 addresses of all memory saved in the trace frame `frame' on the
4224 Symmetrix INLINES console:
4225      void
4226      print_frame_addresses (FRAME_DEF *frame)
4227      {
4228        char *addr;
4229        char *buffer;
4230        unsigned long size;
4231      
4232        addr = 0;
4233        for (;;)
4234          {
4235            /* Either find out how much memory we have here, or discover
4236               where the next saved region is.  */
4237            if (adbg_find_memory_in_frame (frame, addr, &buffer, &size)
4238                == OK_TARGET_RESPONSE)
4239              printp ("saved %x to %x\n", addr, addr + size);
4240            if (size == 0)
4241              break;
4242            addr += size;
4243          }
4244      }
4245
4246    Note that there is not necessarily any connection between the order
4247 in which the data is saved in the trace frame, and the order in which
4248 `adbg_find_memory_in_frame' will return those memory ranges.  The code
4249 above will always print the saved memory regions in order of increasing
4250 address, while the underlying frame structure might store the data in a
4251 random order.
4252
4253    [[This section should cover the rest of the Symmetrix functions the
4254 stub relies upon, too.]]
4255
4256 \1f
4257 File: gdb.info,  Node: Rationale,  Prev: Tracing on Symmetrix,  Up: Agent Expressions
4258
4259 Rationale
4260 =========
4261
4262 Some of the design decisions apparent above are arguable.
4263
4264 What about stack overflow/underflow?
4265      GDB should be able to query the target to discover its stack size.
4266      Given that information, GDB can determine at translation time
4267      whether a given expression will overflow the stack.  But this spec
4268      isn't about what kinds of error-checking GDB ought to do.
4269
4270 Why are you doing everything in LONGEST?
4271      Speed isn't important, but agent code size is; using LONGEST
4272      brings in a bunch of support code to do things like division, etc.
4273      So this is a serious concern.
4274
4275      First, note that you don't need different bytecodes for different
4276      operand sizes.  You can generate code without _knowing_ how big the
4277      stack elements actually are on the target.  If the target only
4278      supports 32-bit ints, and you don't send any 64-bit bytecodes,
4279      everything just works.  The observation here is that the MIPS and
4280      the Alpha have only fixed-size registers, and you can still get
4281      C's semantics even though most instructions only operate on
4282      full-sized words.  You just need to make sure everything is
4283      properly sign-extended at the right times.  So there is no need
4284      for 32- and 64-bit variants of the bytecodes.  Just implement
4285      everything using the largest size you support.
4286
4287      GDB should certainly check to see what sizes the target supports,
4288      so the user can get an error earlier, rather than later.  But this
4289      information is not necessary for correctness.
4290
4291 Why don't you have `>' or `<=' operators?
4292      I want to keep the interpreter small, and we don't need them.  We
4293      can combine the `less_' opcodes with `log_not', and swap the order
4294      of the operands, yielding all four asymmetrical comparison
4295      operators.  For example, `(x <= y)' is `! (x > y)', which is `! (y
4296      < x)'.
4297
4298 Why do you have `log_not'?
4299 Why do you have `ext'?
4300 Why do you have `zero_ext'?
4301      These are all easily synthesized from other instructions, but I
4302      expect them to be used frequently, and they're simple, so I
4303      include them to keep bytecode strings short.
4304
4305      `log_not' is equivalent to `const8 0 equal'; it's used in half the
4306      relational operators.
4307
4308      `ext N' is equivalent to `const8 S-N lsh const8 S-N rsh_signed',
4309      where S is the size of the stack elements; it follows `refM' and
4310      REG bytecodes when the value should be signed.  See the next
4311      bulleted item.
4312
4313      `zero_ext N' is equivalent to `constM MASK log_and'; it's used
4314      whenever we push the value of a register, because we can't assume
4315      the upper bits of the register aren't garbage.
4316
4317 Why not have sign-extending variants of the `ref' operators?
4318      Because that would double the number of `ref' operators, and we
4319      need the `ext' bytecode anyway for accessing bitfields.
4320
4321 Why not have constant-address variants of the `ref' operators?
4322      Because that would double the number of `ref' operators again, and
4323      `const32 ADDRESS ref32' is only one byte longer.
4324
4325 Why do the `refN' operators have to support unaligned fetches?
4326      GDB will generate bytecode that fetches multi-byte values at
4327      unaligned addresses whenever the executable's debugging
4328      information tells it to.  Furthermore, GDB does not know the value
4329      the pointer will have when GDB generates the bytecode, so it
4330      cannot determine whether a particular fetch will be aligned or not.
4331
4332      In particular, structure bitfields may be several bytes long, but
4333      follow no alignment rules; members of packed structures are not
4334      necessarily aligned either.
4335
4336      In general, there are many cases where unaligned references occur
4337      in correct C code, either at the programmer's explicit request, or
4338      at the compiler's discretion.  Thus, it is simpler to make the GDB
4339      agent bytecodes work correctly in all circumstances than to make
4340      GDB guess in each case whether the compiler did the usual thing.
4341
4342 Why are there no side-effecting operators?
4343      Because our current client doesn't want them?  That's a cheap
4344      answer.  I think the real answer is that I'm afraid of
4345      implementing function calls.  We should re-visit this issue after
4346      the present contract is delivered.
4347
4348 Why aren't the `goto' ops PC-relative?
4349      The interpreter has the base address around anyway for PC bounds
4350      checking, and it seemed simpler.
4351
4352 Why is there only one offset size for the `goto' ops?
4353      Offsets are currently sixteen bits.  I'm not happy with this
4354      situation either:
4355
4356      Suppose we have multiple branch ops with different offset sizes.
4357      As I generate code left-to-right, all my jumps are forward jumps
4358      (there are no loops in expressions), so I never know the target
4359      when I emit the jump opcode.  Thus, I have to either always assume
4360      the largest offset size, or do jump relaxation on the code after I
4361      generate it, which seems like a big waste of time.
4362
4363      I can imagine a reasonable expression being longer than 256 bytes.
4364      I can't imagine one being longer than 64k.  Thus, we need 16-bit
4365      offsets.  This kind of reasoning is so bogus, but relaxation is
4366      pathetic.
4367
4368      The other approach would be to generate code right-to-left.  Then
4369      I'd always know my offset size.  That might be fun.
4370
4371 Where is the function call bytecode?
4372      When we add side-effects, we should add this.
4373
4374 Why does the `reg' bytecode take a 16-bit register number?
4375      Intel's IA-64 architecture has 128 general-purpose registers, and
4376      128 floating-point registers, and I'm sure it has some random
4377      control registers.
4378
4379 Why do we need `trace' and `trace_quick'?
4380      Because GDB needs to record all the memory contents and registers
4381      an expression touches.  If the user wants to evaluate an expression
4382      `x->y->z', the agent must record the values of `x' and `x->y' as
4383      well as the value of `x->y->z'.
4384
4385 Don't the `trace' bytecodes make the interpreter less general?
4386      They do mean that the interpreter contains special-purpose code,
4387      but that doesn't mean the interpreter can only be used for that
4388      purpose.  If an expression doesn't use the `trace' bytecodes, they
4389      don't get in its way.
4390
4391 Why doesn't `trace_quick' consume its arguments the way everything else does?
4392      In general, you do want your operators to consume their arguments;
4393      it's consistent, and generally reduces the amount of stack
4394      rearrangement necessary.  However, `trace_quick' is a kludge to
4395      save space; it only exists so we needn't write `dup const8 SIZE
4396      trace' before every memory reference.  Therefore, it's okay for it
4397      not to consume its arguments; it's meant for a specific context in
4398      which we know exactly what it should do with the stack.  If we're
4399      going to have a kludge, it should be an effective kludge.
4400
4401 Why does `trace16' exist?
4402      That opcode was added by the customer that contracted Cygnus for
4403      the data tracing work.  I personally think it is unnecessary;
4404      objects that large will be quite rare, so it is okay to use `dup
4405      const16 SIZE trace' in those cases.
4406
4407      Whatever we decide to do with `trace16', we should at least leave
4408      opcode 0x30 reserved, to remain compatible with the customer who
4409      added it.
4410
4411
4412 \1f
4413 File: gdb.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Agent Expressions,  Up: Top
4414
4415 GNU GENERAL PUBLIC LICENSE
4416 **************************
4417
4418                          Version 2, June 1991
4419      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4420      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
4421      
4422      Everyone is permitted to copy and distribute verbatim copies
4423      of this license document, but changing it is not allowed.
4424
4425 Preamble
4426 ========
4427
4428 The licenses for most software are designed to take away your freedom
4429 to share and change it.  By contrast, the GNU General Public License is
4430 intended to guarantee your freedom to share and change free
4431 software--to make sure the software is free for all its users.  This
4432 General Public License applies to most of the Free Software
4433 Foundation's software and to any other program whose authors commit to
4434 using it.  (Some other Free Software Foundation software is covered by
4435 the GNU Library General Public License instead.)  You can apply it to
4436 your programs, too.
4437
4438    When we speak of free software, we are referring to freedom, not
4439 price.  Our General Public Licenses are designed to make sure that you
4440 have the freedom to distribute copies of free software (and charge for
4441 this service if you wish), that you receive source code or can get it
4442 if you want it, that you can change the software or use pieces of it in
4443 new free programs; and that you know you can do these things.
4444
4445    To protect your rights, we need to make restrictions that forbid
4446 anyone to deny you these rights or to ask you to surrender the rights.
4447 These restrictions translate to certain responsibilities for you if you
4448 distribute copies of the software, or if you modify it.
4449
4450    For example, if you distribute copies of such a program, whether
4451 gratis or for a fee, you must give the recipients all the rights that
4452 you have.  You must make sure that they, too, receive or can get the
4453 source code.  And you must show them these terms so they know their
4454 rights.
4455
4456    We protect your rights with two steps: (1) copyright the software,
4457 and (2) offer you this license which gives you legal permission to copy,
4458 distribute and/or modify the software.
4459
4460    Also, for each author's protection and ours, we want to make certain
4461 that everyone understands that there is no warranty for this free
4462 software.  If the software is modified by someone else and passed on, we
4463 want its recipients to know that what they have is not the original, so
4464 that any problems introduced by others will not reflect on the original
4465 authors' reputations.
4466
4467    Finally, any free program is threatened constantly by software
4468 patents.  We wish to avoid the danger that redistributors of a free
4469 program will individually obtain patent licenses, in effect making the
4470 program proprietary.  To prevent this, we have made it clear that any
4471 patent must be licensed for everyone's free use or not licensed at all.
4472
4473    The precise terms and conditions for copying, distribution and
4474 modification follow.
4475
4476     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
4477   0. This License applies to any program or other work which contains a
4478      notice placed by the copyright holder saying it may be distributed
4479      under the terms of this General Public License.  The "Program",
4480      below, refers to any such program or work, and a "work based on
4481      the Program" means either the Program or any derivative work under
4482      copyright law: that is to say, a work containing the Program or a
4483      portion of it, either verbatim or with modifications and/or
4484      translated into another language.  (Hereinafter, translation is
4485      included without limitation in the term "modification".)  Each
4486      licensee is addressed as "you".
4487
4488      Activities other than copying, distribution and modification are
4489      not covered by this License; they are outside its scope.  The act
4490      of running the Program is not restricted, and the output from the
4491      Program is covered only if its contents constitute a work based on
4492      the Program (independent of having been made by running the
4493      Program).  Whether that is true depends on what the Program does.
4494
4495   1. You may copy and distribute verbatim copies of the Program's
4496      source code as you receive it, in any medium, provided that you
4497      conspicuously and appropriately publish on each copy an appropriate
4498      copyright notice and disclaimer of warranty; keep intact all the
4499      notices that refer to this License and to the absence of any
4500      warranty; and give any other recipients of the Program a copy of
4501      this License along with the Program.
4502
4503      You may charge a fee for the physical act of transferring a copy,
4504      and you may at your option offer warranty protection in exchange
4505      for a fee.
4506
4507   2. You may modify your copy or copies of the Program or any portion
4508      of it, thus forming a work based on the Program, and copy and
4509      distribute such modifications or work under the terms of Section 1
4510      above, provided that you also meet all of these conditions:
4511
4512        a. You must cause the modified files to carry prominent notices
4513           stating that you changed the files and the date of any change.
4514
4515        b. You must cause any work that you distribute or publish, that
4516           in whole or in part contains or is derived from the Program
4517           or any part thereof, to be licensed as a whole at no charge
4518           to all third parties under the terms of this License.
4519
4520        c. If the modified program normally reads commands interactively
4521           when run, you must cause it, when started running for such
4522           interactive use in the most ordinary way, to print or display
4523           an announcement including an appropriate copyright notice and
4524           a notice that there is no warranty (or else, saying that you
4525           provide a warranty) and that users may redistribute the
4526           program under these conditions, and telling the user how to
4527           view a copy of this License.  (Exception: if the Program
4528           itself is interactive but does not normally print such an
4529           announcement, your work based on the Program is not required
4530           to print an announcement.)
4531
4532      These requirements apply to the modified work as a whole.  If
4533      identifiable sections of that work are not derived from the
4534      Program, and can be reasonably considered independent and separate
4535      works in themselves, then this License, and its terms, do not
4536      apply to those sections when you distribute them as separate
4537      works.  But when you distribute the same sections as part of a
4538      whole which is a work based on the Program, the distribution of
4539      the whole must be on the terms of this License, whose permissions
4540      for other licensees extend to the entire whole, and thus to each
4541      and every part regardless of who wrote it.
4542
4543      Thus, it is not the intent of this section to claim rights or
4544      contest your rights to work written entirely by you; rather, the
4545      intent is to exercise the right to control the distribution of
4546      derivative or collective works based on the Program.
4547
4548      In addition, mere aggregation of another work not based on the
4549      Program with the Program (or with a work based on the Program) on
4550      a volume of a storage or distribution medium does not bring the
4551      other work under the scope of this License.
4552
4553   3. You may copy and distribute the Program (or a work based on it,
4554      under Section 2) in object code or executable form under the terms
4555      of Sections 1 and 2 above provided that you also do one of the
4556      following:
4557
4558        a. Accompany it with the complete corresponding machine-readable
4559           source code, which must be distributed under the terms of
4560           Sections 1 and 2 above on a medium customarily used for
4561           software interchange; or,
4562
4563        b. Accompany it with a written offer, valid for at least three
4564           years, to give any third party, for a charge no more than your
4565           cost of physically performing source distribution, a complete
4566           machine-readable copy of the corresponding source code, to be
4567           distributed under the terms of Sections 1 and 2 above on a
4568           medium customarily used for software interchange; or,
4569
4570        c. Accompany it with the information you received as to the offer
4571           to distribute corresponding source code.  (This alternative is
4572           allowed only for noncommercial distribution and only if you
4573           received the program in object code or executable form with
4574           such an offer, in accord with Subsection b above.)
4575
4576      The source code for a work means the preferred form of the work for
4577      making modifications to it.  For an executable work, complete
4578      source code means all the source code for all modules it contains,
4579      plus any associated interface definition files, plus the scripts
4580      used to control compilation and installation of the executable.
4581      However, as a special exception, the source code distributed need
4582      not include anything that is normally distributed (in either
4583      source or binary form) with the major components (compiler,
4584      kernel, and so on) of the operating system on which the executable
4585      runs, unless that component itself accompanies the executable.
4586
4587      If distribution of executable or object code is made by offering
4588      access to copy from a designated place, then offering equivalent
4589      access to copy the source code from the same place counts as
4590      distribution of the source code, even though third parties are not
4591      compelled to copy the source along with the object code.
4592
4593   4. You may not copy, modify, sublicense, or distribute the Program
4594      except as expressly provided under this License.  Any attempt
4595      otherwise to copy, modify, sublicense or distribute the Program is
4596      void, and will automatically terminate your rights under this
4597      License.  However, parties who have received copies, or rights,
4598      from you under this License will not have their licenses
4599      terminated so long as such parties remain in full compliance.
4600
4601   5. You are not required to accept this License, since you have not
4602      signed it.  However, nothing else grants you permission to modify
4603      or distribute the Program or its derivative works.  These actions
4604      are prohibited by law if you do not accept this License.
4605      Therefore, by modifying or distributing the Program (or any work
4606      based on the Program), you indicate your acceptance of this
4607      License to do so, and all its terms and conditions for copying,
4608      distributing or modifying the Program or works based on it.
4609
4610   6. Each time you redistribute the Program (or any work based on the
4611      Program), the recipient automatically receives a license from the
4612      original licensor to copy, distribute or modify the Program
4613      subject to these terms and conditions.  You may not impose any
4614      further restrictions on the recipients' exercise of the rights
4615      granted herein.  You are not responsible for enforcing compliance
4616      by third parties to this License.
4617
4618   7. If, as a consequence of a court judgment or allegation of patent
4619      infringement or for any other reason (not limited to patent
4620      issues), conditions are imposed on you (whether by court order,
4621      agreement or otherwise) that contradict the conditions of this
4622      License, they do not excuse you from the conditions of this
4623      License.  If you cannot distribute so as to satisfy simultaneously
4624      your obligations under this License and any other pertinent
4625      obligations, then as a consequence you may not distribute the
4626      Program at all.  For example, if a patent license would not permit
4627      royalty-free redistribution of the Program by all those who
4628      receive copies directly or indirectly through you, then the only
4629      way you could satisfy both it and this License would be to refrain
4630      entirely from distribution of the Program.
4631
4632      If any portion of this section is held invalid or unenforceable
4633      under any particular circumstance, the balance of the section is
4634      intended to apply and the section as a whole is intended to apply
4635      in other circumstances.
4636
4637      It is not the purpose of this section to induce you to infringe any
4638      patents or other property right claims or to contest validity of
4639      any such claims; this section has the sole purpose of protecting
4640      the integrity of the free software distribution system, which is
4641      implemented by public license practices.  Many people have made
4642      generous contributions to the wide range of software distributed
4643      through that system in reliance on consistent application of that
4644      system; it is up to the author/donor to decide if he or she is
4645      willing to distribute software through any other system and a
4646      licensee cannot impose that choice.
4647
4648      This section is intended to make thoroughly clear what is believed
4649      to be a consequence of the rest of this License.
4650
4651   8. If the distribution and/or use of the Program is restricted in
4652      certain countries either by patents or by copyrighted interfaces,
4653      the original copyright holder who places the Program under this
4654      License may add an explicit geographical distribution limitation
4655      excluding those countries, so that distribution is permitted only
4656      in or among countries not thus excluded.  In such case, this
4657      License incorporates the limitation as if written in the body of
4658      this License.
4659
4660   9. The Free Software Foundation may publish revised and/or new
4661      versions of the General Public License from time to time.  Such
4662      new versions will be similar in spirit to the present version, but
4663      may differ in detail to address new problems or concerns.
4664
4665      Each version is given a distinguishing version number.  If the
4666      Program specifies a version number of this License which applies
4667      to it and "any later version", you have the option of following
4668      the terms and conditions either of that version or of any later
4669      version published by the Free Software Foundation.  If the Program
4670      does not specify a version number of this License, you may choose
4671      any version ever published by the Free Software Foundation.
4672
4673  10. If you wish to incorporate parts of the Program into other free
4674      programs whose distribution conditions are different, write to the
4675      author to ask for permission.  For software which is copyrighted
4676      by the Free Software Foundation, write to the Free Software
4677      Foundation; we sometimes make exceptions for this.  Our decision
4678      will be guided by the two goals of preserving the free status of
4679      all derivatives of our free software and of promoting the sharing
4680      and reuse of software generally.
4681
4682                                 NO WARRANTY
4683
4684  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
4685      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
4686      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
4687      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
4688      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
4689      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4690      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
4691      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
4692      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
4693      SERVICING, REPAIR OR CORRECTION.
4694
4695  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
4696      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
4697      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
4698      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
4699      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
4700      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
4701      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
4702      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
4703      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
4704      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
4705
4706                       END OF TERMS AND CONDITIONS
4707
4708 How to Apply These Terms to Your New Programs
4709 =============================================
4710
4711 If you develop a new program, and you want it to be of the greatest
4712 possible use to the public, the best way to achieve this is to make it
4713 free software which everyone can redistribute and change under these
4714 terms.
4715
4716    To do so, attach the following notices to the program.  It is safest
4717 to attach them to the start of each source file to most effectively
4718 convey the exclusion of warranty; and each file should have at least
4719 the "copyright" line and a pointer to where the full notice is found.
4720
4721      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
4722      Copyright (C) YEAR  NAME OF AUTHOR
4723      
4724      This program is free software; you can redistribute it and/or modify
4725      it under the terms of the GNU General Public License as published by
4726      the Free Software Foundation; either version 2 of the License, or
4727      (at your option) any later version.
4728      
4729      This program is distributed in the hope that it will be useful,
4730      but WITHOUT ANY WARRANTY; without even the implied warranty of
4731      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4732      GNU General Public License for more details.
4733      
4734      You should have received a copy of the GNU General Public License
4735      along with this program; if not, write to the Free Software
4736      Foundation, Inc., 59 Temple Place - Suite 330,
4737      Boston, MA 02111-1307, USA.
4738
4739    Also add information on how to contact you by electronic and paper
4740 mail.
4741
4742    If the program is interactive, make it output a short notice like
4743 this when it starts in an interactive mode:
4744
4745      Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR
4746      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
4747      type `show w'.
4748      This is free software, and you are welcome to redistribute it
4749      under certain conditions; type `show c' for details.
4750
4751    The hypothetical commands `show w' and `show c' should show the
4752 appropriate parts of the General Public License.  Of course, the
4753 commands you use may be called something other than `show w' and `show
4754 c'; they could even be mouse-clicks or menu items--whatever suits your
4755 program.
4756
4757    You should also get your employer (if you work as a programmer) or
4758 your school, if any, to sign a "copyright disclaimer" for the program,
4759 if necessary.  Here is a sample; alter the names:
4760
4761      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
4762      `Gnomovision' (which makes passes at compilers) written by James Hacker.
4763      
4764      SIGNATURE OF TY COON, 1 April 1989
4765      Ty Coon, President of Vice
4766
4767    This General Public License does not permit incorporating your
4768 program into proprietary programs.  If your program is a subroutine
4769 library, you may consider it more useful to permit linking proprietary
4770 applications with the library.  If this is what you want to do, use the
4771 GNU Library General Public License instead of this License.
4772
4773 \1f
4774 File: gdb.info,  Node: GNU Free Documentation License,  Next: Index,  Prev: Copying,  Up: Top
4775
4776 GNU Free Documentation License
4777 ******************************
4778
4779                       Version 1.2, November 2002
4780      Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
4781      59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
4782      
4783      Everyone is permitted to copy and distribute verbatim copies
4784      of this license document, but changing it is not allowed.
4785
4786   0. PREAMBLE
4787
4788      The purpose of this License is to make a manual, textbook, or other
4789      functional and useful document "free" in the sense of freedom: to
4790      assure everyone the effective freedom to copy and redistribute it,
4791      with or without modifying it, either commercially or
4792      noncommercially.  Secondarily, this License preserves for the
4793      author and publisher a way to get credit for their work, while not
4794      being considered responsible for modifications made by others.
4795
4796      This License is a kind of "copyleft", which means that derivative
4797      works of the document must themselves be free in the same sense.
4798      It complements the GNU General Public License, which is a copyleft
4799      license designed for free software.
4800
4801      We have designed this License in order to use it for manuals for
4802      free software, because free software needs free documentation: a
4803      free program should come with manuals providing the same freedoms
4804      that the software does.  But this License is not limited to
4805      software manuals; it can be used for any textual work, regardless
4806      of subject matter or whether it is published as a printed book.
4807      We recommend this License principally for works whose purpose is
4808      instruction or reference.
4809
4810   1. APPLICABILITY AND DEFINITIONS
4811
4812      This License applies to any manual or other work, in any medium,
4813      that contains a notice placed by the copyright holder saying it
4814      can be distributed under the terms of this License.  Such a notice
4815      grants a world-wide, royalty-free license, unlimited in duration,
4816      to use that work under the conditions stated herein.  The
4817      "Document", below, refers to any such manual or work.  Any member
4818      of the public is a licensee, and is addressed as "you".  You
4819      accept the license if you copy, modify or distribute the work in a
4820      way requiring permission under copyright law.
4821
4822      A "Modified Version" of the Document means any work containing the
4823      Document or a portion of it, either copied verbatim, or with
4824      modifications and/or translated into another language.
4825
4826      A "Secondary Section" is a named appendix or a front-matter section
4827      of the Document that deals exclusively with the relationship of the
4828      publishers or authors of the Document to the Document's overall
4829      subject (or to related matters) and contains nothing that could
4830      fall directly within that overall subject.  (Thus, if the Document
4831      is in part a textbook of mathematics, a Secondary Section may not
4832      explain any mathematics.)  The relationship could be a matter of
4833      historical connection with the subject or with related matters, or
4834      of legal, commercial, philosophical, ethical or political position
4835      regarding them.
4836
4837      The "Invariant Sections" are certain Secondary Sections whose
4838      titles are designated, as being those of Invariant Sections, in
4839      the notice that says that the Document is released under this
4840      License.  If a section does not fit the above definition of
4841      Secondary then it is not allowed to be designated as Invariant.
4842      The Document may contain zero Invariant Sections.  If the Document
4843      does not identify any Invariant Sections then there are none.
4844
4845      The "Cover Texts" are certain short passages of text that are
4846      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
4847      that says that the Document is released under this License.  A
4848      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
4849      be at most 25 words.
4850
4851      A "Transparent" copy of the Document means a machine-readable copy,
4852      represented in a format whose specification is available to the
4853      general public, that is suitable for revising the document
4854      straightforwardly with generic text editors or (for images
4855      composed of pixels) generic paint programs or (for drawings) some
4856      widely available drawing editor, and that is suitable for input to
4857      text formatters or for automatic translation to a variety of
4858      formats suitable for input to text formatters.  A copy made in an
4859      otherwise Transparent file format whose markup, or absence of
4860      markup, has been arranged to thwart or discourage subsequent
4861      modification by readers is not Transparent.  An image format is
4862      not Transparent if used for any substantial amount of text.  A
4863      copy that is not "Transparent" is called "Opaque".
4864
4865      Examples of suitable formats for Transparent copies include plain
4866      ASCII without markup, Texinfo input format, LaTeX input format,
4867      SGML or XML using a publicly available DTD, and
4868      standard-conforming simple HTML, PostScript or PDF designed for
4869      human modification.  Examples of transparent image formats include
4870      PNG, XCF and JPG.  Opaque formats include proprietary formats that
4871      can be read and edited only by proprietary word processors, SGML or
4872      XML for which the DTD and/or processing tools are not generally
4873      available, and the machine-generated HTML, PostScript or PDF
4874      produced by some word processors for output purposes only.
4875
4876      The "Title Page" means, for a printed book, the title page itself,
4877      plus such following pages as are needed to hold, legibly, the
4878      material this License requires to appear in the title page.  For
4879      works in formats which do not have any title page as such, "Title
4880      Page" means the text near the most prominent appearance of the
4881      work's title, preceding the beginning of the body of the text.
4882
4883      A section "Entitled XYZ" means a named subunit of the Document
4884      whose title either is precisely XYZ or contains XYZ in parentheses
4885      following text that translates XYZ in another language.  (Here XYZ
4886      stands for a specific section name mentioned below, such as
4887      "Acknowledgements", "Dedications", "Endorsements", or "History".)
4888      To "Preserve the Title" of such a section when you modify the
4889      Document means that it remains a section "Entitled XYZ" according
4890      to this definition.
4891
4892      The Document may include Warranty Disclaimers next to the notice
4893      which states that this License applies to the Document.  These
4894      Warranty Disclaimers are considered to be included by reference in
4895      this License, but only as regards disclaiming warranties: any other
4896      implication that these Warranty Disclaimers may have is void and
4897      has no effect on the meaning of this License.
4898
4899   2. VERBATIM COPYING
4900
4901      You may copy and distribute the Document in any medium, either
4902      commercially or noncommercially, provided that this License, the
4903      copyright notices, and the license notice saying this License
4904      applies to the Document are reproduced in all copies, and that you
4905      add no other conditions whatsoever to those of this License.  You
4906      may not use technical measures to obstruct or control the reading
4907      or further copying of the copies you make or distribute.  However,
4908      you may accept compensation in exchange for copies.  If you
4909      distribute a large enough number of copies you must also follow
4910      the conditions in section 3.
4911
4912      You may also lend copies, under the same conditions stated above,
4913      and you may publicly display copies.
4914
4915   3. COPYING IN QUANTITY
4916
4917      If you publish printed copies (or copies in media that commonly
4918      have printed covers) of the Document, numbering more than 100, and
4919      the Document's license notice requires Cover Texts, you must
4920      enclose the copies in covers that carry, clearly and legibly, all
4921      these Cover Texts: Front-Cover Texts on the front cover, and
4922      Back-Cover Texts on the back cover.  Both covers must also clearly
4923      and legibly identify you as the publisher of these copies.  The
4924      front cover must present the full title with all words of the
4925      title equally prominent and visible.  You may add other material
4926      on the covers in addition.  Copying with changes limited to the
4927      covers, as long as they preserve the title of the Document and
4928      satisfy these conditions, can be treated as verbatim copying in
4929      other respects.
4930
4931      If the required texts for either cover are too voluminous to fit
4932      legibly, you should put the first ones listed (as many as fit
4933      reasonably) on the actual cover, and continue the rest onto
4934      adjacent pages.
4935
4936      If you publish or distribute Opaque copies of the Document
4937      numbering more than 100, you must either include a
4938      machine-readable Transparent copy along with each Opaque copy, or
4939      state in or with each Opaque copy a computer-network location from
4940      which the general network-using public has access to download
4941      using public-standard network protocols a complete Transparent
4942      copy of the Document, free of added material.  If you use the
4943      latter option, you must take reasonably prudent steps, when you
4944      begin distribution of Opaque copies in quantity, to ensure that
4945      this Transparent copy will remain thus accessible at the stated
4946      location until at least one year after the last time you
4947      distribute an Opaque copy (directly or through your agents or
4948      retailers) of that edition to the public.
4949
4950      It is requested, but not required, that you contact the authors of
4951      the Document well before redistributing any large number of
4952      copies, to give them a chance to provide you with an updated
4953      version of the Document.
4954
4955   4. MODIFICATIONS
4956
4957      You may copy and distribute a Modified Version of the Document
4958      under the conditions of sections 2 and 3 above, provided that you
4959      release the Modified Version under precisely this License, with
4960      the Modified Version filling the role of the Document, thus
4961      licensing distribution and modification of the Modified Version to
4962      whoever possesses a copy of it.  In addition, you must do these
4963      things in the Modified Version:
4964
4965        A. Use in the Title Page (and on the covers, if any) a title
4966           distinct from that of the Document, and from those of
4967           previous versions (which should, if there were any, be listed
4968           in the History section of the Document).  You may use the
4969           same title as a previous version if the original publisher of
4970           that version gives permission.
4971
4972        B. List on the Title Page, as authors, one or more persons or
4973           entities responsible for authorship of the modifications in
4974           the Modified Version, together with at least five of the
4975           principal authors of the Document (all of its principal
4976           authors, if it has fewer than five), unless they release you
4977           from this requirement.
4978
4979        C. State on the Title page the name of the publisher of the
4980           Modified Version, as the publisher.
4981
4982        D. Preserve all the copyright notices of the Document.
4983
4984        E. Add an appropriate copyright notice for your modifications
4985           adjacent to the other copyright notices.
4986
4987        F. Include, immediately after the copyright notices, a license
4988           notice giving the public permission to use the Modified
4989           Version under the terms of this License, in the form shown in
4990           the Addendum below.
4991
4992        G. Preserve in that license notice the full lists of Invariant
4993           Sections and required Cover Texts given in the Document's
4994           license notice.
4995
4996        H. Include an unaltered copy of this License.
4997
4998        I. Preserve the section Entitled "History", Preserve its Title,
4999           and add to it an item stating at least the title, year, new
5000           authors, and publisher of the Modified Version as given on
5001           the Title Page.  If there is no section Entitled "History" in
5002           the Document, create one stating the title, year, authors,
5003           and publisher of the Document as given on its Title Page,
5004           then add an item describing the Modified Version as stated in
5005           the previous sentence.
5006
5007        J. Preserve the network location, if any, given in the Document
5008           for public access to a Transparent copy of the Document, and
5009           likewise the network locations given in the Document for
5010           previous versions it was based on.  These may be placed in
5011           the "History" section.  You may omit a network location for a
5012           work that was published at least four years before the
5013           Document itself, or if the original publisher of the version
5014           it refers to gives permission.
5015
5016        K. For any section Entitled "Acknowledgements" or "Dedications",
5017           Preserve the Title of the section, and preserve in the
5018           section all the substance and tone of each of the contributor
5019           acknowledgements and/or dedications given therein.
5020
5021        L. Preserve all the Invariant Sections of the Document,
5022           unaltered in their text and in their titles.  Section numbers
5023           or the equivalent are not considered part of the section
5024           titles.
5025
5026        M. Delete any section Entitled "Endorsements".  Such a section
5027           may not be included in the Modified Version.
5028
5029        N. Do not retitle any existing section to be Entitled
5030           "Endorsements" or to conflict in title with any Invariant
5031           Section.
5032
5033        O. Preserve any Warranty Disclaimers.
5034
5035      If the Modified Version includes new front-matter sections or
5036      appendices that qualify as Secondary Sections and contain no
5037      material copied from the Document, you may at your option
5038      designate some or all of these sections as invariant.  To do this,
5039      add their titles to the list of Invariant Sections in the Modified
5040      Version's license notice.  These titles must be distinct from any
5041      other section titles.
5042
5043      You may add a section Entitled "Endorsements", provided it contains
5044      nothing but endorsements of your Modified Version by various
5045      parties--for example, statements of peer review or that the text
5046      has been approved by an organization as the authoritative
5047      definition of a standard.
5048
5049      You may add a passage of up to five words as a Front-Cover Text,
5050      and a passage of up to 25 words as a Back-Cover Text, to the end
5051      of the list of Cover Texts in the Modified Version.  Only one
5052      passage of Front-Cover Text and one of Back-Cover Text may be
5053      added by (or through arrangements made by) any one entity.  If the
5054      Document already includes a cover text for the same cover,
5055      previously added by you or by arrangement made by the same entity
5056      you are acting on behalf of, you may not add another; but you may
5057      replace the old one, on explicit permission from the previous
5058      publisher that added the old one.
5059
5060      The author(s) and publisher(s) of the Document do not by this
5061      License give permission to use their names for publicity for or to
5062      assert or imply endorsement of any Modified Version.
5063
5064   5. COMBINING DOCUMENTS
5065
5066      You may combine the Document with other documents released under
5067      this License, under the terms defined in section 4 above for
5068      modified versions, provided that you include in the combination
5069      all of the Invariant Sections of all of the original documents,
5070      unmodified, and list them all as Invariant Sections of your
5071      combined work in its license notice, and that you preserve all
5072      their Warranty Disclaimers.
5073
5074      The combined work need only contain one copy of this License, and
5075      multiple identical Invariant Sections may be replaced with a single
5076      copy.  If there are multiple Invariant Sections with the same name
5077      but different contents, make the title of each such section unique
5078      by adding at the end of it, in parentheses, the name of the
5079      original author or publisher of that section if known, or else a
5080      unique number.  Make the same adjustment to the section titles in
5081      the list of Invariant Sections in the license notice of the
5082      combined work.
5083
5084      In the combination, you must combine any sections Entitled
5085      "History" in the various original documents, forming one section
5086      Entitled "History"; likewise combine any sections Entitled
5087      "Acknowledgements", and any sections Entitled "Dedications".  You
5088      must delete all sections Entitled "Endorsements."
5089
5090   6. COLLECTIONS OF DOCUMENTS
5091
5092      You may make a collection consisting of the Document and other
5093      documents released under this License, and replace the individual
5094      copies of this License in the various documents with a single copy
5095      that is included in the collection, provided that you follow the
5096      rules of this License for verbatim copying of each of the
5097      documents in all other respects.
5098
5099      You may extract a single document from such a collection, and
5100      distribute it individually under this License, provided you insert
5101      a copy of this License into the extracted document, and follow
5102      this License in all other respects regarding verbatim copying of
5103      that document.
5104
5105   7. AGGREGATION WITH INDEPENDENT WORKS
5106
5107      A compilation of the Document or its derivatives with other
5108      separate and independent documents or works, in or on a volume of
5109      a storage or distribution medium, is called an "aggregate" if the
5110      copyright resulting from the compilation is not used to limit the
5111      legal rights of the compilation's users beyond what the individual
5112      works permit.  When the Document is included in an aggregate, this
5113      License does not apply to the other works in the aggregate which
5114      are not themselves derivative works of the Document.
5115
5116      If the Cover Text requirement of section 3 is applicable to these
5117      copies of the Document, then if the Document is less than one half
5118      of the entire aggregate, the Document's Cover Texts may be placed
5119      on covers that bracket the Document within the aggregate, or the
5120      electronic equivalent of covers if the Document is in electronic
5121      form.  Otherwise they must appear on printed covers that bracket
5122      the whole aggregate.
5123
5124   8. TRANSLATION
5125
5126      Translation is considered a kind of modification, so you may
5127      distribute translations of the Document under the terms of section
5128      4.  Replacing Invariant Sections with translations requires special
5129      permission from their copyright holders, but you may include
5130      translations of some or all Invariant Sections in addition to the
5131      original versions of these Invariant Sections.  You may include a
5132      translation of this License, and all the license notices in the
5133      Document, and any Warranty Disclaimers, provided that you also
5134      include the original English version of this License and the
5135      original versions of those notices and disclaimers.  In case of a
5136      disagreement between the translation and the original version of
5137      this License or a notice or disclaimer, the original version will
5138      prevail.
5139
5140      If a section in the Document is Entitled "Acknowledgements",
5141      "Dedications", or "History", the requirement (section 4) to
5142      Preserve its Title (section 1) will typically require changing the
5143      actual title.
5144
5145   9. TERMINATION
5146
5147      You may not copy, modify, sublicense, or distribute the Document
5148      except as expressly provided for under this License.  Any other
5149      attempt to copy, modify, sublicense or distribute the Document is
5150      void, and will automatically terminate your rights under this
5151      License.  However, parties who have received copies, or rights,
5152      from you under this License will not have their licenses
5153      terminated so long as such parties remain in full compliance.
5154
5155  10. FUTURE REVISIONS OF THIS LICENSE
5156
5157      The Free Software Foundation may publish new, revised versions of
5158      the GNU Free Documentation License from time to time.  Such new
5159      versions will be similar in spirit to the present version, but may
5160      differ in detail to address new problems or concerns.  See
5161      `http://www.gnu.org/copyleft/'.
5162
5163      Each version of the License is given a distinguishing version
5164      number.  If the Document specifies that a particular numbered
5165      version of this License "or any later version" applies to it, you
5166      have the option of following the terms and conditions either of
5167      that specified version or of any later version that has been
5168      published (not as a draft) by the Free Software Foundation.  If
5169      the Document does not specify a version number of this License,
5170      you may choose any version ever published (not as a draft) by the
5171      Free Software Foundation.
5172
5173 ADDENDUM: How to use this License for your documents
5174 ====================================================
5175
5176 To use this License in a document you have written, include a copy of
5177 the License in the document and put the following copyright and license
5178 notices just after the title page:
5179
5180        Copyright (C)  YEAR  YOUR NAME.
5181        Permission is granted to copy, distribute and/or modify this document
5182        under the terms of the GNU Free Documentation License, Version 1.2
5183        or any later version published by the Free Software Foundation;
5184        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
5185        Texts.  A copy of the license is included in the section entitled ``GNU
5186        Free Documentation License''.
5187
5188    If you have Invariant Sections, Front-Cover Texts and Back-Cover
5189 Texts, replace the "with...Texts." line with this:
5190
5191          with the Invariant Sections being LIST THEIR TITLES, with
5192          the Front-Cover Texts being LIST, and with the Back-Cover Texts
5193          being LIST.
5194
5195    If you have Invariant Sections without Cover Texts, or some other
5196 combination of the three, merge those two alternatives to suit the
5197 situation.
5198
5199    If your document contains nontrivial examples of program code, we
5200 recommend releasing these examples in parallel under your choice of
5201 free software license, such as the GNU General Public License, to
5202 permit their use in free software.
5203
5204 \1f
5205 File: gdb.info,  Node: Index,  Prev: GNU Free Documentation License,  Up: Top
5206
5207 Index
5208 *****
5209
5210 * Menu:
5211
5212 * ! packet:                              Packets.
5213 * "No symbol "foo" in current context":  Variables.
5214 * # (a comment):                         Command Syntax.
5215 * # in Modula-2:                         GDB/M2.
5216 * $:                                     Value History.
5217 * $$:                                    Value History.
5218 * $_ and info breakpoints:               Set Breaks.
5219 * $_ and info line:                      Machine Code.
5220 * $_, $__, and value history:            Memory.
5221 * $_, convenience variable:              Convenience Vars.
5222 * $__, convenience variable:             Convenience Vars.
5223 * $_exitcode, convenience variable:      Convenience Vars.
5224 * $bpnum, convenience variable:          Set Breaks.
5225 * $cdir, convenience variable:           Source Path.
5226 * $cwdr, convenience variable:           Source Path.
5227 * $tpnum:                                Create and Delete Tracepoints.
5228 * $trace_file:                           Tracepoint Variables.
5229 * $trace_frame:                          Tracepoint Variables.
5230 * $trace_func:                           Tracepoint Variables.
5231 * $trace_line:                           Tracepoint Variables.
5232 * $tracepoint:                           Tracepoint Variables.
5233 * --annotate:                            Mode Options.
5234 * --args:                                Mode Options.
5235 * --async:                               Mode Options.
5236 * --batch:                               Mode Options.
5237 * --baud:                                Mode Options.
5238 * --cd:                                  Mode Options.
5239 * --command:                             File Options.
5240 * --core:                                File Options.
5241 * --directory:                           File Options.
5242 * --epoch:                               Mode Options.
5243 * --exec:                                File Options.
5244 * --fullname:                            Mode Options.
5245 * --interpreter:                         Mode Options.
5246 * --mapped:                              File Options.
5247 * --noasync:                             Mode Options.
5248 * --nowindows:                           Mode Options.
5249 * --nx:                                  Mode Options.
5250 * --pid:                                 File Options.
5251 * --quiet:                               Mode Options.
5252 * --readnow:                             File Options.
5253 * --se:                                  File Options.
5254 * --silent:                              Mode Options.
5255 * --statistics:                          Mode Options.
5256 * --symbols:                             File Options.
5257 * --tty:                                 Mode Options.
5258 * --tui:                                 Mode Options.
5259 * --version:                             Mode Options.
5260 * --windows:                             Mode Options.
5261 * --write:                               Mode Options.
5262 * -b:                                    Mode Options.
5263 * -break-after:                          GDB/MI Breakpoint Table Commands.
5264 * -break-condition:                      GDB/MI Breakpoint Table Commands.
5265 * -break-delete:                         GDB/MI Breakpoint Table Commands.
5266 * -break-disable:                        GDB/MI Breakpoint Table Commands.
5267 * -break-enable:                         GDB/MI Breakpoint Table Commands.
5268 * -break-info:                           GDB/MI Breakpoint Table Commands.
5269 * -break-insert:                         GDB/MI Breakpoint Table Commands.
5270 * -break-list:                           GDB/MI Breakpoint Table Commands.
5271 * -break-watch:                          GDB/MI Breakpoint Table Commands.
5272 * -c:                                    File Options.
5273 * -d:                                    File Options.
5274 * -data-disassemble:                     GDB/MI Data Manipulation.
5275 * -data-evaluate-expression:             GDB/MI Data Manipulation.
5276 * -data-list-changed-registers:          GDB/MI Data Manipulation.
5277 * -data-list-register-names:             GDB/MI Data Manipulation.
5278 * -data-list-register-values:            GDB/MI Data Manipulation.
5279 * -data-read-memory:                     GDB/MI Data Manipulation.
5280 * -display-delete:                       GDB/MI Data Manipulation.
5281 * -display-disable:                      GDB/MI Data Manipulation.
5282 * -display-enable:                       GDB/MI Data Manipulation.
5283 * -display-insert:                       GDB/MI Data Manipulation.
5284 * -display-list:                         GDB/MI Data Manipulation.
5285 * -e:                                    File Options.
5286 * -environment-cd:                       GDB/MI Data Manipulation.
5287 * -environment-directory:                GDB/MI Data Manipulation.
5288 * -environment-path:                     GDB/MI Data Manipulation.
5289 * -environment-pwd:                      GDB/MI Data Manipulation.
5290 * -exec-abort:                           GDB/MI Program Control.
5291 * -exec-arguments:                       GDB/MI Program Control.
5292 * -exec-continue:                        GDB/MI Program Control.
5293 * -exec-finish:                          GDB/MI Program Control.
5294 * -exec-interrupt:                       GDB/MI Program Control.
5295 * -exec-next:                            GDB/MI Program Control.
5296 * -exec-next-instruction:                GDB/MI Program Control.
5297 * -exec-return:                          GDB/MI Program Control.
5298 * -exec-run:                             GDB/MI Program Control.
5299 * -exec-show-arguments:                  GDB/MI Program Control.
5300 * -exec-step:                            GDB/MI Program Control.
5301 * -exec-step-instruction:                GDB/MI Program Control.
5302 * -exec-until:                           GDB/MI Program Control.
5303 * -f:                                    Mode Options.
5304 * -file-exec-and-symbols:                GDB/MI Program Control.
5305 * -file-exec-file:                       GDB/MI Program Control.
5306 * -file-list-exec-sections:              GDB/MI Program Control.
5307 * -file-list-exec-source-file:           GDB/MI Program Control.
5308 * -file-list-exec-source-files:          GDB/MI Program Control.
5309 * -file-list-shared-libraries:           GDB/MI Program Control.
5310 * -file-list-symbol-files:               GDB/MI Program Control.
5311 * -file-symbol-file:                     GDB/MI Program Control.
5312 * -gdb-exit:                             GDB/MI Miscellaneous Commands.
5313 * -gdb-set:                              GDB/MI Miscellaneous Commands.
5314 * -gdb-show:                             GDB/MI Miscellaneous Commands.
5315 * -gdb-version:                          GDB/MI Miscellaneous Commands.
5316 * -interpreter-exec:                     GDB/MI Miscellaneous Commands.
5317 * -m:                                    File Options.
5318 * -n:                                    Mode Options.
5319 * -nw:                                   Mode Options.
5320 * -p:                                    File Options.
5321 * -q:                                    Mode Options.
5322 * -r:                                    File Options.
5323 * -s:                                    File Options.
5324 * -stack-info-depth:                     GDB/MI Stack Manipulation.
5325 * -stack-info-frame:                     GDB/MI Stack Manipulation.
5326 * -stack-list-arguments:                 GDB/MI Stack Manipulation.
5327 * -stack-list-frames:                    GDB/MI Stack Manipulation.
5328 * -stack-list-locals:                    GDB/MI Stack Manipulation.
5329 * -stack-select-frame:                   GDB/MI Stack Manipulation.
5330 * -symbol-info-address:                  GDB/MI Symbol Query.
5331 * -symbol-info-file:                     GDB/MI Symbol Query.
5332 * -symbol-info-function:                 GDB/MI Symbol Query.
5333 * -symbol-info-line:                     GDB/MI Symbol Query.
5334 * -symbol-info-symbol:                   GDB/MI Symbol Query.
5335 * -symbol-list-functions:                GDB/MI Symbol Query.
5336 * -symbol-list-lines:                    GDB/MI Symbol Query.
5337 * -symbol-list-types:                    GDB/MI Symbol Query.
5338 * -symbol-list-variables:                GDB/MI Symbol Query.
5339 * -symbol-locate:                        GDB/MI Symbol Query.
5340 * -symbol-type:                          GDB/MI Symbol Query.
5341 * -t:                                    Mode Options.
5342 * -target-attach:                        GDB/MI Target Manipulation.
5343 * -target-compare-sections:              GDB/MI Target Manipulation.
5344 * -target-detach:                        GDB/MI Target Manipulation.
5345 * -target-disconnect:                    GDB/MI Target Manipulation.
5346 * -target-download:                      GDB/MI Target Manipulation.
5347 * -target-exec-status:                   GDB/MI Target Manipulation.
5348 * -target-list-available-targets:        GDB/MI Target Manipulation.
5349 * -target-list-current-targets:          GDB/MI Target Manipulation.
5350 * -target-list-parameters:               GDB/MI Target Manipulation.
5351 * -target-select:                        GDB/MI Target Manipulation.
5352 * -thread-info:                          GDB/MI Thread Commands.
5353 * -thread-list-all-threads:              GDB/MI Thread Commands.
5354 * -thread-list-ids:                      GDB/MI Thread Commands.
5355 * -thread-select:                        GDB/MI Thread Commands.
5356 * -var-assign:                           GDB/MI Variable Objects.
5357 * -var-create:                           GDB/MI Variable Objects.
5358 * -var-delete:                           GDB/MI Variable Objects.
5359 * -var-evaluate-expression:              GDB/MI Variable Objects.
5360 * -var-info-expression:                  GDB/MI Variable Objects.
5361 * -var-info-num-children:                GDB/MI Variable Objects.
5362 * -var-info-type:                        GDB/MI Variable Objects.
5363 * -var-list-children:                    GDB/MI Variable Objects.
5364 * -var-set-format:                       GDB/MI Variable Objects.
5365 * -var-show-attributes:                  GDB/MI Variable Objects.
5366 * -var-show-format:                      GDB/MI Variable Objects.
5367 * -var-update:                           GDB/MI Variable Objects.
5368 * -w:                                    Mode Options.
5369 * -x:                                    File Options.
5370 * ., Modula-2 scope operator:            M2 Scope.
5371 * .debug subdirectories:                 Separate Debug Files.
5372 * .esgdbinit:                            Command Files.
5373 * .gdbinit:                              Command Files.
5374 * .gnu_debuglink sections:               Separate Debug Files.
5375 * .o files, reading symbols from:        Files.
5376 * .os68gdbinit:                          Command Files.
5377 * .vxgdbinit:                            Command Files.
5378 * /proc:                                 SVR4 Process Information.
5379 * ? packet:                              Packets.
5380 * @, referencing memory as an array:     Arrays.
5381 * ^done:                                 GDB/MI Result Records.
5382 * ^error:                                GDB/MI Result Records.
5383 * ^running:                              GDB/MI Result Records.
5384 * _NSPrintForDebugger, and printing Objective-C objects: The Print Command with Objective-C.
5385 * A packet:                              Packets.
5386 * abbreviation:                          Command Syntax.
5387 * abort (C-g):                           Miscellaneous Commands.
5388 * accept-line (Newline or Return):       Commands For History.
5389 * acknowledgment, for GDB remote:        Overview.
5390 * actions:                               Tracepoint Actions.
5391 * active targets:                        Active Targets.
5392 * adbg_find_memory_in_frame:             Tracing on Symmetrix.
5393 * add-shared-symbol-file:                Files.
5394 * add-symbol-file:                       Files.
5395 * address of a symbol:                   Symbols.
5396 * advance LOCATION:                      Continuing and Stepping.
5397 * Alpha stack:                           MIPS.
5398 * AMD 29K register stack:                A29K.
5399 * annotations:                           Annotations Overview.
5400 * annotations for errors, warnings and interrupts: Errors.
5401 * annotations for invalidation messages: Invalidation.
5402 * annotations for prompts:               Prompting.
5403 * annotations for running programs:      Annotations for Running.
5404 * annotations for source display:        Source Annotations.
5405 * append:                                Dump/Restore Files.
5406 * append data to a file:                 Dump/Restore Files.
5407 * apropos:                               Help.
5408 * arguments (to your program):           Arguments.
5409 * artificial array:                      Arrays.
5410 * ASCII character set:                   Character Sets.
5411 * assembly instructions:                 Machine Code.
5412 * assignment:                            Assignment.
5413 * async output in GDB/MI:                GDB/MI Output Syntax.
5414 * AT&T disassembly flavor:               Machine Code.
5415 * attach:                                Attach.
5416 * attach to a program by name:           Server.
5417 * automatic display:                     Auto Display.
5418 * automatic overlay debugging:           Automatic Overlay Debugging.
5419 * automatic thread selection:            Threads.
5420 * auxiliary vector:                      Auxiliary Vector.
5421 * awatch:                                Set Watchpoints.
5422 * b (break):                             Set Breaks.
5423 * B packet:                              Packets.
5424 * b packet:                              Packets.
5425 * backtrace:                             Backtrace.
5426 * backtrace limit:                       Backtrace.
5427 * backtraces:                            Backtrace.
5428 * backward-char (C-b):                   Commands For Moving.
5429 * backward-delete-char (Rubout):         Commands For Text.
5430 * backward-kill-line (C-x Rubout):       Commands For Killing.
5431 * backward-kill-word (M-<DEL>):          Commands For Killing.
5432 * backward-word (M-b):                   Commands For Moving.
5433 * beginning-of-history (M-<):            Commands For History.
5434 * beginning-of-line (C-a):               Commands For Moving.
5435 * bell-style:                            Readline Init File Syntax.
5436 * break:                                 Set Breaks.
5437 * break ... thread THREADNO:             Thread Stops.
5438 * break in overloaded functions:         Debugging C plus plus.
5439 * break, and Objective-C:                Method Names in Commands.
5440 * breakpoint:                            Annotations for Running.
5441 * breakpoint address adjusted:           Breakpoint related warnings.
5442 * breakpoint commands:                   Break Commands.
5443 * breakpoint commands for GDB/MI:        GDB/MI Breakpoint Table Commands.
5444 * breakpoint conditions:                 Conditions.
5445 * breakpoint numbers:                    Breakpoints.
5446 * breakpoint on events:                  Breakpoints.
5447 * breakpoint on memory address:          Breakpoints.
5448 * breakpoint on variable modification:   Breakpoints.
5449 * breakpoint ranges:                     Breakpoints.
5450 * breakpoint subroutine, remote:         Stub Contents.
5451 * breakpoints:                           Breakpoints.
5452 * breakpoints and threads:               Thread Stops.
5453 * breakpoints in overlays:               Overlay Commands.
5454 * breakpoints-invalid:                   Invalidation.
5455 * bt (backtrace):                        Backtrace.
5456 * bug criteria:                          Bug Criteria.
5457 * bug reports:                           Bug Reporting.
5458 * bugs in GDB:                           GDB Bugs.
5459 * c (continue):                          Continuing and Stepping.
5460 * c (SingleKey TUI key):                 TUI Single Key Mode.
5461 * C and C++:                             C.
5462 * C and C++ checks:                      C Checks.
5463 * C and C++ constants:                   C Constants.
5464 * C and C++ defaults:                    C Defaults.
5465 * C and C++ operators:                   C Operators.
5466 * C packet:                              Packets.
5467 * c packet:                              Packets.
5468 * C++:                                   C.
5469 * C++ compilers:                         C plus plus expressions.
5470 * C++ exception handling:                Debugging C plus plus.
5471 * C++ scope resolution:                  Variables.
5472 * C++ symbol decoding style:             Print Settings.
5473 * C++ symbol display:                    Debugging C plus plus.
5474 * C-L:                                   TUI Keys.
5475 * C-o (operate-and-get-next):            Command Syntax.
5476 * C-x 1:                                 TUI Keys.
5477 * C-x 2:                                 TUI Keys.
5478 * C-x A:                                 TUI Keys.
5479 * C-x a:                                 TUI Keys.
5480 * C-x C-a:                               TUI Keys.
5481 * C-x o:                                 TUI Keys.
5482 * C-x s:                                 TUI Keys.
5483 * call:                                  Calling.
5484 * call overloaded functions:             C plus plus expressions.
5485 * call stack:                            Stack.
5486 * call-last-kbd-macro (C-x e):           Keyboard Macros.
5487 * calling functions:                     Calling.
5488 * calling make:                          Shell Commands.
5489 * capitalize-word (M-c):                 Commands For Text.
5490 * casts, to view memory:                 Expressions.
5491 * catch:                                 Set Catchpoints.
5492 * catch catch:                           Set Catchpoints.
5493 * catch exceptions, list active handlers: Frame Info.
5494 * catch exec:                            Set Catchpoints.
5495 * catch fork:                            Set Catchpoints.
5496 * catch load:                            Set Catchpoints.
5497 * catch throw:                           Set Catchpoints.
5498 * catch unload:                          Set Catchpoints.
5499 * catch vfork:                           Set Catchpoints.
5500 * catchpoints:                           Breakpoints.
5501 * catchpoints, setting:                  Set Catchpoints.
5502 * cd:                                    Working Directory.
5503 * cdir:                                  Source Path.
5504 * character sets:                        Character Sets.
5505 * character-search (C-]):                Miscellaneous Commands.
5506 * character-search-backward (M-C-]):     Miscellaneous Commands.
5507 * charset:                               Character Sets.
5508 * checks, range:                         Type Checking.
5509 * checks, type:                          Checks.
5510 * checksum, for GDB remote:              Overview.
5511 * choosing target byte order:            Byte Order.
5512 * clear:                                 Delete Breaks.
5513 * clear, and Objective-C:                Method Names in Commands.
5514 * clear-screen (C-l):                    Commands For Moving.
5515 * clearing breakpoints, watchpoints, catchpoints: Delete Breaks.
5516 * close, file-i/o system call:           close.
5517 * collect (tracepoints):                 Tracepoint Actions.
5518 * collected data discarded:              Starting and Stopping Trace Experiment.
5519 * colon, doubled as scope operator:      M2 Scope.
5520 * colon-colon, context for variables/functions: Variables.
5521 * colon-colon, in Modula-2:              M2 Scope.
5522 * command editing:                       Readline Bare Essentials.
5523 * command files:                         Command Files.
5524 * command hooks:                         Hooks.
5525 * command interpreters:                  Interpreters.
5526 * command line editing:                  Editing.
5527 * commands <1>:                          Prompting.
5528 * commands:                              Break Commands.
5529 * commands for C++:                      Debugging C plus plus.
5530 * commands to STDBUG (ST2000):           ST2000.
5531 * comment:                               Command Syntax.
5532 * comment-begin:                         Readline Init File Syntax.
5533 * compatibility, GDB/MI and CLI:         GDB/MI Compatibility with CLI.
5534 * compilation directory:                 Source Path.
5535 * compiling, on Sparclet:                Sparclet.
5536 * complete:                              Help.
5537 * complete (<TAB>):                      Commands For Completion.
5538 * completion:                            Completion.
5539 * completion of quoted strings:          Completion.
5540 * completion-query-items:                Readline Init File Syntax.
5541 * condition:                             Conditions.
5542 * conditional breakpoints:               Conditions.
5543 * configuring GDB:                       Installing GDB.
5544 * configuring GDB, and source tree subdirectories: Installing GDB.
5545 * confirmation:                          Messages/Warnings.
5546 * connect (to STDBUG):                   ST2000.
5547 * console i/o as part of file-i/o:       Console I/O.
5548 * console interpreter:                   Interpreters.
5549 * console output in GDB/MI:              GDB/MI Output Syntax.
5550 * constants, in file-i/o protocol:       Constants.
5551 * continue:                              Continuing and Stepping.
5552 * continuing:                            Continuing and Stepping.
5553 * continuing threads:                    Thread Stops.
5554 * control C, and remote debugging:       Bootstrapping.
5555 * controlling terminal:                  Input/Output.
5556 * convenience variables:                 Convenience Vars.
5557 * convenience variables for tracepoints: Tracepoint Variables.
5558 * convert-meta:                          Readline Init File Syntax.
5559 * copy-backward-word ():                 Commands For Killing.
5560 * copy-forward-word ():                  Commands For Killing.
5561 * copy-region-as-kill ():                Commands For Killing.
5562 * core:                                  Files.
5563 * core dump file:                        Files.
5564 * core-file:                             Files.
5565 * crash of debugger:                     Bug Criteria.
5566 * ctrl-c message, in file-i/o protocol:  The Ctrl-C message.
5567 * current directory:                     Source Path.
5568 * current stack frame:                   Frames.
5569 * current thread:                        Threads.
5570 * cwd:                                   Source Path.
5571 * Cygwin-specific commands:              Cygwin Native.
5572 * d (delete):                            Delete Breaks.
5573 * d (SingleKey TUI key):                 TUI Single Key Mode.
5574 * D packet:                              Packets.
5575 * d packet:                              Packets.
5576 * data manipulation, in GDB/MI:          GDB/MI Data Manipulation.
5577 * debug formats and C++:                 C plus plus expressions.
5578 * debug links:                           Separate Debug Files.
5579 * debugger crash:                        Bug Criteria.
5580 * debugging C++ programs:                C plus plus expressions.
5581 * debugging information directory, global: Separate Debug Files.
5582 * debugging information in separate files: Separate Debug Files.
5583 * debugging optimized code:              Compilation.
5584 * debugging stub, example:               remote stub.
5585 * debugging target:                      Targets.
5586 * define:                                Define.
5587 * defining macros interactively:         Macros.
5588 * definition, showing a macro's:         Macros.
5589 * delete:                                Delete Breaks.
5590 * delete breakpoints:                    Delete Breaks.
5591 * delete display:                        Auto Display.
5592 * delete mem:                            Memory Region Attributes.
5593 * delete tracepoint:                     Create and Delete Tracepoints.
5594 * delete-char (C-d):                     Commands For Text.
5595 * delete-char-or-list ():                Commands For Completion.
5596 * delete-horizontal-space ():            Commands For Killing.
5597 * deleting breakpoints, watchpoints, catchpoints: Delete Breaks.
5598 * demangling:                            Print Settings.
5599 * descriptor tables display:             DJGPP Native.
5600 * detach:                                Attach.
5601 * detach (remote):                       Connecting.
5602 * device:                                Renesas Boards.
5603 * digit-argument (M-0, M-1, ... M--):    Numeric Arguments.
5604 * dir:                                   Source Path.
5605 * direct memory access (DMA) on MS-DOS:  DJGPP Native.
5606 * directories for source files:          Source Path.
5607 * directory:                             Source Path.
5608 * directory, compilation:                Source Path.
5609 * directory, current:                    Source Path.
5610 * dis (disable):                         Disabling.
5611 * disable:                               Disabling.
5612 * disable breakpoints:                   Disabling.
5613 * disable display:                       Auto Display.
5614 * disable mem:                           Memory Region Attributes.
5615 * disable tracepoint:                    Enable and Disable Tracepoints.
5616 * disable-completion:                    Readline Init File Syntax.
5617 * disassemble:                           Machine Code.
5618 * disconnect:                            Connecting.
5619 * display:                               Auto Display.
5620 * display of expressions:                Auto Display.
5621 * DJGPP debugging:                       DJGPP Native.
5622 * dll-symbols:                           Cygwin Native.
5623 * DLLs with no debugging symbols:        Non-debug DLL symbols.
5624 * do (down):                             Selection.
5625 * do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
5626 * document:                              Define.
5627 * documentation:                         Formatting Documentation.
5628 * Down:                                  TUI Keys.
5629 * down:                                  Selection.
5630 * down-silently:                         Selection.
5631 * downcase-word (M-l):                   Commands For Text.
5632 * download to H8/300 or H8/500:          H8/300.
5633 * download to Renesas SH:                H8/300.
5634 * download to Sparclet:                  Sparclet Download.
5635 * download to VxWorks:                   VxWorks Download.
5636 * dump:                                  Dump/Restore Files.
5637 * dump all data collected at tracepoint: tdump.
5638 * dump data to a file:                   Dump/Restore Files.
5639 * dump-functions ():                     Miscellaneous Commands.
5640 * dump-macros ():                        Miscellaneous Commands.
5641 * dump-variables ():                     Miscellaneous Commands.
5642 * dump/restore files:                    Dump/Restore Files.
5643 * dynamic linking:                       Files.
5644 * e (edit):                              Edit.
5645 * EBCDIC character set:                  Character Sets.
5646 * echo:                                  Output.
5647 * edit:                                  Edit.
5648 * editing:                               Editing.
5649 * editing command lines:                 Readline Bare Essentials.
5650 * editing source files:                  Edit.
5651 * editing-mode:                          Readline Init File Syntax.
5652 * else:                                  Define.
5653 * Emacs:                                 Emacs.
5654 * enable:                                Disabling.
5655 * enable breakpoints:                    Disabling.
5656 * enable display:                        Auto Display.
5657 * enable mem:                            Memory Region Attributes.
5658 * enable tracepoint:                     Enable and Disable Tracepoints.
5659 * enable-keypad:                         Readline Init File Syntax.
5660 * end:                                   Break Commands.
5661 * end-kbd-macro (C-x )):                 Keyboard Macros.
5662 * end-of-history (M->):                  Commands For History.
5663 * end-of-line (C-e):                     Commands For Moving.
5664 * entering numbers:                      Numbers.
5665 * environment (of your program):         Environment.
5666 * errno values, in file-i/o protocol:    Errno values.
5667 * error:                                 Errors.
5668 * error on valid input:                  Bug Criteria.
5669 * error-begin:                           Errors.
5670 * event designators:                     Event Designators.
5671 * event handling:                        Set Catchpoints.
5672 * examining data:                        Data.
5673 * examining memory:                      Memory.
5674 * exception handlers:                    Set Catchpoints.
5675 * exception handlers, how to list:       Frame Info.
5676 * exceptionHandler:                      Bootstrapping.
5677 * exchange-point-and-mark (C-x C-x):     Miscellaneous Commands.
5678 * exec-file:                             Files.
5679 * executable file:                       Files.
5680 * exited:                                Annotations for Running.
5681 * exiting GDB:                           Quitting GDB.
5682 * expand-tilde:                          Readline Init File Syntax.
5683 * expanding preprocessor macros:         Macros.
5684 * expressions:                           Expressions.
5685 * expressions in C or C++:               C.
5686 * expressions in C++:                    C plus plus expressions.
5687 * expressions in Modula-2:               Modula-2.
5688 * f (frame):                             Selection.
5689 * f (SingleKey TUI key):                 TUI Single Key Mode.
5690 * F packet:                              Packets.
5691 * F reply packet:                        The F reply packet.
5692 * F request packet:                      The F request packet.
5693 * fatal signal:                          Bug Criteria.
5694 * fatal signals:                         Signals.
5695 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
5696 * fg (resume foreground execution):      Continuing and Stepping.
5697 * file:                                  Files.
5698 * file-i/o examples:                     File-I/O Examples.
5699 * file-i/o overview:                     File-I/O Overview.
5700 * File-I/O remote protocol extension:    File-I/O remote protocol extension.
5701 * file-i/o reply packet:                 The F reply packet.
5702 * file-i/o request packet:               The F request packet.
5703 * find trace snapshot:                   tfind.
5704 * finish:                                Continuing and Stepping.
5705 * flinching:                             Messages/Warnings.
5706 * float promotion:                       ABI.
5707 * floating point:                        Floating Point Hardware.
5708 * floating point registers:              Registers.
5709 * floating point, MIPS remote:           MIPS Embedded.
5710 * flush_i_cache:                         Bootstrapping.
5711 * focus:                                 TUI Commands.
5712 * focus of debugging:                    Threads.
5713 * foo:                                   Symbol Errors.
5714 * fork, debugging programs which call:   Processes.
5715 * format options:                        Print Settings.
5716 * formatted output:                      Output Formats.
5717 * Fortran:                               Summary.
5718 * forward-backward-delete-char ():       Commands For Text.
5719 * forward-char (C-f):                    Commands For Moving.
5720 * forward-search:                        Search.
5721 * forward-search-history (C-s):          Commands For History.
5722 * forward-word (M-f):                    Commands For Moving.
5723 * frame number:                          Frames.
5724 * frame pointer:                         Frames.
5725 * frame, command:                        Frames.
5726 * frame, definition:                     Frames.
5727 * frame, selecting:                      Selection.
5728 * frameless execution:                   Frames.
5729 * frames-invalid:                        Invalidation.
5730 * free memory information (MS-DOS):      DJGPP Native.
5731 * fstat, file-i/o system call:           stat/fstat.
5732 * Fujitsu:                               remote stub.
5733 * full symbol tables, listing GDB's internal: Symbols.
5734 * functions without line info, and stepping: Continuing and Stepping.
5735 * G packet:                              Packets.
5736 * g packet:                              Packets.
5737 * g++, GNU C++ compiler:                 C.
5738 * garbled pointers:                      DJGPP Native.
5739 * GCC and C++:                           C plus plus expressions.
5740 * GDB bugs, reporting:                   Bug Reporting.
5741 * GDB reference card:                    Formatting Documentation.
5742 * gdb.ini:                               Command Files.
5743 * GDB/MI, breakpoint commands:           GDB/MI Breakpoint Table Commands.
5744 * GDB/MI, compatibility with CLI:        GDB/MI Compatibility with CLI.
5745 * GDB/MI, data manipulation:             GDB/MI Data Manipulation.
5746 * GDB/MI, input syntax:                  GDB/MI Input Syntax.
5747 * GDB/MI, its purpose:                   GDB/MI.
5748 * GDB/MI, out-of-band records:           GDB/MI Out-of-band Records.
5749 * GDB/MI, output syntax:                 GDB/MI Output Syntax.
5750 * GDB/MI, result records:                GDB/MI Result Records.
5751 * GDB/MI, simple examples:               GDB/MI Simple Examples.
5752 * GDB/MI, stream records:                GDB/MI Stream Records.
5753 * GDBHISTFILE:                           History.
5754 * gdbserve.nlm:                          NetWare.
5755 * gdbserver:                             Server.
5756 * GDT:                                   DJGPP Native.
5757 * getDebugChar:                          Bootstrapping.
5758 * gettimeofday, file-i/o system call:    gettimeofday.
5759 * global debugging information directory: Separate Debug Files.
5760 * GNU C++:                               C.
5761 * GNU Emacs:                             Emacs.
5762 * gnu_debuglink_crc32:                   Separate Debug Files.
5763 * h (help):                              Help.
5764 * H packet:                              Packets.
5765 * H8/300 or H8/500 download:             H8/300.
5766 * handle:                                Signals.
5767 * handle_exception:                      Stub Contents.
5768 * handling signals:                      Signals.
5769 * hardware watchpoints:                  Set Watchpoints.
5770 * hbreak:                                Set Breaks.
5771 * help:                                  Help.
5772 * help target:                           Target Commands.
5773 * help user-defined:                     Define.
5774 * heuristic-fence-post (Alpha, MIPS):    MIPS.
5775 * history events:                        Event Designators.
5776 * history expansion <1>:                 History Interaction.
5777 * history expansion:                     History.
5778 * history file:                          History.
5779 * history number:                        Value History.
5780 * history save:                          History.
5781 * history size:                          History.
5782 * history substitution:                  History.
5783 * history-preserve-point:                Readline Init File Syntax.
5784 * history-search-backward ():            Commands For History.
5785 * history-search-forward ():             Commands For History.
5786 * hook:                                  Hooks.
5787 * hook-:                                 Hooks.
5788 * hookpost:                              Hooks.
5789 * hookpost-:                             Hooks.
5790 * hooks, for commands:                   Hooks.
5791 * hooks, post-command:                   Hooks.
5792 * hooks, pre-command:                    Hooks.
5793 * horizontal-scroll-mode:                Readline Init File Syntax.
5794 * host character set:                    Character Sets.
5795 * htrace disable:                        OpenRISC 1000.
5796 * htrace enable:                         OpenRISC 1000.
5797 * htrace info:                           OpenRISC 1000.
5798 * htrace mode continuous:                OpenRISC 1000.
5799 * htrace mode suspend:                   OpenRISC 1000.
5800 * htrace print:                          OpenRISC 1000.
5801 * htrace qualifier:                      OpenRISC 1000.
5802 * htrace record:                         OpenRISC 1000.
5803 * htrace rewind:                         OpenRISC 1000.
5804 * htrace stop:                           OpenRISC 1000.
5805 * htrace trigger:                        OpenRISC 1000.
5806 * hwatch:                                OpenRISC 1000.
5807 * i (info):                              Help.
5808 * I packet:                              Packets.
5809 * i packet:                              Packets.
5810 * i/o:                                   Input/Output.
5811 * i386:                                  remote stub.
5812 * i386-stub.c:                           remote stub.
5813 * IBM1047 character set:                 Character Sets.
5814 * IDT:                                   DJGPP Native.
5815 * if:                                    Define.
5816 * ignore:                                Conditions.
5817 * ignore count (of breakpoint):          Conditions.
5818 * INCLUDE_RDB:                           VxWorks.
5819 * info:                                  Help.
5820 * info address:                          Symbols.
5821 * info all-registers:                    Registers.
5822 * info args:                             Frame Info.
5823 * info auxv:                             Auxiliary Vector.
5824 * info breakpoints:                      Set Breaks.
5825 * info catch:                            Frame Info.
5826 * info cisco:                            KOD.
5827 * info classes:                          Symbols.
5828 * info display:                          Auto Display.
5829 * info dll:                              Cygwin Native.
5830 * info dos:                              DJGPP Native.
5831 * info extensions:                       Show.
5832 * info f (info frame):                   Frame Info.
5833 * info files:                            Files.
5834 * info float:                            Floating Point Hardware.
5835 * info frame:                            Frame Info.
5836 * info frame, show the source language:  Show.
5837 * info functions:                        Symbols.
5838 * info line:                             Machine Code.
5839 * info line, and Objective-C:            Method Names in Commands.
5840 * info locals:                           Frame Info.
5841 * info macro:                            Macros.
5842 * info mem:                              Memory Region Attributes.
5843 * info or1k spr:                         OpenRISC 1000.
5844 * info proc:                             SVR4 Process Information.
5845 * info proc mappings:                    SVR4 Process Information.
5846 * info program:                          Stopping.
5847 * info registers:                        Registers.
5848 * info s (info stack):                   Backtrace.
5849 * info scope:                            Symbols.
5850 * info selectors:                        Symbols.
5851 * info set:                              Help.
5852 * info share:                            Files.
5853 * info sharedlibrary:                    Files.
5854 * info signals:                          Signals.
5855 * info source:                           Symbols.
5856 * info source, show the source language: Show.
5857 * info sources:                          Symbols.
5858 * info stack:                            Backtrace.
5859 * info symbol:                           Symbols.
5860 * info target:                           Files.
5861 * info terminal:                         Input/Output.
5862 * info threads:                          Threads.
5863 * info tracepoints:                      Listing Tracepoints.
5864 * info types:                            Symbols.
5865 * info variables:                        Symbols.
5866 * info vector:                           Vector Unit.
5867 * info w32:                              Cygwin Native.
5868 * info watchpoints:                      Set Watchpoints.
5869 * info win:                              TUI Commands.
5870 * information about tracepoints:         Listing Tracepoints.
5871 * inheritance:                           Debugging C plus plus.
5872 * init file:                             Command Files.
5873 * init file name:                        Command Files.
5874 * initial frame:                         Frames.
5875 * initialization file, readline:         Readline Init File.
5876 * innermost frame:                       Frames.
5877 * input syntax for GDB/MI:               GDB/MI Input Syntax.
5878 * input-meta:                            Readline Init File Syntax.
5879 * insert-comment (M-#):                  Miscellaneous Commands.
5880 * insert-completions (M-*):              Commands For Completion.
5881 * inspect:                               Data.
5882 * installation:                          Installing GDB.
5883 * instructions, assembly:                Machine Code.
5884 * integral datatypes, in file-i/o protocol: Integral datatypes.
5885 * Intel:                                 remote stub.
5886 * Intel disassembly flavor:              Machine Code.
5887 * interaction, readline:                 Readline Interaction.
5888 * internal commands:                     Maintenance Commands.
5889 * internal GDB breakpoints:              Set Breaks.
5890 * interpreter-exec:                      Interpreters.
5891 * interrupt:                             Quitting GDB.
5892 * interrupting remote programs:          Connecting.
5893 * interrupting remote targets:           Bootstrapping.
5894 * invalid input:                         Bug Criteria.
5895 * invoke another interpreter:            Interpreters.
5896 * isatty call, file-i/o protocol:        The isatty call.
5897 * isatty, file-i/o system call:          isatty.
5898 * isearch-terminators:                   Readline Init File Syntax.
5899 * ISO 8859-1 character set:              Character Sets.
5900 * ISO Latin 1 character set:             Character Sets.
5901 * jump:                                  Jumping.
5902 * jump, and Objective-C:                 Method Names in Commands.
5903 * k packet:                              Packets.
5904 * kernel object display:                 KOD.
5905 * keymap:                                Readline Init File Syntax.
5906 * kill:                                  Kill Process.
5907 * kill ring:                             Readline Killing Commands.
5908 * kill-line (C-k):                       Commands For Killing.
5909 * kill-region ():                        Commands For Killing.
5910 * kill-whole-line ():                    Commands For Killing.
5911 * kill-word (M-d):                       Commands For Killing.
5912 * killing text:                          Readline Killing Commands.
5913 * KOD:                                   KOD.
5914 * l (list):                              List.
5915 * languages:                             Languages.
5916 * last tracepoint number:                Create and Delete Tracepoints.
5917 * latest breakpoint:                     Set Breaks.
5918 * layout asm:                            TUI Commands.
5919 * layout next:                           TUI Commands.
5920 * layout prev:                           TUI Commands.
5921 * layout regs:                           TUI Commands.
5922 * layout split:                          TUI Commands.
5923 * layout src:                            TUI Commands.
5924 * LDT:                                   DJGPP Native.
5925 * leaving GDB:                           Quitting GDB.
5926 * Left:                                  TUI Keys.
5927 * limits, in file-i/o protocol:          Limits.
5928 * linespec:                              List.
5929 * list:                                  List.
5930 * list of supported file-i/o calls:      List of supported calls.
5931 * list output in GDB/MI:                 GDB/MI Output Syntax.
5932 * list, and Objective-C:                 Method Names in Commands.
5933 * listing GDB's internal symbol tables:  Symbols.
5934 * listing machine instructions:          Machine Code.
5935 * listing mapped overlays:               Overlay Commands.
5936 * load address, overlay's:               How Overlays Work.
5937 * load FILENAME:                         Target Commands.
5938 * local variables:                       Symbols.
5939 * locate address:                        Output Formats.
5940 * log output in GDB/MI:                  GDB/MI Output Syntax.
5941 * logging GDB output:                    Logging output.
5942 * lseek flags, in file-i/o protocol:     Lseek flags.
5943 * lseek, file-i/o system call:           lseek.
5944 * M packet:                              Packets.
5945 * m packet:                              Packets.
5946 * m680x0:                                remote stub.
5947 * m68k-stub.c:                           remote stub.
5948 * machine instructions:                  Machine Code.
5949 * macro define:                          Macros.
5950 * macro definition, showing:             Macros.
5951 * macro expand:                          Macros.
5952 * macro expand-once:                     Macros.
5953 * macro expansion, showing the results of preprocessor: Macros.
5954 * macro undef:                           Macros.
5955 * macros, example of debugging with:     Macros.
5956 * macros, user-defined:                  Macros.
5957 * maint info breakpoints:                Maintenance Commands.
5958 * maint info psymtabs:                   Symbols.
5959 * maint info sections:                   Files.
5960 * maint info symtabs:                    Symbols.
5961 * maint internal-error:                  Maintenance Commands.
5962 * maint internal-warning:                Maintenance Commands.
5963 * maint print cooked-registers:          Maintenance Commands.
5964 * maint print dummy-frames:              Maintenance Commands.
5965 * maint print psymbols:                  Symbols.
5966 * maint print raw-registers:             Maintenance Commands.
5967 * maint print reggroups:                 Maintenance Commands.
5968 * maint print register-groups:           Maintenance Commands.
5969 * maint print registers:                 Maintenance Commands.
5970 * maint print symbols:                   Symbols.
5971 * maint set profile:                     Maintenance Commands.
5972 * maint show profile:                    Maintenance Commands.
5973 * maintenance commands:                  Maintenance Commands.
5974 * make:                                  Shell Commands.
5975 * manual overlay debugging:              Overlay Commands.
5976 * map an overlay:                        Overlay Commands.
5977 * mapped:                                Files.
5978 * mapped address:                        How Overlays Work.
5979 * mapped overlays:                       How Overlays Work.
5980 * mark-modified-lines:                   Readline Init File Syntax.
5981 * mark-symlinked-directories:            Readline Init File Syntax.
5982 * match-hidden-files:                    Readline Init File Syntax.
5983 * mem:                                   Memory Region Attributes.
5984 * member functions:                      C plus plus expressions.
5985 * memory models, H8/500:                 H8/500.
5986 * memory region attributes:              Memory Region Attributes.
5987 * memory tracing:                        Breakpoints.
5988 * memory transfer, in file-i/o protocol: Memory transfer.
5989 * memory, viewing as typed object:       Expressions.
5990 * memory-mapped symbol file:             Files.
5991 * memset:                                Bootstrapping.
5992 * menu-complete ():                      Commands For Completion.
5993 * meta-flag:                             Readline Init File Syntax.
5994 * mi interpreter:                        Interpreters.
5995 * mi1 interpreter:                       Interpreters.
5996 * mi2 interpreter:                       Interpreters.
5997 * minimal language:                      Unsupported languages.
5998 * Minimal symbols and DLLs:              Non-debug DLL symbols.
5999 * MIPS boards:                           MIPS Embedded.
6000 * MIPS remote floating point:            MIPS Embedded.
6001 * MIPS remotedebug protocol:             MIPS Embedded.
6002 * MIPS stack:                            MIPS.
6003 * mode_t values, in file-i/o protocol:   mode_t values.
6004 * Modula-2:                              Summary.
6005 * Modula-2 built-ins:                    Built-In Func/Proc.
6006 * Modula-2 checks:                       M2 Checks.
6007 * Modula-2 constants:                    Built-In Func/Proc.
6008 * Modula-2 defaults:                     M2 Defaults.
6009 * Modula-2 operators:                    M2 Operators.
6010 * Modula-2, deviations from:             Deviations.
6011 * Modula-2, GDB support:                 Modula-2.
6012 * Motorola 680x0:                        remote stub.
6013 * MS Windows debugging:                  Cygwin Native.
6014 * MS-DOS system info:                    DJGPP Native.
6015 * MS-DOS-specific commands:              DJGPP Native.
6016 * multiple processes:                    Processes.
6017 * multiple targets:                      Active Targets.
6018 * multiple threads:                      Threads.
6019 * n (next):                              Continuing and Stepping.
6020 * n (SingleKey TUI key):                 TUI Single Key Mode.
6021 * names of symbols:                      Symbols.
6022 * namespace in C++:                      C plus plus expressions.
6023 * native Cygwin debugging:               Cygwin Native.
6024 * native DJGPP debugging:                DJGPP Native.
6025 * negative breakpoint numbers:           Set Breaks.
6026 * New SYSTAG message:                    Threads.
6027 * New SYSTAG message, on HP-UX:          Threads.
6028 * next:                                  Continuing and Stepping.
6029 * next-history (C-n):                    Commands For History.
6030 * nexti:                                 Continuing and Stepping.
6031 * ni (nexti):                            Continuing and Stepping.
6032 * non-incremental-forward-search-history (M-n): Commands For History.
6033 * non-incremental-reverse-search-history (M-p): Commands For History.
6034 * notation, readline:                    Readline Bare Essentials.
6035 * notational conventions, for GDB/MI:    GDB/MI.
6036 * notify output in GDB/MI:               GDB/MI Output Syntax.
6037 * number representation:                 Numbers.
6038 * numbers for breakpoints:               Breakpoints.
6039 * object files, relocatable, reading symbols from: Files.
6040 * Objective-C:                           Objective-C.
6041 * online documentation:                  Help.
6042 * open flags, in file-i/o protocol:      Open flags.
6043 * open, file-i/o system call:            open.
6044 * OpenRISC 1000:                         OpenRISC 1000.
6045 * OpenRISC 1000 htrace:                  OpenRISC 1000.
6046 * operations allowed on pending breakpoints: Set Breaks.
6047 * optimized code, debugging:             Compilation.
6048 * or1k boards:                           OpenRISC 1000.
6049 * or1ksim:                               OpenRISC 1000.
6050 * OS ABI:                                ABI.
6051 * out-of-band records in GDB/MI:         GDB/MI Out-of-band Records.
6052 * outermost frame:                       Frames.
6053 * output:                                Output.
6054 * output formats:                        Output Formats.
6055 * output syntax of GDB/MI:               GDB/MI Output Syntax.
6056 * output-meta:                           Readline Init File Syntax.
6057 * overlay area:                          How Overlays Work.
6058 * overlay auto:                          Overlay Commands.
6059 * overlay example program:               Overlay Sample Program.
6060 * overlay load-target:                   Overlay Commands.
6061 * overlay manual:                        Overlay Commands.
6062 * overlay map-overlay:                   Overlay Commands.
6063 * overlay off:                           Overlay Commands.
6064 * overlay unmap-overlay:                 Overlay Commands.
6065 * overlays:                              Overlays.
6066 * overlays, setting breakpoints in:      Overlay Commands.
6067 * overload-choice:                       Prompting.
6068 * overloaded functions, calling:         C plus plus expressions.
6069 * overloaded functions, overload resolution: Debugging C plus plus.
6070 * overloading:                           Breakpoint Menus.
6071 * overloading in C++:                    Debugging C plus plus.
6072 * overwrite-mode ():                     Commands For Text.
6073 * P packet:                              Packets.
6074 * p packet:                              Packets.
6075 * packets, reporting on stdout:          Debugging Output.
6076 * page tables display (MS-DOS):          DJGPP Native.
6077 * page-completions:                      Readline Init File Syntax.
6078 * partial symbol dump:                   Symbols.
6079 * partial symbol tables, listing GDB's internal: Symbols.
6080 * Pascal:                                Summary.
6081 * passcount:                             Tracepoint Passcounts.
6082 * patching binaries:                     Patching.
6083 * path:                                  Environment.
6084 * pauses in output:                      Screen Size.
6085 * pending breakpoints:                   Set Breaks.
6086 * PgDn:                                  TUI Keys.
6087 * PgUp:                                  TUI Keys.
6088 * physical address from linear address:  DJGPP Native.
6089 * pipes:                                 Starting.
6090 * po (print-object):                     The Print Command with Objective-C.
6091 * pointer values, in file-i/o protocol:  Pointer values.
6092 * pointer, finding referent:             Print Settings.
6093 * possible-completions (M-?):            Commands For Completion.
6094 * post-commands:                         Prompting.
6095 * post-overload-choice:                  Prompting.
6096 * post-prompt:                           Prompting.
6097 * post-prompt-for-continue:              Prompting.
6098 * post-query:                            Prompting.
6099 * pre-commands:                          Prompting.
6100 * pre-overload-choice:                   Prompting.
6101 * pre-prompt:                            Prompting.
6102 * pre-prompt-for-continue:               Prompting.
6103 * pre-query:                             Prompting.
6104 * prefix-meta (<ESC>):                   Miscellaneous Commands.
6105 * premature return from system calls:    Thread Stops.
6106 * preprocessor macro expansion, showing the results of: Macros.
6107 * previous-history (C-p):                Commands For History.
6108 * print:                                 Data.
6109 * print an Objective-C object description: The Print Command with Objective-C.
6110 * print settings:                        Print Settings.
6111 * print-object:                          The Print Command with Objective-C.
6112 * printf:                                Output.
6113 * printing data:                         Data.
6114 * process image:                         SVR4 Process Information.
6115 * processes, multiple:                   Processes.
6116 * profiling GDB:                         Maintenance Commands.
6117 * prompt <1>:                            Prompting.
6118 * prompt:                                Prompt.
6119 * prompt-for-continue:                   Prompting.
6120 * protocol basics, file-i/o:             Protocol basics.
6121 * protocol specific representation of datatypes, in file-i/o protocol: Protocol specific representation of datatypes.
6122 * protocol, GDB remote serial:           Overview.
6123 * ptype:                                 Symbols.
6124 * putDebugChar:                          Bootstrapping.
6125 * pwd:                                   Working Directory.
6126 * q (quit):                              Quitting GDB.
6127 * q (SingleKey TUI key):                 TUI Single Key Mode.
6128 * Q packet:                              Packets.
6129 * q packet:                              Packets.
6130 * query:                                 Prompting.
6131 * quit:                                  Errors.
6132 * quit [EXPRESSION]:                     Quitting GDB.
6133 * quoted-insert (C-q or C-v):            Commands For Text.
6134 * quotes in commands:                    Completion.
6135 * quoting names:                         Symbols.
6136 * r (run):                               Starting.
6137 * r (SingleKey TUI key):                 TUI Single Key Mode.
6138 * R packet:                              Packets.
6139 * r packet:                              Packets.
6140 * raise exceptions:                      Set Catchpoints.
6141 * range checking:                        Type Checking.
6142 * ranges of breakpoints:                 Breakpoints.
6143 * rbreak:                                Set Breaks.
6144 * re-read-init-file (C-x C-r):           Miscellaneous Commands.
6145 * read, file-i/o system call:            read.
6146 * reading symbols from relocatable object files: Files.
6147 * reading symbols immediately:           Files.
6148 * readline:                              Editing.
6149 * readnow:                               Files.
6150 * recent tracepoint number:              Create and Delete Tracepoints.
6151 * redirection:                           Input/Output.
6152 * redraw-current-line ():                Commands For Moving.
6153 * reference card:                        Formatting Documentation.
6154 * reference declarations:                C plus plus expressions.
6155 * refresh:                               TUI Commands.
6156 * register stack, AMD29K:                A29K.
6157 * registers:                             Registers.
6158 * regular expression:                    Set Breaks.
6159 * reloading symbols:                     Symbols.
6160 * reloading the overlay table:           Overlay Commands.
6161 * relocatable object files, reading symbols from: Files.
6162 * remote connection without stubs:       Server.
6163 * remote debugging:                      Remote.
6164 * remote programs, interrupting:         Connecting.
6165 * remote protocol, field separator:      Overview.
6166 * remote serial debugging summary:       Debug Session.
6167 * remote serial debugging, overview:     remote stub.
6168 * remote serial protocol:                Overview.
6169 * remote serial stub:                    Stub Contents.
6170 * remote serial stub list:               remote stub.
6171 * remote serial stub, initialization:    Stub Contents.
6172 * remote serial stub, main routine:      Stub Contents.
6173 * remote stub, example:                  remote stub.
6174 * remote stub, support routines:         Bootstrapping.
6175 * remotedebug, MIPS protocol:            MIPS Embedded.
6176 * remotetimeout:                         Sparclet.
6177 * remove actions from a tracepoint:      Tracepoint Actions.
6178 * rename, file-i/o system call:          rename.
6179 * Renesas:                               remote stub.
6180 * Renesas SH download:                   H8/300.
6181 * repeating command sequences:           Command Syntax.
6182 * repeating commands:                    Command Syntax.
6183 * reporting bugs in GDB:                 GDB Bugs.
6184 * response time, MIPS debugging:         MIPS.
6185 * restore:                               Dump/Restore Files.
6186 * restore data from a file:              Dump/Restore Files.
6187 * result records in GDB/MI:              GDB/MI Result Records.
6188 * resuming execution:                    Continuing and Stepping.
6189 * RET (repeat last command):             Command Syntax.
6190 * retransmit-timeout, MIPS protocol:     MIPS Embedded.
6191 * return:                                Returning.
6192 * returning from a function:             Returning.
6193 * reverse-search:                        Search.
6194 * reverse-search-history (C-r):          Commands For History.
6195 * revert-line (M-r):                     Miscellaneous Commands.
6196 * Right:                                 TUI Keys.
6197 * run:                                   Starting.
6198 * running:                               Starting.
6199 * running and debugging Sparclet programs: Sparclet Execution.
6200 * running VxWorks tasks:                 VxWorks Attach.
6201 * running, on Sparclet:                  Sparclet.
6202 * rwatch:                                Set Watchpoints.
6203 * s (SingleKey TUI key):                 TUI Single Key Mode.
6204 * s (step):                              Continuing and Stepping.
6205 * S packet:                              Packets.
6206 * s packet:                              Packets.
6207 * save tracepoints for future sessions:  save-tracepoints.
6208 * save-tracepoints:                      save-tracepoints.
6209 * saving symbol table:                   Files.
6210 * scope:                                 M2 Scope.
6211 * search:                                Search.
6212 * searching:                             Search.
6213 * section:                               Files.
6214 * segment descriptor tables:             DJGPP Native.
6215 * select trace snapshot:                 tfind.
6216 * select-frame:                          Frames.
6217 * selected frame:                        Stack.
6218 * selecting frame silently:              Frames.
6219 * self-insert (a, b, A, 1, !, ...):      Commands For Text.
6220 * separate debugging information files:  Separate Debug Files.
6221 * sequence-id, for GDB remote:           Overview.
6222 * serial connections, debugging:         Debugging Output.
6223 * serial device, Renesas micros:         Renesas Boards.
6224 * serial line speed, Renesas micros:     Renesas Boards.
6225 * serial line, target remote:            Connecting.
6226 * serial protocol, GDB remote:           Overview.
6227 * server prefix for annotations:         Server Prefix.
6228 * set:                                   Help.
6229 * set args:                              Arguments.
6230 * set auto-solib-add:                    Files.
6231 * set auto-solib-limit:                  Files.
6232 * set backtrace limit:                   Backtrace.
6233 * set backtrace past-main:               Backtrace.
6234 * set breakpoint pending:                Set Breaks.
6235 * set charset:                           Character Sets.
6236 * set check range:                       Range Checking.
6237 * set check type:                        Type Checking.
6238 * set check, range:                      Range Checking.
6239 * set check, type:                       Type Checking.
6240 * set coerce-float-to-double:            ABI.
6241 * set complaints:                        Messages/Warnings.
6242 * set confirm:                           Messages/Warnings.
6243 * set cp-abi:                            ABI.
6244 * set debug arch:                        Debugging Output.
6245 * set debug event:                       Debugging Output.
6246 * set debug expression:                  Debugging Output.
6247 * set debug frame:                       Debugging Output.
6248 * set debug overload:                    Debugging Output.
6249 * set debug remote:                      Debugging Output.
6250 * set debug serial:                      Debugging Output.
6251 * set debug target:                      Debugging Output.
6252 * set debug varobj:                      Debugging Output.
6253 * set debug-file-directory:              Separate Debug Files.
6254 * set debugevents:                       Cygwin Native.
6255 * set debugexceptions:                   Cygwin Native.
6256 * set debugexec:                         Cygwin Native.
6257 * set debugmemory:                       Cygwin Native.
6258 * set demangle-style:                    Print Settings.
6259 * set disassembly-flavor:                Machine Code.
6260 * set editing:                           Editing.
6261 * set endian auto:                       Byte Order.
6262 * set endian big:                        Byte Order.
6263 * set endian little:                     Byte Order.
6264 * set environment:                       Environment.
6265 * set extension-language:                Show.
6266 * set follow-fork-mode:                  Processes.
6267 * set gnutarget:                         Target Commands.
6268 * set height:                            Screen Size.
6269 * set history expansion:                 History.
6270 * set history filename:                  History.
6271 * set history save:                      History.
6272 * set history size:                      History.
6273 * set host-charset:                      Character Sets.
6274 * set input-radix:                       Numbers.
6275 * set language:                          Manually.
6276 * set listsize:                          List.
6277 * set logging:                           Logging output.
6278 * set machine:                           Renesas Special.
6279 * set max-user-call-depth:               Define.
6280 * set memory MOD:                        H8/500.
6281 * set mipsfpu:                           MIPS Embedded.
6282 * set new-console:                       Cygwin Native.
6283 * set new-group:                         Cygwin Native.
6284 * set opaque-type-resolution:            Symbols.
6285 * set os:                                KOD.
6286 * set osabi:                             ABI.
6287 * set output-radix:                      Numbers.
6288 * set overload-resolution:               Debugging C plus plus.
6289 * set print address:                     Print Settings.
6290 * set print array:                       Print Settings.
6291 * set print asm-demangle:                Print Settings.
6292 * set print demangle:                    Print Settings.
6293 * set print elements:                    Print Settings.
6294 * set print max-symbolic-offset:         Print Settings.
6295 * set print null-stop:                   Print Settings.
6296 * set print object:                      Print Settings.
6297 * set print pretty:                      Print Settings.
6298 * set print sevenbit-strings:            Print Settings.
6299 * set print static-members:              Print Settings.
6300 * set print symbol-filename:             Print Settings.
6301 * set print union:                       Print Settings.
6302 * set print vtbl:                        Print Settings.
6303 * set processor ARGS:                    MIPS Embedded.
6304 * set prompt:                            Prompt.
6305 * set remote hardware-breakpoint-limit:  Remote configuration.
6306 * set remote hardware-watchpoint-limit:  Remote configuration.
6307 * set remote system-call-allowed 0:      The system call.
6308 * set remote system-call-allowed 1:      The system call.
6309 * set remotedebug, MIPS protocol:        MIPS Embedded.
6310 * set retransmit-timeout:                MIPS Embedded.
6311 * set rstack_high_address:               A29K.
6312 * set shell:                             Cygwin Native.
6313 * set solib-absolute-prefix:             Files.
6314 * set solib-search-path:                 Files.
6315 * set step-mode:                         Continuing and Stepping.
6316 * set symbol-reloading:                  Symbols.
6317 * set target-charset:                    Character Sets.
6318 * set timeout:                           MIPS Embedded.
6319 * set tracepoint:                        Create and Delete Tracepoints.
6320 * set trust-readonly-sections:           Files.
6321 * set tui active-border-mode:            TUI Configuration.
6322 * set tui border-kind:                   TUI Configuration.
6323 * set tui border-mode:                   TUI Configuration.
6324 * set variable:                          Assignment.
6325 * set verbose:                           Messages/Warnings.
6326 * set width:                             Screen Size.
6327 * set write:                             Patching.
6328 * set-mark (C-@):                        Miscellaneous Commands.
6329 * set_debug_traps:                       Stub Contents.
6330 * setting variables:                     Assignment.
6331 * setting watchpoints:                   Set Watchpoints.
6332 * SH:                                    remote stub.
6333 * sh-stub.c:                             remote stub.
6334 * share:                                 Files.
6335 * shared libraries:                      Files.
6336 * sharedlibrary:                         Files.
6337 * shell:                                 Shell Commands.
6338 * shell escape:                          Shell Commands.
6339 * show:                                  Help.
6340 * show args:                             Arguments.
6341 * show auto-solib-add:                   Files.
6342 * show auto-solib-limit:                 Files.
6343 * show backtrace limit:                  Backtrace.
6344 * show backtrace past-main:              Backtrace.
6345 * show breakpoint pending:               Set Breaks.
6346 * show charset:                          Character Sets.
6347 * show check range:                      Range Checking.
6348 * show check type:                       Type Checking.
6349 * show complaints:                       Messages/Warnings.
6350 * show confirm:                          Messages/Warnings.
6351 * show convenience:                      Convenience Vars.
6352 * show copying:                          Help.
6353 * show cp-abi:                           ABI.
6354 * show debug arch:                       Debugging Output.
6355 * show debug event:                      Debugging Output.
6356 * show debug expression:                 Debugging Output.
6357 * show debug frame:                      Debugging Output.
6358 * show debug overload:                   Debugging Output.
6359 * show debug remote:                     Debugging Output.
6360 * show debug serial:                     Debugging Output.
6361 * show debug target:                     Debugging Output.
6362 * show debug varobj:                     Debugging Output.
6363 * show debug-file-directory:             Separate Debug Files.
6364 * show demangle-style:                   Print Settings.
6365 * show directories:                      Source Path.
6366 * show editing:                          Editing.
6367 * show environment:                      Environment.
6368 * show gnutarget:                        Target Commands.
6369 * show height:                           Screen Size.
6370 * show history:                          History.
6371 * show host-charset:                     Character Sets.
6372 * show input-radix:                      Numbers.
6373 * show language:                         Show.
6374 * show listsize:                         List.
6375 * show logging:                          Logging output.
6376 * show machine:                          Renesas Special.
6377 * show max-user-call-depth:              Define.
6378 * show mipsfpu:                          MIPS Embedded.
6379 * show new-console:                      Cygwin Native.
6380 * show new-group:                        Cygwin Native.
6381 * show opaque-type-resolution:           Symbols.
6382 * show os:                               KOD.
6383 * show osabi:                            ABI.
6384 * show output-radix:                     Numbers.
6385 * show paths:                            Environment.
6386 * show print address:                    Print Settings.
6387 * show print array:                      Print Settings.
6388 * show print asm-demangle:               Print Settings.
6389 * show print demangle:                   Print Settings.
6390 * show print elements:                   Print Settings.
6391 * show print max-symbolic-offset:        Print Settings.
6392 * show print object:                     Print Settings.
6393 * show print pretty:                     Print Settings.
6394 * show print sevenbit-strings:           Print Settings.
6395 * show print static-members:             Print Settings.
6396 * show print symbol-filename:            Print Settings.
6397 * show print union:                      Print Settings.
6398 * show print vtbl:                       Print Settings.
6399 * show processor:                        MIPS Embedded.
6400 * show prompt:                           Prompt.
6401 * show remote system-call-allowed:       The system call.
6402 * show remotedebug, MIPS protocol:       MIPS Embedded.
6403 * show retransmit-timeout:               MIPS Embedded.
6404 * show rstack_high_address:              A29K.
6405 * show shell:                            Cygwin Native.
6406 * show solib-absolute-prefix:            Files.
6407 * show solib-search-path:                Files.
6408 * show symbol-reloading:                 Symbols.
6409 * show target-charset:                   Character Sets.
6410 * show timeout:                          MIPS Embedded.
6411 * show user:                             Define.
6412 * show values:                           Value History.
6413 * show verbose:                          Messages/Warnings.
6414 * show version:                          Help.
6415 * show warranty:                         Help.
6416 * show width:                            Screen Size.
6417 * show write:                            Patching.
6418 * show-all-if-ambiguous:                 Readline Init File Syntax.
6419 * shows:                                 History.
6420 * si (stepi):                            Continuing and Stepping.
6421 * signal <1>:                            Annotations for Running.
6422 * signal:                                Signaling.
6423 * signal-name:                           Annotations for Running.
6424 * signal-name-end:                       Annotations for Running.
6425 * signal-string:                         Annotations for Running.
6426 * signal-string-end:                     Annotations for Running.
6427 * signalled:                             Annotations for Running.
6428 * signals:                               Signals.
6429 * silent:                                Break Commands.
6430 * sim:                                   Z8000.
6431 * simulator, Z8000:                      Z8000.
6432 * size of screen:                        Screen Size.
6433 * software watchpoints:                  Set Watchpoints.
6434 * source <1>:                            Source Annotations.
6435 * source:                                Command Files.
6436 * source path:                           Source Path.
6437 * Sparc:                                 remote stub.
6438 * sparc-stub.c:                          remote stub.
6439 * sparcl-stub.c:                         remote stub.
6440 * Sparclet:                              Sparclet.
6441 * SparcLite:                             remote stub.
6442 * speed:                                 Renesas Boards.
6443 * spr:                                   OpenRISC 1000.
6444 * ST2000 auxiliary commands:             ST2000.
6445 * st2000 CMD:                            ST2000.
6446 * stack frame:                           Frames.
6447 * stack on Alpha:                        MIPS.
6448 * stack on MIPS:                         MIPS.
6449 * stack traces:                          Backtrace.
6450 * stacking targets:                      Active Targets.
6451 * start a new trace experiment:          Starting and Stopping Trace Experiment.
6452 * start-kbd-macro (C-x ():               Keyboard Macros.
6453 * starting <1>:                          Annotations for Running.
6454 * starting:                              Starting.
6455 * stat, file-i/o system call:            stat/fstat.
6456 * status of trace data collection:       Starting and Stopping Trace Experiment.
6457 * status output in GDB/MI:               GDB/MI Output Syntax.
6458 * STDBUG commands (ST2000):              ST2000.
6459 * step:                                  Continuing and Stepping.
6460 * stepi:                                 Continuing and Stepping.
6461 * stepping:                              Continuing and Stepping.
6462 * stepping into functions with no line info: Continuing and Stepping.
6463 * stop a running trace experiment:       Starting and Stopping Trace Experiment.
6464 * stop reply packets:                    Stop Reply Packets.
6465 * stop, a pseudo-command:                Hooks.
6466 * stopped threads:                       Thread Stops.
6467 * stopping:                              Annotations for Running.
6468 * stream records in GDB/MI:              GDB/MI Stream Records.
6469 * struct stat, in file-i/o protocol:     struct stat.
6470 * struct timeval, in file-i/o protocol:  struct timeval.
6471 * stub example, remote debugging:        remote stub.
6472 * stupid questions:                      Messages/Warnings.
6473 * switching threads:                     Threads.
6474 * switching threads automatically:       Threads.
6475 * symbol decoding style, C++:            Print Settings.
6476 * symbol dump:                           Symbols.
6477 * symbol from address:                   Symbols.
6478 * symbol names:                          Symbols.
6479 * symbol overloading:                    Breakpoint Menus.
6480 * symbol table:                          Files.
6481 * symbol tables, listing GDB's internal: Symbols.
6482 * symbol-file:                           Files.
6483 * symbols, reading from relocatable object files: Files.
6484 * symbols, reading immediately:          Files.
6485 * sysinfo:                               DJGPP Native.
6486 * system call, file-i/o protocol:        The system call.
6487 * system calls and thread breakpoints:   Thread Stops.
6488 * system, file-i/o system call:          system.
6489 * T packet:                              Packets.
6490 * t packet:                              Packets.
6491 * T packet reply:                        Stop Reply Packets.
6492 * target:                                Targets.
6493 * target abug:                           M68K.
6494 * target array:                          MIPS Embedded.
6495 * target byte order:                     Byte Order.
6496 * target character set:                  Character Sets.
6497 * target core:                           Target Commands.
6498 * target cpu32bug:                       M68K.
6499 * target dbug:                           M68K.
6500 * target ddb PORT:                       MIPS Embedded.
6501 * target dink32:                         PowerPC.
6502 * target e7000, with H8/300:             H8/300.
6503 * target e7000, with Renesas ICE:        Renesas ICE.
6504 * target e7000, with Renesas SH:         SH.
6505 * target est:                            M68K.
6506 * target exec:                           Target Commands.
6507 * target hms, and serial protocol:       Renesas Boards.
6508 * target hms, with H8/300:               H8/300.
6509 * target hms, with Renesas SH:           SH.
6510 * target jtag:                           OpenRISC 1000.
6511 * target lsi PORT:                       MIPS Embedded.
6512 * target m32r:                           M32R/D.
6513 * target m32rsdi:                        M32R/D.
6514 * target mips PORT:                      MIPS Embedded.
6515 * target nrom:                           Target Commands.
6516 * target op50n:                          PA.
6517 * target output in GDB/MI:               GDB/MI Output Syntax.
6518 * target pmon PORT:                      MIPS Embedded.
6519 * target ppcbug:                         PowerPC.
6520 * target ppcbug1:                        PowerPC.
6521 * target r3900:                          MIPS Embedded.
6522 * target rdi:                            ARM.
6523 * target rdp:                            ARM.
6524 * target remote:                         Target Commands.
6525 * target rom68k:                         M68K.
6526 * target rombug:                         M68K.
6527 * target sds:                            PowerPC.
6528 * target sh3, with H8/300:               H8/300.
6529 * target sh3, with SH:                   SH.
6530 * target sh3e, with H8/300:              H8/300.
6531 * target sh3e, with SH:                  SH.
6532 * target sim:                            Target Commands.
6533 * target sim, with Z8000:                Z8000.
6534 * target sparclite:                      Sparclite.
6535 * target vxworks:                        VxWorks.
6536 * target w89k:                           PA.
6537 * tbreak:                                Set Breaks.
6538 * TCP port, target remote:               Connecting.
6539 * tdump:                                 tdump.
6540 * terminal:                              Input/Output.
6541 * Text User Interface:                   TUI.
6542 * tfind:                                 tfind.
6543 * thbreak:                               Set Breaks.
6544 * this, inside C++ member functions:     C plus plus expressions.
6545 * thread apply:                          Threads.
6546 * thread breakpoints:                    Thread Stops.
6547 * thread breakpoints and system calls:   Thread Stops.
6548 * thread identifier (GDB):               Threads.
6549 * thread identifier (system):            Threads.
6550 * thread identifier (system), on HP-UX:  Threads.
6551 * thread number:                         Threads.
6552 * thread THREADNO:                       Threads.
6553 * threads and watchpoints:               Set Watchpoints.
6554 * threads of execution:                  Threads.
6555 * threads, automatic switching:          Threads.
6556 * threads, continuing:                   Thread Stops.
6557 * threads, stopped:                      Thread Stops.
6558 * timeout, MIPS protocol:                MIPS Embedded.
6559 * trace:                                 Create and Delete Tracepoints.
6560 * trace experiment, status of:           Starting and Stopping Trace Experiment.
6561 * tracebacks:                            Backtrace.
6562 * tracepoint actions:                    Tracepoint Actions.
6563 * tracepoint data, display:              tdump.
6564 * tracepoint deletion:                   Create and Delete Tracepoints.
6565 * tracepoint number:                     Create and Delete Tracepoints.
6566 * tracepoint pass count:                 Tracepoint Passcounts.
6567 * tracepoint variables:                  Tracepoint Variables.
6568 * tracepoints:                           Tracepoints.
6569 * translating between character sets:    Character Sets.
6570 * transpose-chars (C-t):                 Commands For Text.
6571 * transpose-words (M-t):                 Commands For Text.
6572 * tstart:                                Starting and Stopping Trace Experiment.
6573 * tstatus:                               Starting and Stopping Trace Experiment.
6574 * tstop:                                 Starting and Stopping Trace Experiment.
6575 * tty:                                   Input/Output.
6576 * TUI:                                   TUI.
6577 * TUI commands:                          TUI Commands.
6578 * TUI configuration variables:           TUI Configuration.
6579 * TUI key bindings:                      TUI Keys.
6580 * tui reg:                               TUI Commands.
6581 * TUI single key mode:                   TUI Single Key Mode.
6582 * type casting memory:                   Expressions.
6583 * type checking:                         Checks.
6584 * type conversions in C++:               C plus plus expressions.
6585 * u (SingleKey TUI key):                 TUI Single Key Mode.
6586 * u (until):                             Continuing and Stepping.
6587 * UDP port, target remote:               Connecting.
6588 * undisplay:                             Auto Display.
6589 * undo (C-_ or C-x C-u):                 Miscellaneous Commands.
6590 * universal-argument ():                 Numeric Arguments.
6591 * unix-line-discard (C-u):               Commands For Killing.
6592 * unix-word-rubout (C-w):                Commands For Killing.
6593 * unknown address, locating:             Output Formats.
6594 * unlink, file-i/o system call:          unlink.
6595 * unmap an overlay:                      Overlay Commands.
6596 * unmapped overlays:                     How Overlays Work.
6597 * unset environment:                     Environment.
6598 * unsupported languages:                 Unsupported languages.
6599 * until:                                 Continuing and Stepping.
6600 * Up:                                    TUI Keys.
6601 * up:                                    Selection.
6602 * up-silently:                           Selection.
6603 * upcase-word (M-u):                     Commands For Text.
6604 * update:                                TUI Commands.
6605 * user-defined command:                  Define.
6606 * user-defined macros:                   Macros.
6607 * v (SingleKey TUI key):                 TUI Single Key Mode.
6608 * value history:                         Value History.
6609 * variable name conflict:                Variables.
6610 * variable objects in GDB/MI:            GDB/MI Variable Objects.
6611 * variable values, wrong:                Variables.
6612 * variables, readline:                   Readline Init File Syntax.
6613 * variables, setting:                    Assignment.
6614 * vCont packet:                          Packets.
6615 * vCont? packet:                         Packets.
6616 * vector unit:                           Vector Unit.
6617 * vector, auxiliary:                     Auxiliary Vector.
6618 * version number:                        Help.
6619 * visible-stats:                         Readline Init File Syntax.
6620 * VxWorks:                               VxWorks.
6621 * vxworks-timeout:                       VxWorks.
6622 * w (SingleKey TUI key):                 TUI Single Key Mode.
6623 * watch:                                 Set Watchpoints.
6624 * watchpoint:                            Annotations for Running.
6625 * watchpoints:                           Breakpoints.
6626 * watchpoints and threads:               Set Watchpoints.
6627 * whatis:                                Symbols.
6628 * where:                                 Backtrace.
6629 * while:                                 Define.
6630 * while-stepping (tracepoints):          Tracepoint Actions.
6631 * wild pointer, interpreting:            Print Settings.
6632 * winheight:                             TUI Commands.
6633 * word completion:                       Completion.
6634 * working directory:                     Source Path.
6635 * working directory (of your program):   Working Directory.
6636 * working language:                      Languages.
6637 * write, file-i/o system call:           write.
6638 * writing into corefiles:                Patching.
6639 * writing into executables:              Patching.
6640 * wrong values:                          Variables.
6641 * x (examine memory):                    Memory.
6642 * X packet:                              Packets.
6643 * x(examine), and info line:             Machine Code.
6644 * yank (C-y):                            Commands For Killing.
6645 * yank-last-arg (M-. or M-_):            Commands For History.
6646 * yank-nth-arg (M-C-y):                  Commands For History.
6647 * yank-pop (M-y):                        Commands For Killing.
6648 * yanking text:                          Readline Killing Commands.
6649 * z packet:                              Packets.
6650 * Z packets:                             Packets.
6651 * Z0 packet:                             Packets.
6652 * z0 packet:                             Packets.
6653 * Z1 packet:                             Packets.
6654 * z1 packet:                             Packets.
6655 * Z2 packet:                             Packets.
6656 * z2 packet:                             Packets.
6657 * Z3 packet:                             Packets.
6658 * z3 packet:                             Packets.
6659 * Z4 packet:                             Packets.
6660 * z4 packet:                             Packets.
6661 * Z8000:                                 Z8000.
6662 * Zilog Z8000 simulator:                 Z8000.
6663 * {TYPE}:                                Expressions.
6664
6665