Commit 41582b19 authored by hjk's avatar hjk
Browse files

Debugger: Work around mis-reading of integral template types

Clang/LLDB toolchain issue: -1 gets recorded and read
as 'int' with value '0xffffffff'.

Change-Id: I070a83c282bc8a46efa011efb73f32cdbf46398c
Reviewed-by: default avatarEike Ziller <>
Reviewed-by: default avatarhjk <>
parent 039c7bed
......@@ -417,8 +417,16 @@ class Dumper(DumperBase):
return self.lookupType(inner)
def numericTemplateArgument(self, typeobj, index):
# There seems no API to extract the numeric value.
inner = self.extractTemplateArgument(typeobj.GetName(), index)
return int(inner)
innerType = typeobj.GetTemplateArgumentType(index)
basicType = innerType.GetBasicType()
value = toInteger(inner)
# Clang writes 'int' and '0xfffffff' into the debug info
# LLDB manages to read a value of 0xfffffff...
if basicType == lldb.eBasicTypeInt and value >= 0x8000000:
value -= 0x100000000
return value
def isReferenceType(self, typeobj):
return typeobj.IsReferenceType()
Supports Markdown
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