[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
The GUD interaction buffer uses a variant of Shell mode, so the Emacs commands of Shell mode are available (voir la section Shell Mode). All the usual commands for your debugger are available, and you can use the Shell mode history commands to repeat them. If you wish, you can control your debugger process entirely through this buffer.
GUD mode also provides commands for setting and clearing breakpoints, for
selecting stack frames, and for stepping through the program. These
commands are available both in the GUD buffer and globally, but with
different key bindings. It also has its own tool bar from which you can
invoke the more common commands by clicking on the appropriate icon. This
is particularly useful for repetitive commands like gud-next
and
gud-step
, and allows you to keep the GUD buffer hidden.
The breakpoint commands are normally used in source file buffers, because that is the easiest way to specify where to set or clear the breakpoint. Here's the global command to set a breakpoint:
Set a breakpoint on the source line that point is on.
Here are the other special commands provided by GUD. The keys starting with C-c are available only in the GUD interaction buffer. The key bindings that start with C-x C-a are available in the GUD interaction buffer and also in source files. Some of these commands are not available to all the supported debuggers.
Display in another window the last line referred to in the GUD buffer (that
is, the line indicated in the last location message). This runs the command
gud-refresh
.
Execute a single line of code (gud-step
). If the line contains a
function call, execution stops after entering the called function.
Execute a single line of code, stepping across entire function calls at full
speed (gud-next
).
Execute a single machine instruction (gud-stepi
).
Evaluate the expression at point (gud-print
). If Emacs does not
print the exact expression that you want, mark it as a region first.
Continue execution without specifying any stopping point. The program will
run until it hits a breakpoint, terminates, or gets a signal that the
debugger is checking for (gud-cont
).
Delete the breakpoint(s) on the current source line, if any
(gud-remove
). If you use this command in the GUD interaction buffer,
it applies to the line where the program last stopped.
Set a temporary breakpoint on the current source line, if any
(gud-tbreak
). If you use this command in the GUD interaction buffer,
it applies to the line where the program last stopped.
Select the next enclosing stack frame (gud-up
). This is equivalent
to the GDB command ‘up’.
Select the next inner stack frame (gud-down
). This is equivalent to
the GDB command ‘down’.
Continue execution to the current line (gud-until
). The program will
run until it hits a breakpoint, terminates, gets a signal that the debugger
is checking for, or reaches the line on which the cursor currently sits.
Run the program until the selected stack frame returns or stops for some
other reason (gud-finish
).
If you are using GDB, these additional key bindings are available:
Only useful in a source buffer, gud-jump
transfers the program's
execution point to the current line. In other words, the next line that the
program executes will be the one where you gave the command. If the new
execution line is in a different function from the previously one, GDB
prompts for confirmation since the results may be bizarre. See the GDB
manual entry regarding jump
for details.
With GDB, complete a symbol name (gud-gdb-complete-command
). This
key is available only in the GUD interaction buffer.
These commands interpret a numeric argument as a repeat count, when that makes sense.
Because <TAB> serves as a completion command, you can't use it to enter a tab as input to the program you are debugging with GDB. Instead, type C-q <TAB> to enter a tab.
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 23 Février 2009 en utilisant texi2html 1.78.