//
-const SymbolTable *debugSymbolTable = NULL;
+SymbolTable *debugSymbolTable = NULL;
void
Trace::InstRecord::dump(ostream &outs)
{
+
if (flags[PRINT_CYCLE])
ccprintf(outs, "%7d: ", cycle);
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
#include "targetarch/isa_traits.hh"
#include "targetarch/vtophys.hh"
+extern SymbolTable *debugSymbolTable;
+
//un-comment this to see the state of call stack when it changes.
//#define SW_DEBUG
if (!kernel->loadGlobalSymbols(kernelSymtab))
panic("could not load kernel symbols\n");
+ debugSymbolTable = kernelSymtab;
if (!console->loadGlobalSymbols(consoleSymtab))
panic("could not load console symbols\n");