Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Previous: GUD Customization, Up: Debuggers

32.6.5 GDB Graphical Interface

By default, the command gdb starts GDB using a graphical interface where you view and control the program's data using Emacs windows. You can still interact with GDB through the GUD buffer, but the point of this mode is that you can do it through menus and clicks, without needing to know GDB commands. For example, 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. If a breakpoint already exists on that line, this action will remove it. You can also enable or disable a breakpoint by clicking Mouse-3 on the bullet. If you drag the debugger arrow in the fringe with Mouse-1, execution will continue to the line where you release the button, provided it is still in the same frame (gdb-mouse-until). Alternatively, you can click Mouse-2 at some point in the fringe of this buffer and execution will advance to there.

This mode requires that GDB think that the screen size is unlimited, and sets the height and width accordingly. For correct operation it is important that you don't change these values during the session.

You can also run GDB in text command mode, which creates a buffer for input and output to GDB. To do this, set gud-gdb-command-name to "gdb --fullname" or edit the startup command in the minibuffer to say that. You need to do use text command mode to run multiple debugging sessions within one Emacs session. If you have customized gud-gdb-command-name in that way, then you can use M-x gdba to invoke GDB in graphical mode.

  Published under the terms of the GNU General Public License Design by Interspire