TracingPlugin: cap size of memory access to 8

There are instruction in the real world, that seem to read more than 8 bytes.
Therefore we cap the accesses memory to 8 and don't abort with an assertion.

Change-Id: Ib2bfd0ac6dc0c030cd6a22940e31f8463a3337cf
This commit is contained in:
Christian Dietrich
2014-03-26 14:54:17 +01:00
parent 396e00ce59
commit 0acfe5b2e2

View File

@ -107,7 +107,9 @@ bool TracingPlugin::run()
if (m_full_trace) {
Trace_Event_Extended &ext = *e.mutable_trace_ext();
// Read the accessed data
assert(width <= 8);
if (width > 8) {
width = 8;
}
uint64_t data = 0;
mm.getBytes(addr, width, &data);
ext.set_data(data);