/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2001-2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
//
-const 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 sym_str;
+ Addr sym_addr;
+ if (debugSymbolTable
+ && debugSymbolTable->findNearestSymbol(PC, sym_str, sym_addr)) {
+ if (PC != sym_addr)
+ sym_str += csprintf("+%d", PC - sym_addr);
+ outs << "@" << sym_str << " : ";
+ }
+ else {
+ outs << "0x" << hex << PC << " : ";
+ }
//
// Print decoded instruction
// End of line...
//
outs << endl;
- outs.flush();
}