51 #include "arch/isa_traits.hh" 52 #include "arch/utility.hh" 54 #include "config/the_isa.hh" 58 #include "debug/ExecAll.hh" 59 #include "debug/FmtTicksOff.hh" 60 #include "enums/OpClass.hh" 70 std::stringstream outs;
72 if (!Debug::ExecUser || !Debug::ExecKernel) {
74 if (in_user_mode && !Debug::ExecUser)
return;
75 if (!in_user_mode && !Debug::ExecKernel)
return;
81 if (Debug::ExecThread)
82 outs <<
"T" << thread->threadId() <<
" : ";
86 Addr cur_pc =
pc.instAddr();
90 if (cur_pc != sym_addr)
91 sym_str +=
csprintf(
"+%d",cur_pc - sym_addr);
92 outs <<
"@" << sym_str;
94 outs <<
"0x" << hex << cur_pc;
98 outs <<
"." << setw(2) << dec <<
pc.microPC();
109 outs << setw(26) << left;
115 if (Debug::ExecOpClass) {
116 outs << Enums::OpClassStrings[inst->
opClass()] <<
" : ";
119 if (Debug::ExecResult && !predicate) {
120 outs <<
"Predicated False";
123 if (Debug::ExecResult && data_status != DataInvalid) {
124 switch (data_status) {
128 auto dv =
data.as_vec->as<uint32_t>();
142 auto pv =
data.as_pred->as<uint8_t>();
145 if (i != 0 && i % 4 == 0) {
158 if (Debug::ExecEffAddr && getMemValid())
159 outs <<
" A=0x" << hex <<
addr;
161 if (Debug::ExecFetchSeq && fetch_seq_valid)
162 outs <<
" FetchSeq=" << dec << fetch_seq;
164 if (Debug::ExecCPSeq && cp_seq_valid)
165 outs <<
" CPSeq=" << dec << cp_seq;
167 if (Debug::ExecFlags) {
180 when, thread->getCpuPtr()->name(),
"ExecEnable",
"%s",
195 if (Debug::ExecMacro && staticInst->isMicroop() &&
196 ((Debug::ExecMicro &&
197 macroStaticInst && staticInst->isFirstMicroop()) ||
198 (!Debug::ExecMicro &&
199 macroStaticInst && staticInst->isLastMicroop()))) {
200 traceInst(macroStaticInst,
false);
202 if (Debug::ExecMicro || !staticInst->isMicroop()) {
203 traceInst(staticInst,
true);
214 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.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
Overload hash function for BasicBlockRange type.
void dprintf_flag(Tick when, const std::string &name, const std::string &flag, const char *fmt, const Args &...args)
Log a single message with a flag prefix.
std::string csprintf(const char *format, const Args &...args)
constexpr size_t VecRegSizeBytes
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...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool inUserMode(ThreadContext *tc)
constexpr size_t VecPredRegSizeBits
uint64_t getExecutingAsid(ThreadContext *tc)
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
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...
Logger * getDebugLogger()
Get the current global debug logger.
void traceInst(const StaticInstPtr &inst, bool ran)