forked from qt-creator/qt-creator
Cdb: Fix QList child dumper
Task-number: QTCREATORBUG-16750 Change-Id: If67e2a55bb0a67957b10069675cdd0df7a18ad10 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -758,14 +758,8 @@ static inline AbstractSymbolGroupNodePtrVector
|
||||
AddressSequence(arrayAddress, pointerSize),
|
||||
v.module(), innerType, count);
|
||||
// Check condition for large||static.
|
||||
bool isLargeOrStatic = innerTypeSize > pointerSize;
|
||||
if (!isLargeOrStatic && !SymbolGroupValue::isPointerType(innerType)) {
|
||||
const KnownType kt = knownType(innerType, false); // inner type, no 'class ' prefix.
|
||||
if (kt != KT_Unknown && !(kt & (KT_POD_Type|KT_Qt_PrimitiveType|KT_Qt_MovableType))
|
||||
&& !(kt == KT_QStringList && QtInfo::get(v.context()).version >= 5)) {
|
||||
isLargeOrStatic = true;
|
||||
}
|
||||
}
|
||||
const bool isLargeOrStatic = innerTypeSize > pointerSize
|
||||
|| !SymbolGroupValue::isMovable(innerType, v);
|
||||
if (SymbolGroupValue::verbose)
|
||||
DebugPrint() << "isLargeOrStatic " << isLargeOrStatic;
|
||||
if (isLargeOrStatic) {
|
||||
@@ -776,7 +770,8 @@ static inline AbstractSymbolGroupNodePtrVector
|
||||
arrayChildList(v.node()->symbolGroup(),
|
||||
AddressArraySequence<ULONG64>(reinterpret_cast<const ULONG64 *>(data)),
|
||||
v.module(), innerType, count) :
|
||||
arrayChildList(v.node()->symbolGroup(), AddressArraySequence<ULONG32>(reinterpret_cast<const ULONG32 *>(data)),
|
||||
arrayChildList(v.node()->symbolGroup(),
|
||||
AddressArraySequence<ULONG32>(reinterpret_cast<const ULONG32 *>(data)),
|
||||
v.module(), innerType, count);
|
||||
delete [] data;
|
||||
return rc;
|
||||
|
@@ -1505,6 +1505,14 @@ void formatKnownTypeFlags(std::ostream &os, KnownType kt)
|
||||
os << " simple_dumper";
|
||||
}
|
||||
|
||||
unsigned SymbolGroupValue::isMovable(const std::string &t, const SymbolGroupValue &v)
|
||||
{
|
||||
KnownType kt = knownType(t, false);
|
||||
if (kt & (KT_POD_Type | KT_Qt_MovableType | KT_Qt_PrimitiveType))
|
||||
return true;
|
||||
return kt == KT_QStringList && QtInfo::get(v.context()).version >= 5;
|
||||
}
|
||||
|
||||
static inline DumpParameterRecodeResult
|
||||
checkCharArrayRecode(const SymbolGroupValue &v)
|
||||
{
|
||||
|
@@ -112,6 +112,7 @@ public:
|
||||
static std::string moduleOfType(const std::string &type);
|
||||
// pointer type, return number of characters to strip
|
||||
static unsigned isPointerType(const std::string &);
|
||||
static unsigned isMovable(const std::string &, const SymbolGroupValue &v);
|
||||
static bool isArrayType(const std::string &);
|
||||
static bool isVTableType(const std::string &t);
|
||||
// add pointer type 'Foo' -> 'Foo *', 'Foo *' -> 'Foo **'
|
||||
|
Reference in New Issue
Block a user