How to use the mingw gdb debugger with Eclipse 3.2 / CDT 3.1



This is my OLD blog. I've copied this post over to my NEW blog at:

http://www.saltycrane.com/blog/2007/02/how-to-use-mingw-gdb-debugger-with/

You should be redirected in 2 seconds.



How to use the mingw gdb debugger with Eclipse 3.2 / CDT 3.1
  1. Go to http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=20507, download gdb-5.2.1-1.exe, and run it to install.
  2. Create a C Project and build it.
  3. From the "Run" menu, select "Debug..."
  4. Click on "C/C++ Local Application", then click the 'New' button (it is a button with a plus sign in the top left corner).
  5. Click the "Search Project..." button and select your executable.
  6. Click on the "Environment" tab, and click "New..."
  7. In the "Name:" field, enter "Path". In the "Value:" field, enter "c:\mingw\bin". Click "OK".
  8. Click the "Debugger" tab. From the "Debugger:" dropdown box, select "gdb Debugger".
  9. Click "Debug". Your gdb debugger session should now begin.
  10. If you get a "Confirm Perspective Switch" dialog, click on "Yes" to switch to the Debug perspective.
  11. You can now use the buttons in your "Debug" window to step through your code.
See also my post, How to setup the MinGW gcc tools for your Managed Make C Project in CDT 3.1 and Eclipse 3.2

Technorati tags:

4 comments:

Unknown said...

Hi there; appreciate that you put this on your blog. By any chance, however, does this same configuration work with Eclipse 3.3 and CDT 4.0.1? I'm getting all kinds of errors.

sofeng said...

Keith,
sorry, i haven't tried this with Eclipse 3.3 / CDT 4.0. i've been using Emacs, so i haven't done too much with Eclipse recently

Anonymous said...

the link to the gdb debugger does not work.

sofeng said...

Anonymous,
Thanks, I fixed the link.

About

This is my *OLD* blog. I've copied all of my posts and comments over to my NEW blog at:

http://www.saltycrane.com/blog/.

Please go there for my updated posts. I will leave this blog up for a short time, but eventually plan to delete it. Thanks for reading.