STL Support Macros
Dan Marinescu wrote a set of GDB macros to work with GNU libstdc++ (http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html).
The following stl containers are supported:
std::vector<T> -- via pvector command
std::list<T> -- via plist command
std::map<T,T> -- via pmap command
std::multimap<T,T> -- via pmap command
std::set<T> -- via pset command
std::multiset<T> -- via pset command
std::deque<T> -- via pdequeue command
std::stack<T> -- via pstack command
std::queue<T> -- via pqueue command
std::priority_queue<T> -- via ppqueue command
std::bitset<n> -- via pbitset command
- std::string -- via pstring command
- std::widestring -- via pwstring command
There is a nice tutorial at http://www.yolinux.com/TUTORIALS/GDB-Commands.html#STLDEREF
Automatic STL support
GDB does not yet have automatic support for STL types, but we're working on it: