Next: , Up: Controlling CGDB   [Contents][Index]


3.1 Commands available during CGDB mode

When you are in the source window, you are implicitly in CGDB mode. All of the below commands are available during this mode. This mode is primarily available for the user to view the current source file, search it, or switch to a different mode.

cgdbmodekey

Puts the user into command mode. However, you are already in this mode. This is defaulted to the ESC key.

i

Puts the user into GDB mode.

s

Puts the user into scroll mode in the GDB mode.

Ctrl-T

Opens a new tty for the debugged program.

Ctrl-W

Toggle the window orientation (horizontal <-> vertical).

[<number>]k
[<number>]up arrow

Move up a line or up ‘<number>’ lines.

[<number>]j
[<number>]down arrow

Move down a line or down ‘<number>’ lines.

h
left arrow

Move left a line.

l
right arrow

Move right a line.

Ctrl-b
page up

Move up a page.

Ctrl-u

Move up 1/2 a page.

Ctrl-f
page down

Move down a page.

Ctrl-d

Move down 1/2 a page.

gg

Move to the top of file.

[<number>]G

Move to the bottom of file or to a line number within the file.

m[a-zA-Z]

Set a mark at the cursor position. A lower case letter sets a local mark that is valid within one file. An upper case letter sets a global mark valid between files. If there are ten files, each file can have a mark ‘a’, but only one can have a mark ‘A’.

'[a-zA-Z]

Jump to the corresponding local or global mark.

''

Jump to the last jump location.

'.

Jump to the currently executing line.

/

search from current cursor position.

?

reverse search from current cursor position.

n

next forward search.

N

next reverse search.

o

open the file dialog.

spacebar

Sets a breakpoint at the current line number.

t

Sets a temporary breakpoint at the current line number.

-

Shrink source window 1 line or column (depending on split orientation).

=

Grow source window 1 line or column (depending on split orientation).

_

Shrink source window 25%

+

Grow source window 25%

Ctrl-l

Clear and redraw the screen.

F5

Send a run command to GDB.

F6

Send a continue command to GDB.

F7

Send a finish command to GDB.

F8

Send a next command to GDB.

F10

Send a step command to GDB.


Next: , Up: Controlling CGDB   [Contents][Index]