From b5abaa27df4c8ebd08eeaab063e3c63f29ae9ca3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 2 Aug 2012 13:32:37 +0200 Subject: CDB: Fix STL debugger helpers for MSVC2012 beta. In MSVC2012, more bases classes for std::string and containers were introduced whereas std::pair_base was removed compared to MSVC2010. Add a findMember() function to be able to skip base classes when looking for a certain member to finally fix this issue. Introduce SymbolGroupValue::parent()/childCount() and simplify the helpers using it. Change-Id: I7a6aad5c07739ca9cbf350489acd6d03bd1865e8 Reviewed-by: hjk --- src/libs/qtcreatorcdbext/symbolgroupvalue.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libs/qtcreatorcdbext/symbolgroupvalue.h') diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.h b/src/libs/qtcreatorcdbext/symbolgroupvalue.h index 128887d179..0de08217f4 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.h +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.h @@ -68,11 +68,17 @@ public: // Access children by name or index (0-based) SymbolGroupValue operator[](const char *name) const; SymbolGroupValue operator[](unsigned) const; + unsigned childCount() const; + SymbolGroupValue parent() const; // take address and cast to desired (pointer) type SymbolGroupValue typeCast(const char *type) const; // take pointer value and cast to desired (pointer) type SymbolGroupValue pointerTypeCast(const char *type) const; - + // Find a member variable traversing the list of base classes. This useful + // for skipping template base classes of STL containers whose number varies + // by MSVC version. + static SymbolGroupValue findMember(const SymbolGroupValue &start, + const std::string &symbolName); std::string name() const; std::string type() const; std::vector innerTypes() const { return innerTypesOf(type()); } -- cgit v1.2.1