Windbg fans claim that it is quite powerful and I tend to agree. But when it comes to debugging STL containers, I am always stuck. If the variable is on the stack, the !stl
extension sometimes figures it out, but when a container with a complex type (e.g. std::vector<TemplateField, std::allocator<TemplateField> >
) is on the heap or part of some other structure, I just don't know how to view its contents.
Appreciate any tips, pointers.
I often find debugger support for STL data types inadequate. For this reason I'm increasingly using logging frameworks and logging statements. I used to think that these are for people who can't use a debugger, but I now realize that they offer real value. They allow you to embed portable debugging knowledge in your code and maintain it together with the code. In contrast, work you do in the debugger is typically ephemeral.
You might also want to give this debugger extension a try. It is a library called SDbgExt, developed by Skywing.
Python extension for WinDbg (pykd) have snippet stlp.py which can dump map contents.
Currently it supports STLPort map implementation. Tested on x86 and x64.
This article demonstrates how to use it (its on Russian, but, examples are self-explanatory).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With