forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user