From b363a3703da7f9773f4afe2469c0206e14de1813 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Mon, 24 Apr 2006 16:56:24 -0400 Subject: [PATCH] Allow the switching on and off of PC symbols for tracing. --HG-- extra : convert_revision : a2422e30ace9874ba1be44cd0e1d3024cabbf1ed --- cpu/exetrace.cc | 6 +++++- cpu/exetrace.hh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) 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 exe_trace_print_fetchseq(&exeTraceParams, "print_fetchseq", "print fetch sequence number", false); Param exe_trace_print_cp_seq(&exeTraceParams, "print_cpseq", "print correct-path sequence number", false); +Param exe_trace_pc_symbol(&exeTraceParams, "pc_symbol", + "Use symbols for the PC if available", true); Param exe_trace_intel_format(&exeTraceParams, "intel_format", "print trace in intel compatible format", false); Param 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 }; -- 2.30.2