Commit 7c64799a authored by David Schulz's avatar David Schulz

Debugger: Fix QDateTime dumper for pointer values

Change-Id: Idda3a7853e430e937ce6a99c9d4f0ab63403cb07
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent bf210436
......@@ -2413,15 +2413,17 @@ static bool dumpQDateTime(const SymbolGroupValue &v, std::wostream &str, std::st
int status = 0;
int tiVersion = QtInfo::qtTypeInfoVersion(v.context());
if (tiVersion > 10) {
const ULONG64 address =
SymbolGroupValue::isPointerType(v.type()) ? v.pointerValue() : v.address();
const ULONG64 data = SymbolGroupValue::readUnsignedValue(
v.context().dataspaces, v.address(), 8, 0);
v.context().dataspaces, address, 8, 0);
status = data & 0xFF;
ULONG64 timeZone = 0;
if (status & 0x01) {
msecs = data >> 8;
spec = (status & 0x30) >> 4;
} else {
ULONG64 addr = SymbolGroupValue::readPointerValue(v.context().dataspaces, v.address());
ULONG64 addr = SymbolGroupValue::readPointerValue(v.context().dataspaces, address);
msecs = SymbolGroupValue::readSignedValue(v.context().dataspaces, addr, 8, 0);
addr += 8 /*int64*/;
......
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