Standardize clock parameter names to 'clock'.
[gem5.git] / cpu / exetrace.cc
index 0dd1d74d63f9005195d0bbf652799a0713cb3d8f..048a7d283f7a2eecdb14b07f1f427ec80d6d9a91 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -48,8 +48,6 @@ using namespace std;
 //
 
 
-SymbolTable *debugSymbolTable = NULL;
-
 void
 Trace::InstRecord::dump(ostream &outs)
 {
@@ -66,11 +64,17 @@ Trace::InstRecord::dump(ostream &outs)
         outs << "T" << thread << " : ";
 
 
-    std::string str;
-    if (debugSymbolTable->findNearestSymbol(PC, str))
-        outs << "@" << setw(17) << str << " : ";
-    else
+    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
@@ -150,7 +154,7 @@ class ExecutionTraceParamContext : public ParamContext
 ExecutionTraceParamContext exeTraceParams("exetrace");
 
 Param<bool> exe_trace_spec(&exeTraceParams, "speculative",
-                           "capture speculative instructions", false);
+                           "capture speculative instructions", true);
 
 Param<bool> exe_trace_print_cycle(&exeTraceParams, "print_cycle",
                                   "print cycle number", true);