Allow the switching on and off of PC symbols for tracing.
authorKevin Lim <ktlim@umich.edu>
Mon, 24 Apr 2006 20:56:24 +0000 (16:56 -0400)
committerKevin Lim <ktlim@umich.edu>
Mon, 24 Apr 2006 20:56:24 +0000 (16:56 -0400)
--HG--
extra : convert_revision : a2422e30ace9874ba1be44cd0e1d3024cabbf1ed

cpu/exetrace.cc
cpu/exetrace.hh

index 84b5eacf7f1d54dba40b0df67ba3ce2556e750de..d5eacd839488909f5b0f8b097dbcf5fd395ddf8a 100644 (file)
@@ -84,7 +84,8 @@ Trace::InstRecord::dump(ostream &outs)
         std::string sym_str;
         Addr sym_addr;
         if (debugSymbolTable
-            && debugSymbolTable->findNearestSymbol(PC, sym_str, sym_addr)) {
+            && debugSymbolTable->findNearestSymbol(PC, sym_str, sym_addr)
+            && flags[PC_SYMBOL]) {
             if (PC != sym_addr)
                 sym_str += csprintf("+%d", PC - sym_addr);
             outs << "@" << sym_str << " : ";
@@ -191,6 +192,8 @@ Param<bool> exe_trace_print_fetchseq(&exeTraceParams, "print_fetchseq",
                                   "print fetch sequence number", false);
 Param<bool> exe_trace_print_cp_seq(&exeTraceParams, "print_cpseq",
                                   "print correct-path sequence number", false);
+Param<bool> exe_trace_pc_symbol(&exeTraceParams, "pc_symbol",
+                                  "Use symbols for the PC if available", true);
 Param<bool> exe_trace_intel_format(&exeTraceParams, "intel_format",
                                    "print trace in intel compatible format", false);
 Param<string> exe_trace_system(&exeTraceParams, "trace_system",
@@ -215,6 +218,7 @@ Trace::InstRecord::setParams()
     flags[PRINT_INT_REGS]    = exe_trace_print_iregs;
     flags[PRINT_FETCH_SEQ]   = exe_trace_print_fetchseq;
     flags[PRINT_CP_SEQ]      = exe_trace_print_cp_seq;
+    flags[PC_SYMBOL]         = exe_trace_pc_symbol;
     flags[INTEL_FORMAT]      = exe_trace_intel_format;
     trace_system            = exe_trace_system;
 }
index 67d042ec8c2ce03a7b4805aa150b1e04d08b53eb..2f70e26e7164b0fb88320f70b208d24223a3a4b1 100644 (file)
@@ -144,6 +144,7 @@ class InstRecord : public Record
         PRINT_INT_REGS,
         PRINT_FETCH_SEQ,
         PRINT_CP_SEQ,
+        PC_SYMBOL,
         INTEL_FORMAT,
         NUM_BITS
     };