forked from qt-creator/qt-creator
Debugger[New CDB]: Show pointer values in simple dumpers.
This commit is contained in:
@@ -1585,13 +1585,6 @@ static bool dumpQVariant(const SymbolGroupValue &v, std::wostream &str, void **s
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline std::wstring msgContainerSize(int s)
|
|
||||||
{
|
|
||||||
std::wostringstream str;
|
|
||||||
str << L'<' << s << L" items>";
|
|
||||||
return str.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dump builtin simple types using SymbolGroupValue expressions.
|
// Dump builtin simple types using SymbolGroupValue expressions.
|
||||||
unsigned dumpSimpleType(SymbolGroupNode *n, const SymbolGroupValueContext &ctx,
|
unsigned dumpSimpleType(SymbolGroupNode *n, const SymbolGroupValueContext &ctx,
|
||||||
std::wstring *s, int *knownTypeIn /* = 0 */,
|
std::wstring *s, int *knownTypeIn /* = 0 */,
|
||||||
@@ -1616,7 +1609,14 @@ unsigned dumpSimpleType(SymbolGroupNode *n, const SymbolGroupValueContext &ctx,
|
|||||||
return SymbolGroupNode::SimpleDumperNotApplicable;
|
return SymbolGroupNode::SimpleDumperNotApplicable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::wostringstream str;
|
||||||
|
|
||||||
|
// Prefix by pointer value
|
||||||
const SymbolGroupValue v(n, ctx);
|
const SymbolGroupValue v(n, ctx);
|
||||||
|
if (SymbolGroupValue::isPointerType(v.type()))
|
||||||
|
if (const ULONG64 pointerValue = v.pointerValue())
|
||||||
|
str << std::showbase << std::hex << pointerValue << std::dec << std::noshowbase << ' ';
|
||||||
|
|
||||||
// Simple dump of size for containers
|
// Simple dump of size for containers
|
||||||
if (kt & KT_ContainerType) {
|
if (kt & KT_ContainerType) {
|
||||||
const int size = containerSize(kt, v);
|
const int size = containerSize(kt, v);
|
||||||
@@ -1625,12 +1625,12 @@ unsigned dumpSimpleType(SymbolGroupNode *n, const SymbolGroupValueContext &ctx,
|
|||||||
if (containerSizeIn)
|
if (containerSizeIn)
|
||||||
*containerSizeIn = size;
|
*containerSizeIn = size;
|
||||||
if (size >= 0) {
|
if (size >= 0) {
|
||||||
*s = msgContainerSize(size);
|
str << L'<' << size << L" items>";
|
||||||
|
*s = str.str();
|
||||||
return SymbolGroupNode::SimpleDumperOk;
|
return SymbolGroupNode::SimpleDumperOk;
|
||||||
}
|
}
|
||||||
return SymbolGroupNode::SimpleDumperFailed;
|
return SymbolGroupNode::SimpleDumperFailed;
|
||||||
}
|
}
|
||||||
std::wostringstream str;
|
|
||||||
unsigned rc = SymbolGroupNode::SimpleDumperNotApplicable;
|
unsigned rc = SymbolGroupNode::SimpleDumperNotApplicable;
|
||||||
switch (kt) {
|
switch (kt) {
|
||||||
case KT_QChar:
|
case KT_QChar:
|
||||||
|
|||||||
Reference in New Issue
Block a user