home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / gdb-4.14-src.lha / gdb-4.14 / gdb / gdb.info-7 < prev    next >
Encoding:
GNU Info File  |  1995-03-04  |  47.1 KB  |  1,281 lines

  1. This is Info file ./gdb.info, produced by Makeinfo-1.55 from the input
  2. file gdb.texinfo.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Gdb: (gdb).                     The GNU debugger.
  6. END-INFO-DIR-ENTRY
  7.    This file documents the GNU debugger GDB.
  8.  
  9.    This is Edition 4.12, January 1994, of `Debugging with GDB: the GNU
  10. Source-Level Debugger' for GDB Version 4.14.
  11.  
  12.    Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995 Free
  13. Software Foundation, Inc.
  14.  
  15.    Permission is granted to make and distribute verbatim copies of this
  16. manual provided the copyright notice and this permission notice are
  17. preserved on all copies.
  18.  
  19.    Permission is granted to copy and distribute modified versions of
  20. this manual under the conditions for verbatim copying, provided also
  21. that the entire resulting derived work is distributed under the terms
  22. of a permission notice identical to this one.
  23.  
  24.    Permission is granted to copy and distribute translations of this
  25. manual into another language, under the above conditions for modified
  26. versions.
  27.  
  28. 
  29. File: gdb.info,  Node: Define,  Next: Hooks,  Up: Sequences
  30.  
  31. User-defined commands
  32. =====================
  33.  
  34.    A "user-defined command" is a sequence of GDB commands to which you
  35. assign a new name as a command.  This is done with the `define' command.
  36.  
  37. `define COMMANDNAME'
  38.      Define a command named COMMANDNAME.  If there is already a command
  39.      by that name, you are asked to confirm that you want to redefine
  40.      it.
  41.  
  42.      The definition of the command is made up of other GDB command
  43.      lines, which are given following the `define' command.  The end of
  44.      these commands is marked by a line containing `end'.
  45.  
  46. `document COMMANDNAME'
  47.      Give documentation to the user-defined command COMMANDNAME.  The
  48.      command COMMANDNAME must already be defined.  This command reads
  49.      lines of documentation just as `define' reads the lines of the
  50.      command definition, ending with `end'.  After the `document'
  51.      command is finished, `help' on command COMMANDNAME displays the
  52.      documentation you have specified.
  53.  
  54.      You may use the `document' command again to change the
  55.      documentation of a command.  Redefining the command with `define'
  56.      does not change the documentation.
  57.  
  58. `help user-defined'
  59.      List all user-defined commands, with the first line of the
  60.      documentation (if any) for each.
  61.  
  62. `show user'
  63. `show user COMMANDNAME'
  64.      Display the GDB commands used to define COMMANDNAME (but not its
  65.      documentation).  If no COMMANDNAME is given, display the
  66.      definitions for all user-defined commands.
  67.  
  68.    User-defined commands do not take arguments.  When they are
  69. executed, the commands of the definition are not printed.  An error in
  70. any command stops execution of the user-defined command.
  71.  
  72.    Commands that would ask for confirmation if used interactively
  73. proceed without asking when used inside a user-defined command.  Many
  74. GDB commands that normally print messages to say what they are doing
  75. omit the messages when used in a user-defined command.
  76.  
  77. 
  78. File: gdb.info,  Node: Hooks,  Next: Command Files,  Prev: Define,  Up: Sequences
  79.  
  80. User-defined command hooks
  81. ==========================
  82.  
  83.    You may define *hooks*, which are a special kind of user-defined
  84. command.  Whenever you run the command `foo', if the user-defined
  85. command `hook-foo' exists, it is executed (with no arguments) before
  86. that command.
  87.  
  88.    In addition, a pseudo-command, `stop' exists.  Defining
  89. (`hook-stop') makes the associated commands execute every time
  90. execution stops in your program: before breakpoint commands are run,
  91. displays are printed, or the stack frame is printed.
  92.  
  93.    For example, to ignore `SIGALRM' signals while single-stepping, but
  94. treat them normally during normal execution, you could define:
  95.  
  96.      define hook-stop
  97.      handle SIGALRM nopass
  98.      end
  99.      
  100.      define hook-run
  101.      handle SIGALRM pass
  102.      end
  103.      
  104.      define hook-continue
  105.      handle SIGLARM pass
  106.      end
  107.  
  108.    You can define a hook for any single-word command in GDB, but not
  109. for command aliases; you should define a hook for the basic command
  110. name, e.g.  `backtrace' rather than `bt'.  If an error occurs during
  111. the execution of your hook, execution of GDB commands stops and GDB
  112. issues a prompt (before the command that you actually typed had a
  113. chance to run).
  114.  
  115.    If you try to define a hook which does not match any known command,
  116. you get a warning from the `define' command.
  117.  
  118. 
  119. File: gdb.info,  Node: Command Files,  Next: Output,  Prev: Hooks,  Up: Sequences
  120.  
  121. Command files
  122. =============
  123.  
  124.    A command file for GDB is a file of lines that are GDB commands.
  125. Comments (lines starting with `#') may also be included.  An empty line
  126. in a command file does nothing; it does not mean to repeat the last
  127. command, as it would from the terminal.
  128.  
  129.    When you start GDB, it automatically executes commands from its
  130. "init files".  These are files named `.gdbinit'.  GDB reads the init
  131. file (if any) in your home directory, then processes command line
  132. options and operands, and then reads the init file (if any) in the
  133. current working directory.  This is so the init file in your home
  134. directory can set options (such as `set complaints') which affect the
  135. processing of the command line options and operands.  The init files
  136. are not executed if you use the `-nx' option; *note Choosing modes:
  137. Mode Options..
  138.  
  139.    On some configurations of GDB, the init file is known by a different
  140. name (these are typically environments where a specialized form of GDB
  141. may need to coexist with other forms, hence a different name for the
  142. specialized version's init file).  These are the environments with
  143. special init file names:
  144.  
  145.    * VxWorks (Wind River Systems real-time OS): `.vxgdbinit'
  146.  
  147.    * OS68K (Enea Data Systems real-time OS): `.os68gdbinit'
  148.  
  149.    * ES-1800 (Ericsson Telecom AB M68000 emulator): `.esgdbinit'
  150.  
  151.    You can also request the execution of a command file with the
  152. `source' command:
  153.  
  154. `source FILENAME'
  155.      Execute the command file FILENAME.
  156.  
  157.    The lines in a command file are executed sequentially.  They are not
  158. printed as they are executed.  An error in any command terminates
  159. execution of the command file.
  160.  
  161.    Commands that would ask for confirmation if used interactively
  162. proceed without asking when used in a command file.  Many GDB commands
  163. that normally print messages to say what they are doing omit the
  164. messages when called from command files.
  165.  
  166. 
  167. File: gdb.info,  Node: Output,  Prev: Command Files,  Up: Sequences
  168.  
  169. Commands for controlled output
  170. ==============================
  171.  
  172.    During the execution of a command file or a user-defined command,
  173. normal GDB output is suppressed; the only output that appears is what is
  174. explicitly printed by the commands in the definition.  This section
  175. describes three commands useful for generating exactly the output you
  176. want.
  177.  
  178. `echo TEXT'
  179.      Print TEXT.  Nonprinting characters can be included in TEXT using
  180.      C escape sequences, such as `\n' to print a newline.  *No newline
  181.      is printed unless you specify one.* In addition to the standard C
  182.      escape sequences, a backslash followed by a space stands for a
  183.      space.  This is useful for displaying a string with spaces at the
  184.      beginning or the end, since leading and trailing spaces are
  185.      otherwise trimmed from all arguments.  To print ` and foo = ', use
  186.      the command `echo \ and foo = \ '.
  187.  
  188.      A backslash at the end of TEXT can be used, as in C, to continue
  189.      the command onto subsequent lines.  For example,
  190.  
  191.           echo This is some text\n\
  192.           which is continued\n\
  193.           onto several lines.\n
  194.  
  195.      produces the same output as
  196.  
  197.           echo This is some text\n
  198.           echo which is continued\n
  199.           echo onto several lines.\n
  200.  
  201. `output EXPRESSION'
  202.      Print the value of EXPRESSION and nothing but that value: no
  203.      newlines, no `$NN = '.  The value is not entered in the value
  204.      history either.  *Note Expressions: Expressions, for more
  205.      information on expressions.
  206.  
  207. `output/FMT EXPRESSION'
  208.      Print the value of EXPRESSION in format FMT.  You can use the same
  209.      formats as for `print'.  *Note Output formats: Output Formats, for
  210.      more information.
  211.  
  212. `printf STRING, EXPRESSIONS...'
  213.      Print the values of the EXPRESSIONS under the control of STRING.
  214.      The EXPRESSIONS are separated by commas and may be either numbers
  215.      or pointers.  Their values are printed as specified by STRING,
  216.      exactly as if your program were to execute the C subroutine
  217.  
  218.           printf (STRING, EXPRESSIONS...);
  219.  
  220.      For example, you can print two values in hex like this:
  221.  
  222.           printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo
  223.  
  224.      The only backslash-escape sequences that you can use in the format
  225.      string are the simple ones that consist of backslash followed by a
  226.      letter.
  227.  
  228. 
  229. File: gdb.info,  Node: Emacs,  Next: GDB Bugs,  Prev: Sequences,  Up: Top
  230.  
  231. Using GDB under GNU Emacs
  232. *************************
  233.  
  234.    A special interface allows you to use GNU Emacs to view (and edit)
  235. the source files for the program you are debugging with GDB.
  236.  
  237.    To use this interface, use the command `M-x gdb' in Emacs.  Give the
  238. executable file you want to debug as an argument.  This command starts
  239. GDB as a subprocess of Emacs, with input and output through a newly
  240. created Emacs buffer.
  241.  
  242.    Using GDB under Emacs is just like using GDB normally except for two
  243. things:
  244.  
  245.    * All "terminal" input and output goes through the Emacs buffer.
  246.  
  247.    This applies both to GDB commands and their output, and to the input
  248. and output done by the program you are debugging.
  249.  
  250.    This is useful because it means that you can copy the text of
  251. previous commands and input them again; you can even use parts of the
  252. output in this way.
  253.  
  254.    All the facilities of Emacs' Shell mode are available for interacting
  255. with your program.  In particular, you can send signals the usual
  256. way--for example, `C-c C-c' for an interrupt, `C-c C-z' for a stop.
  257.  
  258.    * GDB displays source code through Emacs.
  259.  
  260.    Each time GDB displays a stack frame, Emacs automatically finds the
  261. source file for that frame and puts an arrow (`=>') at the left margin
  262. of the current line.  Emacs uses a separate buffer for source display,
  263. and splits the screen to show both your GDB session and the source.
  264.  
  265.    Explicit GDB `list' or search commands still produce output as
  266. usual, but you probably have no reason to use them from Emacs.
  267.  
  268.      *Warning:* If the directory where your program resides is not your
  269.      current directory, it can be easy to confuse Emacs about the
  270.      location of the source files, in which case the auxiliary display
  271.      buffer does not appear to show your source.  GDB can find programs
  272.      by searching your environment's `PATH' variable, so the GDB input
  273.      and output session proceeds normally; but Emacs does not get
  274.      enough information back from GDB to locate the source files in
  275.      this situation.  To avoid this problem, either start GDB mode from
  276.      the directory where your program resides, or specify an absolute
  277.      file name when prompted for the `M-x gdb' argument.
  278.  
  279.      A similar confusion can result if you use the GDB `file' command to
  280.      switch to debugging a program in some other location, from an
  281.      existing GDB buffer in Emacs.
  282.  
  283.    By default, `M-x gdb' calls the program called `gdb'.  If you need
  284. to call GDB by a different name (for example, if you keep several
  285. configurations around, with different names) you can set the Emacs
  286. variable `gdb-command-name'; for example,
  287.  
  288.      (setq gdb-command-name "mygdb")
  289.  
  290. (preceded by `ESC ESC', or typed in the `*scratch*' buffer, or in your
  291. `.emacs' file) makes Emacs call the program named "`mygdb'" instead.
  292.  
  293.    In the GDB I/O buffer, you can use these special Emacs commands in
  294. addition to the standard Shell mode commands:
  295.  
  296. `C-h m'
  297.      Describe the features of Emacs' GDB Mode.
  298.  
  299. `M-s'
  300.      Execute to another source line, like the GDB `step' command; also
  301.      update the display window to show the current file and location.
  302.  
  303. `M-n'
  304.      Execute to next source line in this function, skipping all function
  305.      calls, like the GDB `next' command.  Then update the display window
  306.      to show the current file and location.
  307.  
  308. `M-i'
  309.      Execute one instruction, like the GDB `stepi' command; update
  310.      display window accordingly.
  311.  
  312. `M-x gdb-nexti'
  313.      Execute to next instruction, using the GDB `nexti' command; update
  314.      display window accordingly.
  315.  
  316. `C-c C-f'
  317.      Execute until exit from the selected stack frame, like the GDB
  318.      `finish' command.
  319.  
  320. `M-c'
  321.      Continue execution of your program, like the GDB `continue'
  322.      command.
  323.  
  324.      *Warning:* In Emacs v19, this command is `C-c C-p'.
  325.  
  326. `M-u'
  327.      Go up the number of frames indicated by the numeric argument
  328.      (*note Numeric Arguments: (emacs)Arguments.), like the GDB `up'
  329.      command.
  330.  
  331.      *Warning:* In Emacs v19, this command is `C-c C-u'.
  332.  
  333. `M-d'
  334.      Go down the number of frames indicated by the numeric argument,
  335.      like the GDB `down' command.
  336.  
  337.      *Warning:* In Emacs v19, this command is `C-c C-d'.
  338.  
  339. `C-x &'
  340.      Read the number where the cursor is positioned, and insert it at
  341.      the end of the GDB I/O buffer.  For example, if you wish to
  342.      disassemble code around an address that was displayed earlier,
  343.      type `disassemble'; then move the cursor to the address display,
  344.      and pick up the argument for `disassemble' by typing `C-x &'.
  345.  
  346.      You can customize this further by defining elements of the list
  347.      `gdb-print-command'; once it is defined, you can format or
  348.      otherwise process numbers picked up by `C-x &' before they are
  349.      inserted.  A numeric argument to `C-x &' indicates that you wish
  350.      special formatting, and also acts as an index to pick an element
  351.      of the list.  If the list element is a string, the number to be
  352.      inserted is formatted using the Emacs function `format'; otherwise
  353.      the number is passed as an argument to the corresponding list
  354.      element.
  355.  
  356.    In any source file, the Emacs command `C-x SPC' (`gdb-break') tells
  357. GDB to set a breakpoint on the source line point is on.
  358.  
  359.    If you accidentally delete the source-display buffer, an easy way to
  360. get it back is to type the command `f' in the GDB buffer, to request a
  361. frame display; when you run under Emacs, this recreates the source
  362. buffer if necessary to show you the context of the current frame.
  363.  
  364.    The source files displayed in Emacs are in ordinary Emacs buffers
  365. which are visiting the source files in the usual way.  You can edit the
  366. files with these buffers if you wish; but keep in mind that GDB
  367. communicates with Emacs in terms of line numbers.  If you add or delete
  368. lines from the text, the line numbers that GDB knows cease to
  369. correspond properly with the code.
  370.  
  371. 
  372. File: gdb.info,  Node: GDB Bugs,  Next: Command Line Editing,  Prev: Emacs,  Up: Top
  373.  
  374. Reporting Bugs in GDB
  375. *********************
  376.  
  377.    Your bug reports play an essential role in making GDB reliable.
  378.  
  379.    Reporting a bug may help you by bringing a solution to your problem,
  380. or it may not.  But in any case the principal function of a bug report
  381. is to help the entire community by making the next version of GDB work
  382. better.  Bug reports are your contribution to the maintenance of GDB.
  383.  
  384.    In order for a bug report to serve its purpose, you must include the
  385. information that enables us to fix the bug.
  386.  
  387. * Menu:
  388.  
  389. * Bug Criteria::                Have you found a bug?
  390. * Bug Reporting::               How to report bugs
  391.  
  392. 
  393. File: gdb.info,  Node: Bug Criteria,  Next: Bug Reporting,  Up: GDB Bugs
  394.  
  395. Have you found a bug?
  396. =====================
  397.  
  398.    If you are not sure whether you have found a bug, here are some
  399. guidelines:
  400.  
  401.    * If the debugger gets a fatal signal, for any input whatever, that
  402.      is a GDB bug.  Reliable debuggers never crash.
  403.  
  404.    * If GDB produces an error message for valid input, that is a bug.
  405.  
  406.    * If GDB does not produce an error message for invalid input, that
  407.      is a bug.  However, you should note that your idea of "invalid
  408.      input" might be our idea of "an extension" or "support for
  409.      traditional practice".
  410.  
  411.    * If you are an experienced user of debugging tools, your suggestions
  412.      for improvement of GDB are welcome in any case.
  413.  
  414. 
  415. File: gdb.info,  Node: Bug Reporting,  Prev: Bug Criteria,  Up: GDB Bugs
  416.  
  417. How to report bugs
  418. ==================
  419.  
  420.    A number of companies and individuals offer support for GNU products.
  421. If you obtained GDB from a support organization, we recommend you
  422. contact that organization first.
  423.  
  424.    You can find contact information for many support companies and
  425. individuals in the file `etc/SERVICE' in the GNU Emacs distribution.
  426.  
  427.    In any event, we also recommend that you send bug reports for GDB to
  428. one of these addresses:
  429.  
  430.      bug-gdb@prep.ai.mit.edu
  431.      {ucbvax|mit-eddie|uunet}!prep.ai.mit.edu!bug-gdb
  432.  
  433.    *Do not send bug reports to `info-gdb', or to `help-gdb', or to any
  434. newsgroups.* Most users of GDB do not want to receive bug reports.
  435. Those that do, have arranged to receive `bug-gdb'.
  436.  
  437.    The mailing list `bug-gdb' has a newsgroup `gnu.gdb.bug' which
  438. serves as a repeater.  The mailing list and the newsgroup carry exactly
  439. the same messages.  Often people think of posting bug reports to the
  440. newsgroup instead of mailing them.  This appears to work, but it has one
  441. problem which can be crucial: a newsgroup posting often lacks a mail
  442. path back to the sender.  Thus, if we need to ask for more information,
  443. we may be unable to reach you.  For this reason, it is better to send
  444. bug reports to the mailing list.
  445.  
  446.    As a last resort, send bug reports on paper to:
  447.  
  448.      GNU Debugger Bugs
  449.      Free Software Foundation
  450.      545 Tech Square
  451.      Cambridge, MA 02139
  452.  
  453.    The fundamental principle of reporting bugs usefully is this:
  454. *report all the facts*.  If you are not sure whether to state a fact or
  455. leave it out, state it!
  456.  
  457.    Often people omit facts because they think they know what causes the
  458. problem and assume that some details do not matter.  Thus, you might
  459. assume that the name of the variable you use in an example does not
  460. matter.  Well, probably it does not, but one cannot be sure.  Perhaps
  461. the bug is a stray memory reference which happens to fetch from the
  462. location where that name is stored in memory; perhaps, if the name were
  463. different, the contents of that location would fool the debugger into
  464. doing the right thing despite the bug.  Play it safe and give a
  465. specific, complete example.  That is the easiest thing for you to do,
  466. and the most helpful.
  467.  
  468.    Keep in mind that the purpose of a bug report is to enable us to fix
  469. the bug if it is new to us.  It is not as important as what happens if
  470. the bug is already known.  Therefore, always write your bug reports on
  471. the assumption that the bug has not been reported previously.
  472.  
  473.    Sometimes people give a few sketchy facts and ask, "Does this ring a
  474. bell?"  Those bug reports are useless, and we urge everyone to *refuse
  475. to respond to them* except to chide the sender to report bugs properly.
  476.  
  477.    To enable us to fix the bug, you should include all these things:
  478.  
  479.    * The version of GDB.  GDB announces it if you start with no
  480.      arguments; you can also print it at any time using `show version'.
  481.  
  482.      Without this, we will not know whether there is any point in
  483.      looking for the bug in the current version of GDB.
  484.  
  485.    * The type of machine you are using, and the operating system name
  486.      and version number.
  487.  
  488.    * What compiler (and its version) was used to compile GDB--e.g.
  489.      "gcc-2.0".
  490.  
  491.    * What compiler (and its version) was used to compile the program you
  492.      are debugging--e.g.  "gcc-2.0".
  493.  
  494.    * The command arguments you gave the compiler to compile your
  495.      example and observe the bug.  For example, did you use `-O'?  To
  496.      guarantee you will not omit something important, list them all.  A
  497.      copy of the Makefile (or the output from make) is sufficient.
  498.  
  499.      If we were to try to guess the arguments, we would probably guess
  500.      wrong and then we might not encounter the bug.
  501.  
  502.    * A complete input script, and all necessary source files, that will
  503.      reproduce the bug.
  504.  
  505.    * A description of what behavior you observe that you believe is
  506.      incorrect.  For example, "It gets a fatal signal."
  507.  
  508.      Of course, if the bug is that GDB gets a fatal signal, then we will
  509.      certainly notice it.  But if the bug is incorrect output, we might
  510.      not notice unless it is glaringly wrong.  We are human, after all.
  511.      You might as well not give us a chance to make a mistake.
  512.  
  513.      Even if the problem you experience is a fatal signal, you should
  514.      still say so explicitly.  Suppose something strange is going on,
  515.      such as, your copy of GDB is out of synch, or you have encountered
  516.      a bug in the C library on your system.  (This has happened!)  Your
  517.      copy might crash and ours would not.  If you told us to expect a
  518.      crash, then when ours fails to crash, we would know that the bug
  519.      was not happening for us.  If you had not told us to expect a
  520.      crash, then we would not be able to draw any conclusion from our
  521.      observations.
  522.  
  523.    * If you wish to suggest changes to the GDB source, send us context
  524.      diffs.  If you even discuss something in the GDB source, refer to
  525.      it by context, not by line number.
  526.  
  527.      The line numbers in our development sources will not match those
  528.      in your sources.  Your line numbers would convey no useful
  529.      information to us.
  530.  
  531.    Here are some things that are not necessary:
  532.  
  533.    * A description of the envelope of the bug.
  534.  
  535.      Often people who encounter a bug spend a lot of time investigating
  536.      which changes to the input file will make the bug go away and which
  537.      changes will not affect it.
  538.  
  539.      This is often time consuming and not very useful, because the way
  540.      we will find the bug is by running a single example under the
  541.      debugger with breakpoints, not by pure deduction from a series of
  542.      examples.  We recommend that you save your time for something else.
  543.  
  544.      Of course, if you can find a simpler example to report *instead*
  545.      of the original one, that is a convenience for us.  Errors in the
  546.      output will be easier to spot, running under the debugger will take
  547.      less time, and so on.
  548.  
  549.      However, simplification is not vital; if you do not want to do
  550.      this, report the bug anyway and send us the entire test case you
  551.      used.
  552.  
  553.    * A patch for the bug.
  554.  
  555.      A patch for the bug does help us if it is a good one.  But do not
  556.      omit the necessary information, such as the test case, on the
  557.      assumption that a patch is all we need.  We might see problems
  558.      with your patch and decide to fix the problem another way, or we
  559.      might not understand it at all.
  560.  
  561.      Sometimes with a program as complicated as GDB it is very hard to
  562.      construct an example that will make the program follow a certain
  563.      path through the code.  If you do not send us the example, we will
  564.      not be able to construct one, so we will not be able to verify
  565.      that the bug is fixed.
  566.  
  567.      And if we cannot understand what bug you are trying to fix, or why
  568.      your patch should be an improvement, we will not install it.  A
  569.      test case will help us to understand.
  570.  
  571.    * A guess about what the bug is or what it depends on.
  572.  
  573.      Such guesses are usually wrong.  Even we cannot guess right about
  574.      such things without first using the debugger to find the facts.
  575.  
  576. 
  577. File: gdb.info,  Node: Command Line Editing,  Next: Using History Interactively,  Prev: GDB Bugs,  Up: Top
  578.  
  579. Command Line Editing
  580. ********************
  581.  
  582.    This text describes GNU's command line editing interface.
  583.  
  584. * Menu:
  585.  
  586. * Introduction and Notation::    Notation used in this text.
  587. * Readline Interaction::    The minimum set of commands for editing a line.
  588. * Readline Init File::        Customizing Readline from a user's view.
  589.  
  590. 
  591. File: gdb.info,  Node: Introduction and Notation,  Next: Readline Interaction,  Up: Command Line Editing
  592.  
  593. Introduction to Line Editing
  594. ============================
  595.  
  596.    The following paragraphs describe the notation we use to represent
  597. keystrokes.
  598.  
  599.    The text C-k is read as `Control-K' and describes the character
  600. produced when the Control key is depressed and the k key is struck.
  601.  
  602.    The text M-k is read as `Meta-K' and describes the character
  603. produced when the meta key (if you have one) is depressed, and the k
  604. key is struck.  If you do not have a meta key, the identical keystroke
  605. can be generated by typing ESC first, and then typing k.  Either
  606. process is known as "metafying" the k key.
  607.  
  608.    The text M-C-k is read as `Meta-Control-k' and describes the
  609. character produced by "metafying" C-k.
  610.  
  611.    In addition, several keys have their own names.  Specifically, DEL,
  612. ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this
  613. text, or in an init file (*note Readline Init File::., for more info).
  614.  
  615. 
  616. File: gdb.info,  Node: Readline Interaction,  Next: Readline Init File,  Prev: Introduction and Notation,  Up: Command Line Editing
  617.  
  618. Readline Interaction
  619. ====================
  620.  
  621.    Often during an interactive session you type in a long line of text,
  622. only to notice that the first word on the line is misspelled.  The
  623. Readline library gives you a set of commands for manipulating the text
  624. as you type it in, allowing you to just fix your typo, and not forcing
  625. you to retype the majority of the line.  Using these editing commands,
  626. you move the cursor to the place that needs correction, and delete or
  627. insert the text of the corrections.  Then, when you are satisfied with
  628. the line, you simply press RETURN.  You do not have to be at the end of
  629. the line to press RETURN; the entire line is accepted regardless of the
  630. location of the cursor within the line.
  631.  
  632. * Menu:
  633.  
  634. * Readline Bare Essentials::    The least you need to know about Readline.
  635. * Readline Movement Commands::    Moving about the input line.
  636. * Readline Killing Commands::    How to delete text, and how to get it back!
  637. * Readline Arguments::        Giving numeric arguments to commands.
  638.  
  639. 
  640. File: gdb.info,  Node: Readline Bare Essentials,  Next: Readline Movement Commands,  Up: Readline Interaction
  641.  
  642. Readline Bare Essentials
  643. ------------------------
  644.  
  645.    In order to enter characters into the line, simply type them.  The
  646. typed character appears where the cursor was, and then the cursor moves
  647. one space to the right.  If you mistype a character, you can use DEL to
  648. back up, and delete the mistyped character.
  649.  
  650.    Sometimes you may miss typing a character that you wanted to type,
  651. and not notice your error until you have typed several other
  652. characters.  In that case, you can type C-b to move the cursor to the
  653. left, and then correct your mistake.  Aftwerwards, you can move the
  654. cursor to the right with C-f.
  655.  
  656.    When you add text in the middle of a line, you will notice that
  657. characters to the right of the cursor get `pushed over' to make room
  658. for the text that you have inserted.  Likewise, when you delete text
  659. behind the cursor, characters to the right of the cursor get `pulled
  660. back' to fill in the blank space created by the removal of the text.  A
  661. list of the basic bare essentials for editing the text of an input line
  662. follows.
  663.  
  664. C-b
  665.      Move back one character.
  666.  
  667. C-f
  668.      Move forward one character.
  669.  
  670. DEL
  671.      Delete the character to the left of the cursor.
  672.  
  673. C-d
  674.      Delete the character underneath the cursor.
  675.  
  676. Printing characters
  677.      Insert itself into the line at the cursor.
  678.  
  679. C-_
  680.      Undo the last thing that you did.  You can undo all the way back
  681.      to an empty line.
  682.  
  683. 
  684. File: gdb.info,  Node: Readline Movement Commands,  Next: Readline Killing Commands,  Prev: Readline Bare Essentials,  Up: Readline Interaction
  685.  
  686. Readline Movement Commands
  687. --------------------------
  688.  
  689.    The above table describes the most basic possible keystrokes that
  690. you need in order to do editing of the input line.  For your
  691. convenience, many other commands have been added in addition to C-b,
  692. C-f, C-d, and DEL.  Here are some commands for moving more rapidly
  693. about the line.
  694.  
  695. C-a
  696.      Move to the start of the line.
  697.  
  698. C-e
  699.      Move to the end of the line.
  700.  
  701. M-f
  702.      Move forward a word.
  703.  
  704. M-b
  705.      Move backward a word.
  706.  
  707. C-l
  708.      Clear the screen, reprinting the current line at the top.
  709.  
  710.    Notice how C-f moves forward a character, while M-f moves forward a
  711. word.  It is a loose convention that control keystrokes operate on
  712. characters while meta keystrokes operate on words.
  713.  
  714. 
  715. File: gdb.info,  Node: Readline Killing Commands,  Next: Readline Arguments,  Prev: Readline Movement Commands,  Up: Readline Interaction
  716.  
  717. Readline Killing Commands
  718. -------------------------
  719.  
  720.    "Killing" text means to delete the text from the line, but to save
  721. it away for later use, usually by "yanking" it back into the line.  If
  722. the description for a command says that it `kills' text, then you can
  723. be sure that you can get the text back in a different (or the same)
  724. place later.
  725.  
  726.    Here is the list of commands for killing text.
  727.  
  728. C-k
  729.      Kill the text from the current cursor position to the end of the
  730.      line.
  731.  
  732. M-d
  733.      Kill from the cursor to the end of the current word, or if between
  734.      words, to the end of the next word.
  735.  
  736. M-DEL
  737.      Kill from the cursor to the start of the previous word, or if
  738.      between words, to the start of the previous word.
  739.  
  740. C-w
  741.      Kill from the cursor to the previous whitespace.  This is
  742.      different than M-DEL because the word boundaries differ.
  743.  
  744.    And, here is how to "yank" the text back into the line.  Yanking is
  745.  
  746. C-y
  747.      Yank the most recently killed text back into the buffer at the
  748.      cursor.
  749.  
  750. M-y
  751.      Rotate the kill-ring, and yank the new top.  You can only do this
  752.      if the prior command is C-y or M-y.
  753.  
  754.    When you use a kill command, the text is saved in a "kill-ring".
  755. Any number of consecutive kills save all of the killed text together, so
  756. that when you yank it back, you get it in one clean sweep.  The kill
  757. ring is not line specific; the text that you killed on a previously
  758. typed line is available to be yanked back later, when you are typing
  759. another line.
  760.  
  761. 
  762. File: gdb.info,  Node: Readline Arguments,  Prev: Readline Killing Commands,  Up: Readline Interaction
  763.  
  764. Readline Arguments
  765. ------------------
  766.  
  767.    You can pass numeric arguments to Readline commands.  Sometimes the
  768. argument acts as a repeat count, other times it is the sign of the
  769. argument that is significant.  If you pass a negative argument to a
  770. command which normally acts in a forward direction, that command will
  771. act in a backward direction.  For example, to kill text back to the
  772. start of the line, you might type M- C-k.
  773.  
  774.    The general way to pass numeric arguments to a command is to type
  775. meta digits before the command.  If the first `digit' you type is a
  776. minus sign (-), then the sign of the argument will be negative.  Once
  777. you have typed one meta digit to get the argument started, you can type
  778. the remainder of the digits, and then the command.  For example, to give
  779. the C-d command an argument of 10, you could type M-1 0 C-d.
  780.  
  781. 
  782. File: gdb.info,  Node: Readline Init File,  Prev: Readline Interaction,  Up: Command Line Editing
  783.  
  784. Readline Init File
  785. ==================
  786.  
  787.    Although the Readline library comes with a set of Emacs-like
  788. keybindings, it is possible that you would like to use a different set
  789. of keybindings.  You can customize programs that use Readline by putting
  790. commands in an "init" file in your home directory.  The name of this
  791. file is `~/.inputrc'.
  792.  
  793.    When a program which uses the Readline library starts up, the
  794. `~/.inputrc' file is read, and the keybindings are set.
  795.  
  796.    In addition, the C-x C-r command re-reads this init file, thus
  797. incorporating any changes that you might have made to it.
  798.  
  799. * Menu:
  800.  
  801. * Readline Init Syntax::    Syntax for the commands in `~/.inputrc'.
  802. * Readline Vi Mode::        Switching to `vi' mode in Readline.
  803.  
  804. 
  805. File: gdb.info,  Node: Readline Init Syntax,  Next: Readline Vi Mode,  Up: Readline Init File
  806.  
  807. Readline Init Syntax
  808. --------------------
  809.  
  810.    There are only four constructs allowed in the `~/.inputrc' file:
  811.  
  812. Variable Settings
  813.      You can change the state of a few variables in Readline.  You do
  814.      this by using the `set' command within the init file.  Here is how
  815.      you would specify that you wish to use Vi line editing commands:
  816.  
  817.           set editing-mode vi
  818.  
  819.      Right now, there are only a few variables which can be set; so few
  820.      in fact, that we just iterate them here:
  821.  
  822.     `editing-mode'
  823.           The `editing-mode' variable controls which editing mode you
  824.           are using.  By default, GNU Readline starts up in Emacs
  825.           editing mode, where the keystrokes are most similar to Emacs.
  826.           This variable can either be set to `emacs' or `vi'.
  827.  
  828.     `horizontal-scroll-mode'
  829.           This variable can either be set to `On' or `Off'.  Setting it
  830.           to `On' means that the text of the lines that you edit will
  831.           scroll horizontally on a single screen line when they are
  832.           larger than the width of the screen, instead of wrapping onto
  833.           a new screen line.  By default, this variable is set to `Off'.
  834.  
  835.     `mark-modified-lines'
  836.           This variable when set to `On', says to display an asterisk
  837.           (`*') at the starts of history lines which have been modified.
  838.           This variable is off by default.
  839.  
  840.     `prefer-visible-bell'
  841.           If this variable is set to `On' it means to use a visible
  842.           bell if one is available, rather than simply ringing the
  843.           terminal bell.  By default, the value is `Off'.
  844.  
  845. Key Bindings
  846.      The syntax for controlling keybindings in the `~/.inputrc' file is
  847.      simple.  First you have to know the name of the command that you
  848.      want to change.  The following pages contain tables of the command
  849.      name, the default keybinding, and a short description of what the
  850.      command does.
  851.  
  852.      Once you know the name of the command, simply place the name of
  853.      the key you wish to bind the command to, a colon, and then the
  854.      name of the command on a line in the `~/.inputrc' file.  The name
  855.      of the key can be expressed in different ways, depending on which
  856.      is most comfortable for you.
  857.  
  858.     KEYNAME: FUNCTION-NAME or MACRO
  859.           KEYNAME is the name of a key spelled out in English.  For
  860.           example:
  861.                Control-u: universal-argument
  862.                Meta-Rubout: backward-kill-word
  863.                Control-o: ">&output"
  864.  
  865.           In the above example, C-u is bound to the function
  866.           `universal-argument', and C-o is bound to run the macro
  867.           expressed on the right hand side (that is, to insert the text
  868.           `>&output' into the line).
  869.  
  870.     "KEYSEQ": FUNCTION-NAME or MACRO
  871.           KEYSEQ differs from KEYNAME above in that strings denoting an
  872.           entire key sequence can be specified.  Simply place the key
  873.           sequence in double quotes.  GNU Emacs style key escapes can
  874.           be used, as in the following example:
  875.  
  876.                "\C-u": universal-argument
  877.                "\C-x\C-r": re-read-init-file
  878.                "\e[11~": "Function Key 1"
  879.  
  880.           In the above example, C-u is bound to the function
  881.           `universal-argument' (just as it was in the first example),
  882.           C-x C-r is bound to the function `re-read-init-file', and ESC
  883.           [ 1 1 ~ is bound to insert the text `Function Key 1'.
  884.  
  885. * Menu:
  886.  
  887. * Commands For Moving::        Moving about the line.
  888. * Commands For History::    Getting at previous lines.
  889. * Commands For Text::        Commands for changing text.
  890. * Commands For Killing::    Commands for killing and yanking.
  891. * Numeric Arguments::        Specifying numeric arguments, repeat counts.
  892. * Commands For Completion::    Getting Readline to do the typing for you.
  893. * Miscellaneous Commands::    Other miscillaneous commands.
  894.  
  895. 
  896. File: gdb.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Readline Init Syntax
  897.  
  898. Commands For Moving
  899. ...................
  900.  
  901. `beginning-of-line (C-a)'
  902.      Move to the start of the current line.
  903.  
  904. `end-of-line (C-e)'
  905.      Move to the end of the line.
  906.  
  907. `forward-char (C-f)'
  908.      Move forward a character.
  909.  
  910. `backward-char (C-b)'
  911.      Move back a character.
  912.  
  913. `forward-word (M-f)'
  914.      Move forward to the end of the next word.
  915.  
  916. `backward-word (M-b)'
  917.      Move back to the start of this, or the previous, word.
  918.  
  919. `clear-screen (C-l)'
  920.      Clear the screen leaving the current line at the top of the screen.
  921.  
  922. 
  923. File: gdb.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Readline Init Syntax
  924.  
  925. Commands For Manipulating The History
  926. .....................................
  927.  
  928. `accept-line (Newline, Return)'
  929.      Accept the line regardless of where the cursor is.  If this line is
  930.      non-empty, add it to the history list.  If this line was a history
  931.      line, then restore the history line to its original state.
  932.  
  933. `previous-history (C-p)'
  934.      Move `up' through the history list.
  935.  
  936. `next-history (C-n)'
  937.      Move `down' through the history list.
  938.  
  939. `beginning-of-history (M-<)'
  940.      Move to the first line in the history.
  941.  
  942. `end-of-history (M->)'
  943.      Move to the end of the input history, i.e., the line you are
  944.      entering!
  945.  
  946. `reverse-search-history (C-r)'
  947.      Search backward starting at the current line and moving `up'
  948.      through the history as necessary.  This is an incremental search.
  949.  
  950. `forward-search-history (C-s)'
  951.      Search forward starting at the current line and moving `down'
  952.      through the the history as necessary.
  953.  
  954. 
  955. File: gdb.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Readline Init Syntax
  956.  
  957. Commands For Changing Text
  958. ..........................
  959.  
  960. `delete-char (C-d)'
  961.      Delete the character under the cursor.  If the cursor is at the
  962.      beginning of the line, and there are no characters in the line, and
  963.      the last character typed was not C-d, then return EOF.
  964.  
  965. `backward-delete-char (Rubout)'
  966.      Delete the character behind the cursor.  A numeric arg says to kill
  967.      the characters instead of deleting them.
  968.  
  969. `quoted-insert (C-q, C-v)'
  970.      Add the next character that you type to the line verbatim.  This is
  971.      how to insert things like C-q for example.
  972.  
  973. `tab-insert (M-TAB)'
  974.      Insert a tab character.
  975.  
  976. `self-insert (a, b, A, 1, !, ...)'
  977.      Insert yourself.
  978.  
  979. `transpose-chars (C-t)'
  980.      Drag the character before point forward over the character at
  981.      point.  Point moves forward as well.  If point is at the end of
  982.      the line, then transpose the two characters before point.
  983.      Negative args don't work.
  984.  
  985. `transpose-words (M-t)'
  986.      Drag the word behind the cursor past the word in front of the
  987.      cursor moving the cursor over that word as well.
  988.  
  989. `upcase-word (M-u)'
  990.      Uppercase all letters in the current (or following) word.  With a
  991.      negative argument, do the previous word, but do not move point.
  992.  
  993. `downcase-word (M-l)'
  994.      Lowercase all letters in the current (or following) word.  With a
  995.      negative argument, do the previous word, but do not move point.
  996.  
  997. `capitalize-word (M-c)'
  998.      Uppercase the first letter in the current (or following) word.
  999.      With a negative argument, do the previous word, but do not move
  1000.      point.
  1001.  
  1002. 
  1003. File: gdb.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Readline Init Syntax
  1004.  
  1005. Killing And Yanking
  1006. ...................
  1007.  
  1008. `kill-line (C-k)'
  1009.      Kill the text from the current cursor position to the end of the
  1010.      line.
  1011.  
  1012. `backward-kill-line ()'
  1013.      Kill backward to the beginning of the line.  This is normally
  1014.      unbound.
  1015.  
  1016. `kill-word (M-d)'
  1017.      Kill from the cursor to the end of the current word, or if between
  1018.      words, to the end of the next word.
  1019.  
  1020. `backward-kill-word (M-DEL)'
  1021.      Kill the word behind the cursor.
  1022.  
  1023. `unix-line-discard (C-u)'
  1024.      Do what C-u used to do in Unix line input.  We save the killed
  1025.      text on the kill-ring, though.
  1026.  
  1027. `unix-word-rubout (C-w)'
  1028.      Do what C-w used to do in Unix line input.  The killed text is
  1029.      saved on the kill-ring.  This is different than backward-kill-word
  1030.      because the word boundaries differ.
  1031.  
  1032. `yank (C-y)'
  1033.      Yank the top of the kill ring into the buffer at point.
  1034.  
  1035. `yank-pop (M-y)'
  1036.      Rotate the kill-ring, and yank the new top.  You can only do this
  1037.      if the prior command is yank or yank-pop.
  1038.  
  1039. 
  1040. File: gdb.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Readline Init Syntax
  1041.  
  1042. Specifying Numeric Arguments
  1043. ............................
  1044.  
  1045. `digit-argument (M-0, M-1, ... M--)'
  1046.      Add this digit to the argument already accumulating, or start a new
  1047.      argument.  M- starts a negative argument.
  1048.  
  1049. `universal-argument ()'
  1050.      Do what C-u does in emacs.  By default, this is not bound.
  1051.  
  1052. 
  1053. File: gdb.info,  Node: Commands For Completion,  Next: Miscellaneous Commands,  Prev: Numeric Arguments,  Up: Readline Init Syntax
  1054.  
  1055. Letting Readline Type For You
  1056. .............................
  1057.  
  1058. `complete (TAB)'
  1059.      Attempt to do completion on the text before point.  This is
  1060.      implementation defined.  Generally, if you are typing a filename
  1061.      argument, you can do filename completion; if you are typing a
  1062.      command, you can do command completion, if you are typing in a
  1063.      symbol to GDB, you can do symbol name completion, if you are
  1064.      typing in a variable to Bash, you can do variable name
  1065.      completion...
  1066.  
  1067. `possible-completions (M-?)'
  1068.      List the possible completions of the text before point.
  1069.  
  1070. 
  1071. File: gdb.info,  Node: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Readline Init Syntax
  1072.  
  1073. Some Miscellaneous Commands
  1074. ...........................
  1075.  
  1076. `re-read-init-file (C-x C-r)'
  1077.      Read in the contents of your `~/.inputrc' file, and incorporate
  1078.      any bindings found there.
  1079.  
  1080. `abort (C-g)'
  1081.      Stop running the current editing command.
  1082.  
  1083. `prefix-meta (ESC)'
  1084.      Make the next character that you type be metafied.  This is for
  1085.      people without a meta key.  Typing ESC f is equivalent to typing
  1086.      M-f.
  1087.  
  1088. `undo (C-_)'
  1089.      Incremental undo, separately remembered for each line.
  1090.  
  1091. `revert-line (M-r)'
  1092.      Undo all changes made to this line.  This is like typing the `undo'
  1093.      command enough times to get back to the beginning.
  1094.  
  1095. 
  1096. File: gdb.info,  Node: Readline Vi Mode,  Prev: Readline Init Syntax,  Up: Readline Init File
  1097.  
  1098. Readline Vi Mode
  1099. ----------------
  1100.  
  1101.    While the Readline library does not have a full set of Vi editing
  1102. functions, it does contain enough to allow simple editing of the line.
  1103.  
  1104.    In order to switch interactively between Emacs and Vi editing modes,
  1105. use the command M-C-j (toggle-editing-mode).
  1106.  
  1107.    When you enter a line in Vi mode, you are already placed in
  1108. `insertion' mode, as if you had typed an `i'.  Pressing ESC switches
  1109. you into `edit' mode, where you can edit the text of the line with the
  1110. standard Vi movement keys, move to previous history lines with `k', and
  1111. following lines with `j', and so forth.
  1112.  
  1113. 
  1114. File: gdb.info,  Node: Using History Interactively,  Next: Renamed Commands,  Prev: Command Line Editing,  Up: Top
  1115.  
  1116. Using History Interactively
  1117. ***************************
  1118.  
  1119.    This chapter describes how to use the GNU History Library
  1120. interactively, from a user's standpoint.
  1121.  
  1122. * Menu:
  1123.  
  1124. * History Interaction::        What it feels like using History as a user.
  1125.  
  1126. 
  1127. File: gdb.info,  Node: History Interaction,  Up: Using History Interactively
  1128.  
  1129. History Interaction
  1130. ===================
  1131.  
  1132.    The History library provides a history expansion feature that is
  1133. similar to the history expansion in Csh.  The following text describes
  1134. the sytax that you use to manipulate the history information.
  1135.  
  1136.    History expansion takes place in two parts.  The first is to
  1137. determine which line from the previous history should be used during
  1138. substitution.  The second is to select portions of that line for
  1139. inclusion into the current one.  The line selected from the previous
  1140. history is called the "event", and the portions of that line that are
  1141. acted upon are called "words".  The line is broken into words in the
  1142. same fashion that the Bash shell does, so that several English (or
  1143. Unix) words surrounded by quotes are considered as one word.
  1144.  
  1145. * Menu:
  1146.  
  1147. * Event Designators::    How to specify which history line to use.
  1148. * Word Designators::    Specifying which words are of interest.
  1149. * Modifiers::        Modifying the results of susbstitution.
  1150.  
  1151. 
  1152. File: gdb.info,  Node: Event Designators,  Next: Word Designators,  Up: History Interaction
  1153.  
  1154. Event Designators
  1155. -----------------
  1156.  
  1157.    An event designator is a reference to a command line entry in the
  1158. history list.
  1159.  
  1160. `!'
  1161.      Start a history subsititution, except when followed by a space,
  1162.      tab, or the end of the line... = or (.
  1163.  
  1164. `!!'
  1165.      Refer to the previous command.  This is a synonym for `!-1'.
  1166.  
  1167. `!n'
  1168.      Refer to command line N.
  1169.  
  1170. `!-n'
  1171.      Refer to the command line N lines back.
  1172.  
  1173. `!string'
  1174.      Refer to the most recent command starting with STRING.
  1175.  
  1176. `!?string'[`?']
  1177.      Refer to the most recent command containing STRING.
  1178.  
  1179. 
  1180. File: gdb.info,  Node: Word Designators,  Next: Modifiers,  Prev: Event Designators,  Up: History Interaction
  1181.  
  1182. Word Designators
  1183. ----------------
  1184.  
  1185.    A : separates the event specification from the word designator.  It
  1186. can be omitted if the word designator begins with a ^, $, * or %.
  1187. Words are numbered from the beginning of the line, with the first word
  1188. being denoted by a 0 (zero).
  1189.  
  1190. `0 (zero)'
  1191.      The zero'th word.  For many applications, this is the command word.
  1192.  
  1193. `n'
  1194.      The N'th word.
  1195.  
  1196. `^'
  1197.      The first argument.  that is, word 1.
  1198.  
  1199. `$'
  1200.      The last argument.
  1201.  
  1202. `%'
  1203.      The word matched by the most recent `?string?' search.
  1204.  
  1205. `x-y'
  1206.      A range of words; `-Y' Abbreviates `0-Y'.
  1207.  
  1208. `*'
  1209.      All of the words, excepting the zero'th.  This is a synonym for
  1210.      `1-$'.  It is not an error to use * if there is just one word in
  1211.      the event.  The empty string is returned in that case.
  1212.  
  1213. 
  1214. File: gdb.info,  Node: Modifiers,  Prev: Word Designators,  Up: History Interaction
  1215.  
  1216. Modifiers
  1217. ---------
  1218.  
  1219.    After the optional word designator, you can add a sequence of one or
  1220. more of the following modifiers, each preceded by a :.
  1221.  
  1222. `#'
  1223.      The entire command line typed so far.  This means the current
  1224.      command, not the previous command, so it really isn't a word
  1225.      designator, and doesn't belong in this section.
  1226.  
  1227. `h'
  1228.      Remove a trailing pathname component, leaving only the head.
  1229.  
  1230. `r'
  1231.      Remove a trailing suffix of the form `.'SUFFIX, leaving the
  1232.      basename.
  1233.  
  1234. `e'
  1235.      Remove all but the suffix.
  1236.  
  1237. `t'
  1238.      Remove all leading  pathname  components, leaving the tail.
  1239.  
  1240. `p'
  1241.      Print the new command but do not execute it.
  1242.  
  1243. 
  1244. File: gdb.info,  Node: Renamed Commands,  Next: Formatting Documentation,  Prev: Using History Interactively,  Up: Top
  1245.  
  1246. Renamed Commands
  1247. ****************
  1248.  
  1249.    The following commands were renamed in GDB 4, in order to make the
  1250. command set as a whole more consistent and easier to use and remember:
  1251.  
  1252.      OLD COMMAND               NEW COMMAND
  1253.      ---------------           -------------------------------
  1254.      add-syms                  add-symbol-file
  1255.      delete environment        unset environment
  1256.      info convenience          show convenience
  1257.      info copying              show copying
  1258.      info directories          show directories
  1259.      info editing              show commands
  1260.      info history              show values
  1261.      info targets              help target
  1262.      info values               show values
  1263.      info version              show version
  1264.      info warranty             show warranty
  1265.      set/show addressprint     set/show print address
  1266.      set/show array-max        set/show print elements
  1267.      set/show arrayprint       set/show print array
  1268.      set/show asm-demangle     set/show print asm-demangle
  1269.      set/show caution          set/show confirm
  1270.      set/show demangle         set/show print demangle
  1271.      set/show history write    set/show history save
  1272.      set/show prettyprint      set/show print pretty
  1273.      set/show screen-height    set/show height
  1274.      set/show screen-width     set/show width
  1275.      set/show sevenbit-strings set/show print sevenbit-strings
  1276.      set/show unionprint       set/show print union
  1277.      set/show vtblprint        set/show print vtbl
  1278.      
  1279.      unset                     [No longer an alias for delete]
  1280.  
  1281.