After each simulator break, T32Tracer retrieves the latest (16) trace records from the T32. Memory address and value can now be evaluated easily from the trace record. TODO:Nevertheless we still have to traverse the trace to find the instruction causing the access.
26 lines
514 B
C++
26 lines
514 B
C++
|
|
#include "T32TraceFormat.hpp"
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
namespace fail {
|
|
|
|
std::ostream& operator <<(std::ostream & os, const fail::T32TraceRecord & r) {
|
|
#ifndef __puma
|
|
if(r.isDataWrite()){
|
|
os << "WRITE";
|
|
} else if (r.isDataRead()) {
|
|
os << "READ";
|
|
} else if( r.isProgram()) {
|
|
os << "PROGRAM";
|
|
} else {
|
|
os << "UNKNOWN";
|
|
}
|
|
os << "\t" << hex << (int)(r.getAddress()) << "\t" << r.getData() << "\t";
|
|
#endif
|
|
return os;
|
|
}
|
|
|
|
}; // end of namespace
|