Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 110365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:12:56+00:00 2026-05-11T02:12:56+00:00

Debugging with gdb, any c++ code that uses STL/boost is still a nightmare. Anyone

  • 0

Debugging with gdb, any c++ code that uses STL/boost is still a nightmare. Anyone who has used gdb with STL knows this. For example, see sample runs of some debugging sessions in code here.

I am trying to reduce the pain by collecting tips. Can you please comment on the tips I have collected below (particularly which ones you have been using and any changes you would recommend on them) – I have listed the tips is decreasing order of technicality.

  • Is anyone using ‘Stanford GDB STL utils’ and ‘UCF GDB utils’? Is there some such utils for boost data structures? The utils above do not seem to be usable recursively, for example for printing vector of a boost::shared_ptr in a legible manner within one command.
  • Write your .gdbinit file. Include, for example, C++ related beautifiers, listed at the bottom of UCF GDB utils.
  • Use checked/debug STL/Boost library, such as STLport.
  • Use logging (for example as described here)

Update: GDB has a new C++ branch.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:12:56+00:00Added an answer on May 11, 2026 at 2:12 am

    Maybe not the sort of ‘tip’ you were looking for, but I have to say that my experience after a few years of moving from C++ & STL to C++ & boost & STL is that I now spend a lot less time in GDB than I used to. I put this down to a number of things:

    • boost smart pointers (particularly ‘shared pointer’, and the pointer containers when performance is needed). I can’t remember the last time I had to write an explicit delete (delete is the ‘goto’ of C++ IMHO). There goes a lot of GDB time tracking down invalid and leaking pointers.
    • boost is full of proven code for things you’d probably hack together an inferior version of otherwise. e.g boost::bimap is great for the common pattern of LRU caching logic. There goes another heap of GDB time.
    • Adopting unittesting. boost::test‘s AUTO macros mean it’s an absolute doddle to set up test cases (easier than CppUnit). This catches lots of stuff long before it gets built into anything you’d have to attach a debugger to.
    • Related to that, tools like boost::bind make it easier to design-for-test. e.g algorithms can be more generic and less tied up with the types they operate on; this makes plugging them into test shims/proxies/mock objects etc easier (that and the fact that exposure to boost’s template-tasticness will encourage you to ‘dare to template’ things you’d never have considered before, yielding similar testing benefits).
    • boost::array. ‘C array’ performance, with range checking in debug builds.
    • boost is full of great code you can’t help but learn from
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 82k
  • Answers 82k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need: System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("es-ES"); DateTime myDateTime =… May 11, 2026 at 4:35 pm
  • Editorial Team
    Editorial Team added an answer You can use attachMovie with the stage. In AS2 is… May 11, 2026 at 4:35 pm
  • Editorial Team
    Editorial Team added an answer Closures, as the word tends to be used, are just… May 11, 2026 at 4:35 pm

Related Questions

Briefly: Does anyone know of a GUI for gdb that brings it on par
I have a simple wrapper for an Mersenne twister random number generator. The purpose
I am trying to port a project including both SDL and WxWidgets to MacOS
Scenario: There is a complex piece of software that is annoying to launch by

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.