Difference between revisions of "C"

From WikEmacs
Jump to: navigation, search
m (Browsing code)
m (Debugging)
Line 14: Line 14:
 
* Run {{Command|gdb}} to start a new gdb session
 
* Run {{Command|gdb}} to start a new gdb session
 
* Specify gdb parameters for your project.
 
* Specify gdb parameters for your project.
* A new buffer "<code>*gud-xxx*</code>" for the gdb session is created.
+
* A new buffer {{Buffer|*gud-xxx*}} for the gdb session is created.
  
  
 
[[Category:Programming languages]]
 
[[Category:Programming languages]]

Revision as of 11:19, 28 March 2012

C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories. It is one of the most widely used programming languages of all time. See Wikipedia article.

The default major mode associated with C files (.c and .h) is cc-mode.

Browsing code

Cscope is the de-facto tool for browsing C code. The package is bundled with xscope mode which enables use of cscope from within Emacs.

Debugging

gdb -- the GNU Project Debugger -- can be embedded in Emacs.

While browsing your project's code:

  • Run M-x gdb to start a new gdb session
  • Specify gdb parameters for your project.
  • A new buffer "*gud-xxx*" for the gdb session is created.