Commit 81977e2d authored by hjk's avatar hjk Committed by con
Browse files

debugger: combine memory blocks more aggressively

(cherry picked from commit 85b39966)
parent 6fc1bfb2
......@@ -166,8 +166,8 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba)
data.append(ba);
const MemoryRange res(it.key().from, range.to);
memory.remove(it.key());
memory.insert(res, data);
MEMORY_DEBUG(" TO(1) " << res);
insertMemory(res, data);
return;
}
if (it.key().from == range.to) {
......@@ -176,8 +176,8 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba)
data.append(*it);
const MemoryRange res(range.from, it.key().to);
memory.remove(it.key());
memory.insert(res, data);
MEMORY_DEBUG(" TO(2) " << res);
insertMemory(res, data);
return;
}
}
......@@ -1330,6 +1330,16 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered)
}
// Happens when chunks are not comnbined
QTC_ASSERT(false, /**/);
debugMessage("CHUNKS NOT COMBINED");
#ifdef MEMORY_DEBUG
qDebug() << "CHUNKS NOT COMBINED";
it = m_snapshot.memory.begin();
et = m_snapshot.memory.end();
for ( ; it != et; ++it)
qDebug() << it.key().from << it.key().to;
qDebug() << "WANTED" << wanted.from << wanted.to;
#endif
sendGdbServerMessage("E22", "");
return;
}
......
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