Commit 4b74fc43 authored by David Schulz's avatar David Schulz

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: default avatarhjk <hjk@qt.io>
parent c87d0d7b
......@@ -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);
......
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