diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-19 10:35:12 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-19 10:35:12 -0400 |
commit | 586a219d11e988d392efe7c34d27bd00d1dedf43 (patch) | |
tree | e166a25c83451d1f090b9384579b52a4837a2285 /src/base/cp_annotate.cc | |
parent | efd5cf323ab9ba91487d975899f13353d3258e83 (diff) | |
download | gem5-586a219d11e988d392efe7c34d27bd00d1dedf43.tar.xz |
base: Ensure the CP annotation compiles again
A bit of revamping to get the CP annotate functionality to compile.
Diffstat (limited to 'src/base/cp_annotate.cc')
-rw-r--r-- | src/base/cp_annotate.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc index 118c6bf36..858ee0cb8 100644 --- a/src/base/cp_annotate.cc +++ b/src/base/cp_annotate.cc @@ -28,7 +28,7 @@ * Authors: Ali Saidi */ -#include "arch/alpha/linux/threadinfo.hh" +#include "arch/generic/linux/threadinfo.hh" #include "arch/utility.hh" #include "base/loader/object_file.hh" #include "base/callback.hh" @@ -37,6 +37,8 @@ #include "base/trace.hh" #include "config/the_isa.hh" #include "cpu/thread_context.hh" +#include "debug/Annotate.hh" +#include "debug/AnnotateVerbose.hh" #include "sim/arguments.hh" #include "sim/core.hh" #include "sim/sim_exit.hh" @@ -142,6 +144,17 @@ CPA::startup() registerExitCallback(new AnnotateDumpCallback(this)); } + +uint64_t +CPA::getFrame(ThreadContext *tc) +{ + // This code is ISA specific and will need to be changed + // if the annotation code is used for something other than Alpha + return (tc->readMiscRegNoEffect(TheISA::IPR_PALtemp23) & + ~ULL(0x3FFF)); + +} + void CPA::swSmBegin(ThreadContext *tc) { @@ -328,12 +341,9 @@ CPA::swAutoBegin(ThreadContext *tc, Addr next_pc) string sym; Addr sym_addr = 0; - SymbolTable *symtab = NULL; - if (!TheISA::inUserMode(tc)) { debugSymbolTable->findNearestSymbol(next_pc, sym, sym_addr); - symtab = debugSymbolTable; } else { Linux::ThreadInfo ti(tc); string app = ti.curTaskName(); @@ -1285,7 +1295,7 @@ CPA::unserialize(Checkpoint *cp, const std::string §ion) paramIn(cp, section, csprintf("nameCache%d.str", x), str); paramIn(cp, section, csprintf("nameCache%d.int", x), sysi); - nameCache[sys] = std::make_pair<std::string,int>(str, sysi); + nameCache[sys] = std::make_pair(str, sysi); } //smStack (SmStack) |