The Console Window

Overview

The Console Window is perhaps the most powerful tool in the debugger. It provides functionality equivalent to almost all of the debugger's secondary windows, macro definitions, and other more advanced features.

Console Window topics:

Console Display

The Console Display is simply a scrolled window in which the debugger prompt appears. By default, the prompt is set to "(gdb) ", but it may be changed via a command line option.

To execute commands in the console window, simply enter the command in the display. If the debugger is busy, the message "Error: The debugger is busy." appears informing the user that the command was not accepted.

Whenever a command is executed, the debugger's windows will update to display any new state information. Any output from the command is also echoed to the Console Window for ease of use. If an error occurs, an error message is printed to the Console Window. All error messages appear in the Console Window using a red colored typeface.

The Console Window responds to special character commands just as a shell window does: it has a history mechanism which allows the user to scan previously used commands by pressing the up and down arrow keys on the keyboard, jumping to the beginning or end of a line by entering Ctrl-A or Ctrl-E, erasing a line by pressing Ctrl-K, and more. Users familiar with GNU Emacs will recognize these keys as commonly used keystrokes from that editor.

Getting Help

The Console Window has its own online help system. To access the help system, enter "help" at the prompt and follow the on-screen instructions. For more help, please consult the GDB User's Guide.