summaryrefslogtreecommitdiff
path: root/src/arch/arm/nativetrace.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-27 00:54:09 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-27 00:54:09 -0700
commit8ec235c7b189c3ae1bf13358774add595710cfd6 (patch)
tree99aa3e3421d29c28b060ce81457b7a1ddc01762c /src/arch/arm/nativetrace.cc
parent1ad4de252852941fdde1838f007daeb34d1885c3 (diff)
downloadgem5-8ec235c7b189c3ae1bf13358774add595710cfd6.tar.xz
ARM: Make native trace print out what instruction caused an error.
Diffstat (limited to 'src/arch/arm/nativetrace.cc')
-rw-r--r--src/arch/arm/nativetrace.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/arm/nativetrace.cc b/src/arch/arm/nativetrace.cc
index 2dd0b8575..7301653f4 100644
--- a/src/arch/arm/nativetrace.cc
+++ b/src/arch/arm/nativetrace.cc
@@ -86,6 +86,7 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record)
nState.update(this);
mState.update(record->getThread());
+ bool errorFound = false;
// Regular int regs
for (int i = 0; i < STATE_NUMVALS; i++) {
if (nState.changed[i] || mState.changed[i]) {
@@ -104,6 +105,7 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record)
vergence, regNames[i],
nState.newState[i],
mState.oldState[i], mState.newState[i]);
+ errorFound = true;
} else if (!mState.changed[i]) {
DPRINTF(ExecRegDelta, "%s [%5s] "\
"Native: %#010x => %#010x "\
@@ -111,6 +113,7 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record)
vergence, regNames[i],
nState.oldState[i], nState.newState[i],
mState.newState[i]);
+ errorFound = true;
} else if (mState.oldState[i] != nState.oldState[i] ||
mState.newState[i] != nState.newState[i]) {
DPRINTF(ExecRegDelta, "%s [%5s] "\
@@ -119,9 +122,21 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record)
vergence, regNames[i],
nState.oldState[i], nState.newState[i],
mState.oldState[i], mState.newState[i]);
+ errorFound = true;
}
}
}
+ if (errorFound) {
+ StaticInstPtr inst = record->getStaticInst();
+ assert(inst);
+ bool ran = true;
+ if (inst->isMicroop()) {
+ ran = false;
+ inst = record->getMacroStaticInst();
+ }
+ assert(inst);
+ record->traceInst(inst, ran);
+ }
}
} /* namespace Trace */