Commit 7bfa174b authored by David Schulz's avatar David Schulz
Browse files

CdbExt: Fix dumping of QByteArray inside QPrivate class.



Change-Id: I9e9b7af1cc2c910b6c5865a611963b371248f90e
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 14d23dd2
......@@ -1789,12 +1789,25 @@ static bool dumpQByteArrayFromQPrivateClass(const SymbolGroupValue &v,
const ULONG64 byteArrayAddress = addressOfQPrivateMember(v, mode, additionalOffset);
if (!byteArrayAddress)
return false;
const std::string dumpType = QtInfo::get(v.context()).prependQtCoreModule("QByteArray");
const std::string symbolName = SymbolGroupValue::pointedToSymbolName(byteArrayAddress , dumpType);
std::string dumpType = QtInfo::get(v.context()).prependQtCoreModule("QByteArray");
std::string symbolName = SymbolGroupValue::pointedToSymbolName(byteArrayAddress , dumpType);
if (SymbolGroupValue::verbose > 1)
DebugPrint() << "dumpQByteArrayFromQPrivateClass of " << v.name() << '/'
<< v.type() << " mode=" << mode
<< " offset=" << additionalOffset << " address=0x" << std::hex << byteArrayAddress
<< std::dec << " expr=" << symbolName;
SymbolGroupNode *byteArrayNode =
v.node()->symbolGroup()->addSymbol(v.module(), symbolName, std::string(), &errorMessage);
if (!byteArrayNode)
return false;
if (!byteArrayNode && errorMessage.find("DEBUG_ANY_ID") != std::string::npos) {
// HACK:
// In some rare cases the AddSymbol can't create a node with a given module name,
// but is able to add the symbol without any modulename.
dumpType = QtInfo::get(v.context()).prependModuleAndNameSpace("QByteArray", "", QtInfo::get(v.context()).nameSpace);
symbolName = SymbolGroupValue::pointedToSymbolName(byteArrayAddress , dumpType);
byteArrayNode = v.node()->symbolGroup()->addSymbol(v.module(), symbolName, std::string(), &errorMessage);
if (!byteArrayNode)
return false;
}
return dumpQByteArray(SymbolGroupValue(byteArrayNode, v.context()), str);
}
......
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