Getting started with Emacs+GDB debugging

This page shows the basic steps to start debugging in emacs with gdb.
For more information, google: emacs gdb tutorial

emacs_largeth.png

Prepare your source

Compile your code with debugging symbols as described here.

Install gdb and emacs

Moblin/Fedora
# yum install gdb emacs
Ubuntu
# apt-get install gdb emacs

Load source and start gdb

Open a source file in emacs. Start gdb. Use standard gdb commands to walk through the code.

# open a file in emacs
C-x f <file>

# start gdb in emacs
M-x gdb