diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-07-29 00:17:11 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-07-29 00:17:11 -0700 |
commit | 1e04b6281d864c1b1cbf819cb17595d90d20adbe (patch) | |
tree | 85109ab7f617c6e057ee00a1ab4689f607930c6d /src/arch/arm/nativetrace.hh | |
parent | 2871a13ab31aaabea93f1d55595e199ea76e9dcf (diff) | |
download | gem5-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.hh')
-rw-r--r-- | src/arch/arm/nativetrace.hh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/arch/arm/nativetrace.hh b/src/arch/arm/nativetrace.hh index d39bdcfa8..7467e3378 100644 --- a/src/arch/arm/nativetrace.hh +++ b/src/arch/arm/nativetrace.hh @@ -33,6 +33,7 @@ #include "base/types.hh" #include "cpu/nativetrace.hh" +#include "params/ArmNativeTrace.hh" namespace Trace { @@ -88,8 +89,19 @@ class ArmNativeTrace : public NativeTrace ThreadState nState, mState; + bool stopOnPCError; + public: - ArmNativeTrace(const Params *p) : NativeTrace(p) + typedef ArmNativeTraceParams Params; + + const Params * + params() const + { + return dynamic_cast<const Params *>(_params); + } + + ArmNativeTrace(const Params *p) : + NativeTrace(p), stopOnPCError(p->stop_on_pc_error) {} void check(NativeTraceRecord *record); |