4

Currently I am using gcc-4.3.6 and Eclipse IDE for c++ development. I want to debug my project in Eclipse with gdb. I am having a hard time debugging code when it contains STL containers. Also I am not using STL directly, I have wrappers for each container.

I know we have to use pretty printing for looking into STL containers, but it is not working in Eclipse. I have worked in Visual Studio in the past. I migrated to gcc and Eclipse because compilation time in VS is too much wrt gcc. However, the debugger in VS is very good. I don't know much about gcc and Eclipse. I just want to know if there is a similar debugger in linux or unix.

daisy
  • 53,527
  • 78
  • 236
  • 383
  • Think about asking this on [stackoverflow](http://stackoverflow.com/) – slybloty Jul 06 '12 at 13:39
  • This is technically on-topic here, since it's asking about a \*nix tool; if you want it moved to SO, flag it – Michael Mrozek Jul 06 '12 at 13:54
  • 3
    I had to say, Microsoft's VS and compiler product is most advanced in the world, I don't see a single product in opensource world competitive with that. – daisy Sep 05 '12 at 01:03

2 Answers2

3

the debugging features provided by gdb are based on the set of symbols that comes with your compiled code.

Actually there isn't a debug version available for the STL, but there are at least 2 portings that can add debug symbols to your code:

http://www.stlport.org/

http://code.google.com/p/stl-debug/

gdb without debugging symbols is useless, so you have to use a "debug version" for each library that you are using in your code if you want to test your code.

user827992
  • 376
  • 1
  • 2
  • 8
0

You might want to try KDevelop's or QtCreator's debugger. They interact with gdb's latest python support and support browsing thought STL containers as well as Qt's.

(Disclaimer: i haven't tried them much, gdb's support for remote debugging sucks too much for that)

BatchyX
  • 3,033
  • 24
  • 13