summaryrefslogtreecommitdiff
path: root/src/arch/arm/nativetrace.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-29 00:17:11 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-29 00:17:11 -0700
commit1e04b6281d864c1b1cbf819cb17595d90d20adbe (patch)
tree85109ab7f617c6e057ee00a1ab4689f607930c6d /src/arch/arm/nativetrace.cc
parent2871a13ab31aaabea93f1d55595e199ea76e9dcf (diff)
downloadgem5-1e04b6281d864c1b1cbf819cb17595d90d20adbe.tar.xz
ARM: Make the ARM native tracer stop M5 if control diverges.
If the control flow of M5's executable and statetrace's target process get out of sync even a little, there will be a LOT of output, very little of which will be useful. There's also almost no hope for recovery. In those cases, we might as well give up and not generate a huge, mostly worthless trace file.
Diffstat (limited to 'src/arch/arm/nativetrace.cc')
-rw-r--r--src/arch/arm/nativetrace.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/arm/nativetrace.cc b/src/arch/arm/nativetrace.cc
index 90c5e5c25..1ad9e1a19 100644
--- a/src/arch/arm/nativetrace.cc
+++ b/src/arch/arm/nativetrace.cc
@@ -162,6 +162,11 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record)
}
assert(inst);
record->traceInst(inst, ran);
+
+ bool pcError = (mState.newState[STATE_PC] !=
+ nState.newState[STATE_PC]);
+ if (stopOnPCError && pcError)
+ panic("Native trace detected an error in control flow!");
}
}