Reader small image

You're reading from  Mastering Sublime Text

Product typeBook
Published inDec 2013
PublisherPackt
ISBN-139781849698429
Edition1st Edition
Right arrow
Author (1)
Dan Peleg
Dan Peleg
author image
Dan Peleg

Dan Peleg is an accomplished software engineer. As a former developer in the Israeli Intelligence Force, he holds extensive experience in both defense and robotic industries, and has previously lectured at DefCon conventions. Dan has developed unique algorithms for robotic platforms, specializes in a variety of software platforms, and currently works as the CTO for an American startup company.
Read more about Dan Peleg

Right arrow

Debugging C/C++ with GDB


The GNU Project Debugger (GDB) is a debugger built by the open source GNU Project, and it lets us debug the following languages:

  • Ada

  • C

  • C++

  • D

  • Fortran

  • Go

  • Modula-2

  • Objective-C

  • OpenCL C

  • Pascal

GDB comes with most of the Unix distributions that include Linux and OS X. In the latest OS X named Maverick, GDB isn't installed by default and can be installed using brew. For Windows, we will have to download and install Minimalist GNU for Windows (MinGW) from http://sourceforge.net/projects/mingw/files/. This will let us compile C code and use GDB to debug it. Sublime has an awesome plugin called SublimeGDB, which is used for debugging with GDB, and is written by Fredrik Ehnbom (@quarnster).

Using SublimeGDB

We'll start by installing Sublime GDB using the Package Control. Let's open the command palette by pressing Ctrl + Shift + P in Windows or Linux, and Command + Shift + P in OS X. Then choose Install Package and install the SublimeGDB package. After installing, we'll need to configure...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Sublime Text
Published in: Dec 2013Publisher: PacktISBN-13: 9781849698429

Author (1)

author image
Dan Peleg

Dan Peleg is an accomplished software engineer. As a former developer in the Israeli Intelligence Force, he holds extensive experience in both defense and robotic industries, and has previously lectured at DefCon conventions. Dan has developed unique algorithms for robotic platforms, specializes in a variety of software platforms, and currently works as the CTO for an American startup company.
Read more about Dan Peleg