[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
32.6.5.2 Source Buffers
Many GDB commands can be entered using keybindings or the tool bar but sometimes it is quicker to use the fringe. These commands either manipulate breakpoints or control program execution. When there is no fringe, you can use the margin but this is only present when the source file already has a breakpoint.
You can click Mouse-1 in the fringe or display margin of a source buffer to set a breakpoint there and, on a graphical display, a red bullet will appear on that line. If a breakpoint already exists on that line, the same click will remove it. You can also enable or disable a breakpoint by clicking C-Mouse-1 on the bullet.
A solid arrow in the left fringe of a source buffer indicates the line of the innermost frame where the debugged program has stopped. A hollow arrow indicates the current execution line of higher level frames.
If you drag the arrow in the fringe with Mouse-1
(gdb-mouse-until
), execution will continue to the line where
you release the button, provided it is still in the same frame.
Alternatively, you can click Mouse-3 at some point in the fringe
of this buffer and execution will advance to there. A similar command
(gdb-mouse-jump
) allows you to jump to a source line without
executing the intermediate lines by clicking C-Mouse-3. This
command allows you to go backwards which can be useful for running
through code that has already executed, in order to examine its
execution in more detail.
- Mouse-1
Set or clear a breakpoint.
- C-Mouse-1
Enable or disable a breakpoint.
- Mouse-3
Continue execution to here.
- C-Mouse-3
Jump to here.
If the variable gdb-find-source-frame
is non-nil
and
execution stops in a frame for which there is no source code e.g after
an interrupt, then Emacs finds and displays the first frame further up
stack for which there is source. If it is nil
then the source
buffer continues to display the last frame which maybe more useful,
for example, when re-setting a breakpoint.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |