diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 2f5aeb2222b..01b087d0343 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -1476,6 +1476,30 @@ class Dumper: value = item.value type = value.type + if type.code == gdb.TYPE_CODE_STRUCT and self.alienSource: + try: + # Check whether it's an array. + arraylen = value["length"] + arrayptr = value["ptr"] + self.putType(type) + self.putAddress(value.address) + if str(type) == "struct char[]": + self.putValue(encodeCharArray(arrayptr, 100, arraylen), + Hex2EncodedLatin1) + self.putNumChild(0) + else: + self.putNumChild(arraylen) + self.putItemCount(arraylen) + if self.isExpanded(item): + with Children(self): + for i in range(arraylen): + v = arrayptr.dereference() + self.putSubItem(Item(v, item.iname)) + arrayptr += 1 + return + except: + pass + if type.code == gdb.TYPE_CODE_INT: if self.alienSource and str(type) == "unsigned long long": strlen = value % (1L<<32)