debugger: fix gcc 4.4's std::map display

Was mentioned at

http://www.qtcentre.org/threads/41700-How-to-watch-STL-containers-iterators-during-debugging.

gcc 4.4 does not encode the allocator type properly so it can't be used
to extract the 'pair type' in the dumper.

Change-Id: I2cb09ce59865a87dc954fce433aef4826111a95a
Reviewed-on: http://codereview.qt.nokia.com/632
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-06-22 17:49:33 +02:00
committed by hjk
parent 179921529a
commit ff94d06ae3

View File

@@ -1799,7 +1799,11 @@ def qdump__std__map(d, item):
if d.isExpanded(item):
keyType = templateArgument(item.value.type, 0)
valueType = templateArgument(item.value.type, 1)
pairType = templateArgument(templateArgument(item.value.type, 3), 0)
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
# pairType = templateArgument(templateArgument(item.value.type, 3), 0)
# So use this as workaround:
pairType = templateArgument(impl.type, 1)
isSimpleKey = isSimpleType(keyType)
isSimpleValue = isSimpleType(valueType)
innerType = pairType