With the help of STL extension, this extension can’t visualize each and every containers or classes in STL, rather it displays the mostly used string, wstring, vector<[w]string>, list<[w]string>
for more information give !stl -? in WinDBG input or check in the help file.
See the example below and the output in the debugger console.
// SampleSTL.cpp : Defines the entry point for the console application. // Compiled with Microsoft Visual C++ 9.0 compiler #include "stdafx.h" #include#include #include #include
using namespace std; int _tmain(int argc, _TCHAR* argv[]) { string str1("Quick"); string str2("Brown" ); string str3 = str1 + " " + str2; vector vec; vec.push_back(str1); vec.push_back(str2); vec.push_back(str3); list lst; lst.push_back( str1 ); lst.push_back( str2 ); lst.push_back( str3 ); for( vector ::iterator iter = vec.begin(); iter != vec.end(); ++iter) cout << (*iter).c_str() << endl; cout < ::iterator iter = lst.begin(); iter != lst.end(); ++iter) cout << (*iter).c_str() << endl; return 0; }
WinDGB output
0:000> !stl str1 [da 0x16fb18] 0016fb18 "Quick" 0:000> !stl str2 [da 0x16faf0] 0016faf0 "Brown" 0:000> !stl str3 [da 0x16fac8] 0016fac8 "Quick Brown" 0:000> !stl vec Element 0 [da 0x558358] 00558358 "Quick" Element 1 [da 0x558378] 00558378 "Brown" Element 2 [da 0x558398] 00558398 "Quick Brown" 0:000> !stl lst The list has 00000003 elements Element 0 [da 0x558400] 00558400 "Brown" Element 1 [da 0x558468] 00558468 "Quick Brown" Element 2 [da 0xffffffffcdcdcdcd] cdcdcdcd "????????????????????????????????" cdcdcded "????????????????????????????????" cdcdce0d "????????????????????????????????" cdcdce2d "????????????????????????????????" cdcdce4d "????????????????????????????????" cdcdce6d "????????????????????????????????" cdcdce8d "????????????????????????????????" cdcdcead "????????????????????????????????" cdcdcecd "????????????????????????????????" cdcdceed "????????????????????????????????" cdcdcf0d "????????????????????????????????" cdcdcf2d "????????????????????????????????"