38 #include "arch/isa_traits.hh"
39 #include "arch/utility.hh"
41 #include "config/the_isa.hh"
45 #include "debug/ExecAll.hh"
46 #include "enums/OpClass.hh"
49 using namespace TheISA;
54 ExeTracerRecord::dumpTicks(ostream &outs)
64 if (!Debug::ExecUser || !Debug::ExecKernel) {
66 if (in_user_mode && !Debug::ExecUser)
return;
67 if (!in_user_mode && !Debug::ExecKernel)
return;
73 outs << thread->getCpuPtr()->name() <<
" ";
78 if (Debug::ExecThread)
79 outs <<
"T" << thread->threadId() <<
" : ";
83 Addr cur_pc =
pc.instAddr();
87 if (cur_pc != sym_addr)
88 sym_str +=
csprintf(
"+%d",cur_pc - sym_addr);
89 outs <<
"@" << sym_str;
91 outs <<
"0x" << hex << cur_pc;
95 outs <<
"." << setw(2) << dec <<
pc.microPC();
106 outs << setw(26) << left;
112 if (Debug::ExecOpClass) {
113 outs << Enums::OpClassStrings[inst->
opClass()] <<
" : ";
116 if (Debug::ExecResult && !predicate) {
117 outs <<
"Predicated False";
120 if (Debug::ExecResult && data_status != DataInvalid) {
124 if (Debug::ExecEffAddr && getMemValid())
125 outs <<
" A=0x" << hex <<
addr;
127 if (Debug::ExecFetchSeq && fetch_seq_valid)
128 outs <<
" FetchSeq=" << dec << fetch_seq;
130 if (Debug::ExecCPSeq && cp_seq_valid)
131 outs <<
" CPSeq=" << dec << cp_seq;
133 if (Debug::ExecFlags) {
157 if (Debug::ExecMacro && staticInst->isMicroop() &&
158 ((Debug::ExecMicro &&
159 macroStaticInst && staticInst->isFirstMicroop()) ||
160 (!Debug::ExecMicro &&
161 macroStaticInst && staticInst->isLastMicroop()))) {
162 traceInst(macroStaticInst,
false);
164 if (Debug::ExecMicro || !staticInst->isMicroop()) {
165 traceInst(staticInst,
true);
176 ExeTracerParams::create()
void ccprintf(cp::Print &print)
virtual const std::string & disassemble(Addr pc, const SymbolTable *symtab=0) const
Return string representation of disassembled instruction.
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
std::string csprintf(const char *format, const Args &...args)
void printFlags(std::ostream &outs, const std::string &separator) const
Print a separator separated list of this instruction's set flag names on the given stream...
std::ostream & output()
Get the ostream from the current global logger.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool inUserMode(ThreadContext *tc)
uint64_t getExecutingAsid(ThreadContext *tc)
void traceInst(const StaticInstPtr &inst, bool ran)
bool findNearestSymbol(Addr addr, std::string &symbol, Addr &symaddr, Addr &nextaddr) const
Find the nearest symbol equal to or less than the supplied address (e.g., the label for the enclosing...