Commit 0bac4d86 authored by David Schulz's avatar David Schulz

cdbext: Fix dump of QString from QPrivate class

Change-Id: Id7f1242405acebd8db37369ad3c4fa2442cb80a8
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent b0226e6e
......@@ -1752,8 +1752,8 @@ static bool dumpQStringFromQPrivateClass(const SymbolGroupValue &v,
const ULONG64 stringAddress = addressOfQPrivateMember(v, mode, additionalOffset);
if (!stringAddress)
return false;
const std::string dumpType = QtInfo::get(v.context()).prependQtCoreModule("QString");
const std::string symbolName = SymbolGroupValue::pointedToSymbolName(stringAddress , dumpType);
std::string dumpType = QtInfo::get(v.context()).prependQtCoreModule("QString");
std::string symbolName = SymbolGroupValue::pointedToSymbolName(stringAddress , dumpType);
if (SymbolGroupValue::verbose > 1)
DebugPrint() << "dumpQStringFromQPrivateClass of " << v.name() << '/'
<< v.type() << " mode=" << mode
......@@ -1761,8 +1761,16 @@ static bool dumpQStringFromQPrivateClass(const SymbolGroupValue &v,
<< std::dec << " expr=" << symbolName;
SymbolGroupNode *stringNode =
v.node()->symbolGroup()->addSymbol(v.module(), symbolName, std::string(), &errorMessage);
if (!stringNode)
return false;
if (!stringNode && errorMessage.find("DEBUG_ANY_ID") != std::string::npos) {
// HACK:
// In some rare cases the 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("QString", "", QtInfo::get(v.context()).nameSpace);
symbolName = SymbolGroupValue::pointedToSymbolName(stringAddress , dumpType);
stringNode = v.node()->symbolGroup()->addSymbol(v.module(), symbolName, std::string(), &errorMessage);
if (!stringNode)
return false;
}
return dumpQString(SymbolGroupValue(stringNode, 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