diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2010-06-02 12:58:13 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2010-06-02 12:58:13 -0500 |
commit | 5e6d28996ae80f2bd3afeadbb3454a9d1958e3a2 (patch) | |
tree | 8bf8082c864205dbd4b5f997161c42d1423bd413 /src/cpu | |
parent | aec73ba6af62c8da66fb40e015671541708c1723 (diff) | |
download | gem5-5e6d28996ae80f2bd3afeadbb3454a9d1958e3a2.tar.xz |
ARM: Move PC mode bits around so they can be used for exectrace
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/exetrace.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc index 07be700bb..28c7861ef 100644 --- a/src/cpu/exetrace.cc +++ b/src/cpu/exetrace.cc @@ -33,6 +33,7 @@ #include <iomanip> +#include "arch/isa_traits.hh" #include "base/loader/symtab.hh" #include "cpu/base.hh" #include "cpu/exetrace.hh" @@ -70,18 +71,22 @@ Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran) std::string sym_str; Addr sym_addr; + Addr cur_pc = PC; +#if THE_ISA == ARM_ISA + cur_pc &= ~PcModeMask; +#endif if (debugSymbolTable && IsOn(ExecSymbol) #if FULL_SYSTEM && !inUserMode(thread) #endif - && debugSymbolTable->findNearestSymbol(PC, sym_str, sym_addr)) { - if (PC != sym_addr) - sym_str += csprintf("+%d", PC - sym_addr); + && debugSymbolTable->findNearestSymbol(cur_pc, sym_str, sym_addr)) { + if (cur_pc != sym_addr) + sym_str += csprintf("+%d",cur_pc - sym_addr); outs << "@" << sym_str; } else { - outs << "0x" << hex << PC; + outs << "0x" << hex << cur_pc; } if (inst->isMicroop()) { @@ -97,7 +102,7 @@ Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran) // outs << setw(26) << left; - outs << inst->disassemble(PC, debugSymbolTable); + outs << inst->disassemble(cur_pc, debugSymbolTable); if (ran) { outs << " : "; |