Results 1 to 8 of 8

Thread: IDE/debugger that can handle STL containers...

  1. #1
    Join Date
    Oct 2005
    Beans
    24
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Question IDE/debugger that can handle STL containers...

    Is there an IDE or debugger that handles C++ STL containers in a sane manner? I've tried the following:

    KDevelop
    Eclipse
    Netbeans
    DDD
    Kdbg
    Insight
    Nemiver
    Code::Blocks

    ...but they all give me the same _M_impl (std::vector) or _M_dataplus (std::string) nonsense.

  2. #2
    Join Date
    Apr 2007
    Beans
    14,781

    Re: IDE/debugger that can handle STL containers...

    What debugger's have you used? As far as I can tell, you used the same on in all those IDE's.

  3. #3
    Join Date
    Oct 2005
    Beans
    24
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: IDE/debugger that can handle STL containers...

    Quote Originally Posted by LaRoza View Post
    What debuggers have you used? As far as I can tell, you used the same one in all those IDE's.
    Good point. That should probably read 'GDB frontends' instead of 'IDEs or debuggers'

  4. #4
    Join Date
    Oct 2005
    Beans
    24
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: IDE/debugger that can handle STL containers...

    Looks like Xcode can sorta do it, at least for std::strings and simple std::vectors. Stumbles on vector< vector<string> > though. Also kinda a non-starter for Ubuntu.

    So it's at least possible for a GDB frontend to do the right thing.
    Last edited by GenPFault; September 3rd, 2008 at 01:05 AM. Reason: Addendum

  5. #5
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: IDE/debugger that can handle STL containers...

    ...but they all give me the same _M_impl (std::vector) or _M_dataplus (std::string) nonsense.
    Note that that's not nonsense - It's the internal structure of the STL libraries.

    If you are fed-up with jumping into all these nested functions again and again, you might try this script which you apply to your executable in the last step of building it. It will kill most of the debug symbols of these containers to allow debugging in a sane manner - But then the calls to STL libraries are simply not taken into account, which may or may not be what you want.

  6. #6
    Join Date
    Oct 2005
    Beans
    24
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: IDE/debugger that can handle STL containers...

    Quote Originally Posted by Zugzwang View Post
    Note that that's not nonsense - It's the internal structure of the STL libraries.

    If you are fed-up with jumping into all these nested functions again and again, you might try this script which you apply to your executable in the last step of building it. It will kill most of the debug symbols of these containers to allow debugging in a sane manner - But then the calls to STL libraries are simply not taken into account, which may or may not be what you want.
    I'll have to keep that in mind when it comes up; no progress on the structured display problem though

  7. #7
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: IDE/debugger that can handle STL containers...

    Quote Originally Posted by GenPFault View Post
    I'll have to keep that in mind when it comes up; no progress on the structured display problem though
    Ok, so this is what I've found. If you are using "GDB" or the more user-friendly "DDD", then you *can* at least look into the containers. But I doubt that it will work if you use my trick. More details are written here.

  8. #8
    Join Date
    Jul 2007
    Beans
    4

    Re: IDE/debugger that can handle STL containers...

    This is kind of an old thread but Google still returns this page so I would like to add that,

    Qt Creator supports such kind of debugging. Just try it. It lists only the members and not _M_impl and other nonsense.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •