Commit ecd183a3 authored by hjk's avatar hjk Committed by hjk

debugger: fix std::map dumper for gcc 4.6

Change-Id: If81c38ad07c7e0fa40554295e6a0077c54565ba3
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 1bc2a721
......@@ -1795,16 +1795,19 @@ def qdump__std__map(d, value):
if d.isExpanded():
keyType = templateArgument(value.type, 0)
valueType = templateArgument(value.type, 1)
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
# pairType = templateArgument(templateArgument(value.type, 3), 0)
# So use this as workaround:
pairType = templateArgument(impl.type, 1)
try:
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
pairType = templateArgument(templateArgument(value.type, 3), 0)
pairPointer = pairType.pointer()
except:
# So use this as workaround:
pairType = templateArgument(impl.type, 1)
pairPointer = pairType.pointer()
isCompact = mapCompact(d.currentItemFormat(), keyType, valueType)
innerType = pairType
if isCompact:
innerType = valueType
pairPointer = pairType.pointer()
node = impl["_M_header"]["_M_left"]
childType = innerType
if size == 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment