Debugger: Fix empty memory when viewing inaccessible address

Always report back when content for the memory view is requested.

Task-number: QTCREATORBUG-16555
Change-Id: Idc6202a392899c5d524c696ac7342c4ea4487b1e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2016-08-02 13:34:18 +02:00
parent c87d0d7b58
commit 4b74fc4322

View File

@@ -1518,12 +1518,16 @@ void CdbEngine::postFetchMemory(const MemoryViewCookie &cookie)
str << cookie.address << ' ' << cookie.length;
cmd.args = args;
cmd.callback = [this, cookie](const DebuggerResponse &response) {
if (response.resultClass == ResultDone && cookie.agent) {
if (!cookie.agent)
return;
if (response.resultClass == ResultDone) {
const QByteArray data = QByteArray::fromHex(response.data.data().toUtf8());
if (unsigned(data.size()) == cookie.length)
cookie.agent->addLazyData(cookie.editorToken, cookie.address, data);
} else {
showMessage(response.data["msg"].data(), LogWarning);
cookie.agent->addLazyData(cookie.editorToken, cookie.address,
QByteArray (int(cookie.length), char()));
}
};
runCommand(cmd);