mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
2003-08-07 Andrew Cagney <cagney@redhat.com>
Patch from Nick Roberts. * gdb.texinfo (Using GDB under GNU Emacs): Fix/update key bindings. Remove description of send-gdb-command.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2003-08-07 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
Patch from Nick Roberts.
|
||||||
|
* gdb.texinfo (Using GDB under GNU Emacs): Fix/update key
|
||||||
|
bindings. Remove description of send-gdb-command.
|
||||||
|
|
||||||
2003-08-07 Andrew Cagney <cagney@redhat.com>
|
2003-08-07 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* gdb.texinfo (Mode Options): Mention that "mi2" was included in
|
* gdb.texinfo (Mode Options): Mention that "mi2" was included in
|
||||||
|
@ -14145,36 +14145,26 @@ and the source.
|
|||||||
Explicit @value{GDBN} @code{list} or search commands still produce output as
|
Explicit @value{GDBN} @code{list} or search commands still produce output as
|
||||||
usual, but you probably have no reason to use them from Emacs.
|
usual, but you probably have no reason to use them from Emacs.
|
||||||
|
|
||||||
@quotation
|
If you specify an absolute file name when prompted for the @kbd{M-x
|
||||||
@emph{Warning:} If the directory where your program resides is not your
|
gdb} argument, then Emacs sets your current working directory to where
|
||||||
current directory, it can be easy to confuse Emacs about the location of
|
your program resides. If you only specify the file name, then Emacs
|
||||||
the source files, in which case the auxiliary display buffer does not
|
sets your current working directory to to the directory associated
|
||||||
appear to show your source. @value{GDBN} can find programs by searching your
|
with the previous buffer. In this case, @value{GDBN} may find your
|
||||||
environment's @code{PATH} variable, so the @value{GDBN} input and output
|
program by searching your environment's @code{PATH} variable, but on
|
||||||
session proceeds normally; but Emacs does not get enough information
|
some operating systems it might not find the source. So, although the
|
||||||
back from @value{GDBN} to locate the source files in this situation. To
|
@value{GDBN} input and output session proceeds normally, the auxiliary
|
||||||
avoid this problem, either start @value{GDBN} mode from the directory where
|
buffer does not display the current source and line of execution.
|
||||||
your program resides, or specify an absolute file name when prompted for the
|
|
||||||
@kbd{M-x gdb} argument.
|
|
||||||
|
|
||||||
A similar confusion can result if you use the @value{GDBN} @code{file} command to
|
The initial working directory of @value{GDBN} is printed on the top
|
||||||
switch to debugging a program in some other location, from an existing
|
line of the @value{GDBN} I/O buffer and this serves as a default for
|
||||||
@value{GDBN} buffer in Emacs.
|
the commands that specify files for @value{GDBN} to operate
|
||||||
@end quotation
|
on. @xref{Files, ,Commands to specify files}.
|
||||||
|
|
||||||
By default, @kbd{M-x gdb} calls the program called @file{gdb}. If
|
By default, @kbd{M-x gdb} calls the program called @file{gdb}. If you
|
||||||
you need to call @value{GDBN} by a different name (for example, if you keep
|
need to call @value{GDBN} by a different name (for example, if you
|
||||||
several configurations around, with different names) you can set the
|
keep several configurations around, with different names) you can
|
||||||
Emacs variable @code{gdb-command-name}; for example,
|
customize the Emacs variable @code{gud-gdb-command-name} to run the
|
||||||
|
one you want.
|
||||||
@smallexample
|
|
||||||
(setq gdb-command-name "mygdb")
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
|
|
||||||
in your @file{.emacs} file) makes Emacs call the program named
|
|
||||||
``@code{mygdb}'' instead.
|
|
||||||
|
|
||||||
In the @value{GDBN} I/O buffer, you can use these special Emacs commands in
|
In the @value{GDBN} I/O buffer, you can use these special Emacs commands in
|
||||||
addition to the standard Shell mode commands:
|
addition to the standard Shell mode commands:
|
||||||
@ -14183,66 +14173,47 @@ addition to the standard Shell mode commands:
|
|||||||
@item C-h m
|
@item C-h m
|
||||||
Describe the features of Emacs' @value{GDBN} Mode.
|
Describe the features of Emacs' @value{GDBN} Mode.
|
||||||
|
|
||||||
@item M-s
|
@item C-c C-s
|
||||||
Execute to another source line, like the @value{GDBN} @code{step} command; also
|
Execute to another source line, like the @value{GDBN} @code{step} command; also
|
||||||
update the display window to show the current file and location.
|
update the display window to show the current file and location.
|
||||||
|
|
||||||
@item M-n
|
@item C-c C-n
|
||||||
Execute to next source line in this function, skipping all function
|
Execute to next source line in this function, skipping all function
|
||||||
calls, like the @value{GDBN} @code{next} command. Then update the display window
|
calls, like the @value{GDBN} @code{next} command. Then update the display window
|
||||||
to show the current file and location.
|
to show the current file and location.
|
||||||
|
|
||||||
@item M-i
|
@item C-c C-i
|
||||||
Execute one instruction, like the @value{GDBN} @code{stepi} command; update
|
Execute one instruction, like the @value{GDBN} @code{stepi} command; update
|
||||||
display window accordingly.
|
display window accordingly.
|
||||||
|
|
||||||
@item M-x gdb-nexti
|
|
||||||
Execute to next instruction, using the @value{GDBN} @code{nexti} command; update
|
|
||||||
display window accordingly.
|
|
||||||
|
|
||||||
@item C-c C-f
|
@item C-c C-f
|
||||||
Execute until exit from the selected stack frame, like the @value{GDBN}
|
Execute until exit from the selected stack frame, like the @value{GDBN}
|
||||||
@code{finish} command.
|
@code{finish} command.
|
||||||
|
|
||||||
@item M-c
|
@item C-c C-r
|
||||||
Continue execution of your program, like the @value{GDBN} @code{continue}
|
Continue execution of your program, like the @value{GDBN} @code{continue}
|
||||||
command.
|
command.
|
||||||
|
|
||||||
@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
|
@item C-c <
|
||||||
|
|
||||||
@item M-u
|
|
||||||
Go up the number of frames indicated by the numeric argument
|
Go up the number of frames indicated by the numeric argument
|
||||||
(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
|
(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
|
||||||
like the @value{GDBN} @code{up} command.
|
like the @value{GDBN} @code{up} command.
|
||||||
|
|
||||||
@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
|
@item C-c >
|
||||||
|
|
||||||
@item M-d
|
|
||||||
Go down the number of frames indicated by the numeric argument, like the
|
Go down the number of frames indicated by the numeric argument, like the
|
||||||
@value{GDBN} @code{down} command.
|
@value{GDBN} @code{down} command.
|
||||||
|
|
||||||
@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
|
|
||||||
|
|
||||||
@item C-x &
|
|
||||||
Read the number where the cursor is positioned, and insert it at the end
|
|
||||||
of the @value{GDBN} I/O buffer. For example, if you wish to disassemble code
|
|
||||||
around an address that was displayed earlier, type @kbd{disassemble};
|
|
||||||
then move the cursor to the address display, and pick up the
|
|
||||||
argument for @code{disassemble} by typing @kbd{C-x &}.
|
|
||||||
|
|
||||||
You can customize this further by defining elements of the list
|
|
||||||
@code{gdb-print-command}; once it is defined, you can format or
|
|
||||||
otherwise process numbers picked up by @kbd{C-x &} before they are
|
|
||||||
inserted. A numeric argument to @kbd{C-x &} indicates that you
|
|
||||||
wish special formatting, and also acts as an index to pick an element of the
|
|
||||||
list. If the list element is a string, the number to be inserted is
|
|
||||||
formatted using the Emacs function @code{format}; otherwise the number
|
|
||||||
is passed as an argument to the corresponding list element.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
In any source file, the Emacs command @kbd{C-x SPC} (@code{gdb-break})
|
In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
|
||||||
tells @value{GDBN} to set a breakpoint on the source line point is on.
|
tells @value{GDBN} to set a breakpoint on the source line point is on.
|
||||||
|
|
||||||
|
If you type @kbd{M-x speedbar}, then Emacs displays a separate frame which
|
||||||
|
shows a backtrace when the @value{GDBN} I/O buffer is current. Move
|
||||||
|
point to any frame in the stack and type @key{RET} to make it become the
|
||||||
|
current frame and display the associated source in the source buffer.
|
||||||
|
Alternatively, click @kbd{Mouse-2} to make the selected frame become the
|
||||||
|
current one.
|
||||||
|
|
||||||
If you accidentally delete the source-display buffer, an easy way to get
|
If you accidentally delete the source-display buffer, an easy way to get
|
||||||
it back is to type the command @code{f} in the @value{GDBN} buffer, to
|
it back is to type the command @code{f} in the @value{GDBN} buffer, to
|
||||||
request a frame display; when you run under Emacs, this recreates
|
request a frame display; when you run under Emacs, this recreates
|
||||||
@ -14256,6 +14227,10 @@ communicates with Emacs in terms of line numbers. If you add or
|
|||||||
delete lines from the text, the line numbers that @value{GDBN} knows cease
|
delete lines from the text, the line numbers that @value{GDBN} knows cease
|
||||||
to correspond properly with the code.
|
to correspond properly with the code.
|
||||||
|
|
||||||
|
The description given here is for GNU Emacs version 21.3 and a more
|
||||||
|
detailed description of its interaction with @value{GDBN} is given in
|
||||||
|
the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu} Emacs Manual}).
|
||||||
|
|
||||||
@c The following dropped because Epoch is nonstandard. Reactivate
|
@c The following dropped because Epoch is nonstandard. Reactivate
|
||||||
@c if/when v19 does something similar. ---doc@cygnus.com 19dec1990
|
@c if/when v19 does something similar. ---doc@cygnus.com 19dec1990
|
||||||
@ignore
|
@ignore
|
||||||
|
Reference in New Issue
Block a user