Commit 48f16164 authored by David Schulz's avatar David Schulz
Browse files

Debugger cdb: Fix dump of unsigned __int64 for cdb 6.11



The local variable output of unsigned __int64 differ between 6.11
and 6.2

6.11: 0x222`23456789
6.2:  0x00000222`23456789

So we must iterate over the value to find and remove the 64bit separator
(`) instead of just expect it at the 10th character.

Change-Id: I8017c83707b29fa0a510bf621e57e9da6895b63a
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 85a1e3ca
......@@ -842,8 +842,9 @@ static void fixValue(const std::string &type, std::wstring *value)
const bool isHexNumber = value->size() > 3 && value->compare(0, 2, L"0x") == 0 && isHexDigit(value->at(2));
if (isHexNumber) {
// Remove dumb 64bit separator
if (value->size() > 10 && value->at(10) == L'`')
value->erase(10, 1);
const size_t separator = value->find(L'`');
if (separator != std::wstring::npos)
value->erase(separator, 1);
const std::string::size_type firstNonNullDigit = value->find_first_not_of(L"0", 2);
// No on-null digits: plain null ptr.
if (firstNonNullDigit == std::string::npos || value->at(firstNonNullDigit) == ' ') {
......
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