diff options
Diffstat (limited to 'cpu/exetrace.cc')
-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..0dd1d74d6 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->findNearestSymbol(PC, str)) + outs << "@" << setw(17) << str << " : "; + else + outs << "0x" << hex << PC << " : "; // // Print decoded instruction |