summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-04-24 16:56:24 -0400
committerKevin Lim <ktlim@umich.edu>2006-04-24 16:56:24 -0400
commitb363a3703da7f9773f4afe2469c0206e14de1813 (patch)
tree3c3a2f45171e7d4da26340784d768d585f232bd1 /cpu
parent55db48891c6d60d50f4f96c2e31f5281c23ed41f (diff)
downloadgem5-b363a3703da7f9773f4afe2469c0206e14de1813.tar.xz
Allow the switching on and off of PC symbols for tracing.
--HG-- extra : convert_revision : a2422e30ace9874ba1be44cd0e1d3024cabbf1ed
Diffstat (limited to 'cpu')
-rw-r--r--cpu/exetrace.cc6
-rw-r--r--cpu/exetrace.hh1
2 files changed, 6 insertions, 1 deletions
diff --git a/cpu/exetrace.cc b/cpu/exetrace.cc
index 84b5eacf7..d5eacd839 100644
--- a/cpu/exetrace.cc
+++ b/cpu/exetrace.cc
@@ -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;
}
diff --git a/cpu/exetrace.hh b/cpu/exetrace.hh
index 67d042ec8..2f70e26e7 100644
--- a/cpu/exetrace.hh
+++ b/cpu/exetrace.hh
@@ -144,6 +144,7 @@ class InstRecord : public Record
PRINT_INT_REGS,
PRINT_FETCH_SEQ,
PRINT_CP_SEQ,
+ PC_SYMBOL,
INTEL_FORMAT,
NUM_BITS
};