diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2004-01-12 19:59:02 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2004-01-12 19:59:02 -0500 |
commit | a44248aab04a3b48864308a478ad676def175158 (patch) | |
tree | cfb15bdf2876bb4d0bef32c129b757c46fc1018a /cpu | |
parent | 60a1b35e4db6dc7ebf189a6aca4549d85480d5ce (diff) | |
download | gem5-a44248aab04a3b48864308a478ad676def175158.tar.xz |
Added code to print out the symbol if one exists for an address
cpu/exetrace.cc:
added code to print out symbol if one is found for address
kern/linux/linux_system.cc:
added code to set the debugSymbolTable to the kernel symbol table
--HG--
extra : convert_revision : 191d7608d04fa42baef5e618c0bbbf5ad4001031
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/exetrace.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpu/exetrace.cc b/cpu/exetrace.cc index 3e8877e93..a72242232 100644 --- a/cpu/exetrace.cc +++ b/cpu/exetrace.cc @@ -48,11 +48,12 @@ using namespace std; // -const SymbolTable *debugSymbolTable = NULL; +SymbolTable *debugSymbolTable = NULL; void Trace::InstRecord::dump(ostream &outs) { + if (flags[PRINT_CYCLE]) ccprintf(outs, "%7d: ", cycle); @@ -64,7 +65,12 @@ Trace::InstRecord::dump(ostream &outs) if (flags[PRINT_THREAD_NUM]) outs << "T" << thread << " : "; - outs << "0x" << hex << PC << " : "; + + std::string str; + if(debugSymbolTable->findSymbol(data.as_int, str)) + outs << "@" << setw(17) << str << " : "; + else + outs << "0x" << hex << PC << " : "; // // Print decoded instruction |