Commit 85b39966 authored by hjk's avatar hjk
Browse files

debugger: combine memory blocks more aggressively

parent 8510d887
......@@ -175,8 +175,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) {
......@@ -185,8 +185,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;
}
}
......@@ -1430,6 +1430,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