56 panic(
"thread info not compiled into kernel\n");
60 panic(
"thread info not compiled into kernel\n");
64 panic(
"thread info not compiled into kernel\n");
68 panic(
"thread info not compiled into kernel\n");
72 panic(
"thread info not compiled into kernel\n");
80 if (base ==
ULL(0xfffffc0000000000))
101 pd = vp.readGtoH<uint16_t>(task +
pid_off);
161 Addr bottom = ksp & ~0x3fff;
166 panic(
"could not find address %#x", pc);
168 stack.push_back(addr);
172 while (ksp > bottom) {
175 panic(
"could not find symbol for pc=%#x", pc);
176 assert(pc >= addr &&
"symbol botch: callpc < func");
178 stack.push_back(addr);
205 if (
stack.size() >= 1000)
206 panic(
"unwinding too far");
209 panic(
"unwinding too far");
245 const MachInst mem_mask = 0xffff0000;
246 const MachInst lda_pattern = 0x23de0000;
247 const MachInst lda_disp_mask = 0x0000ffff;
259 const MachInst intop_mask = 0xffe01fff;
260 const MachInst addq_pattern = 0x43c0141e;
261 const MachInst subq_pattern = 0x43c0153e;
262 const MachInst intop_disp_mask = 0x001fe000;
263 const int intop_disp_shift = 13;
265 if ((inst & mem_mask) == lda_pattern)
266 disp = -sext<16>(inst & lda_disp_mask);
267 else if ((inst & intop_mask) == addq_pattern)
268 disp = -
int((inst & intop_disp_mask) >> intop_disp_shift);
269 else if ((inst & intop_mask) == subq_pattern)
270 disp =
int((inst & intop_disp_mask) >> intop_disp_shift);
286 const MachInst stq_mask = 0xfc1f0000;
287 const MachInst stq_pattern = 0xb41e0000;
288 const MachInst stq_disp_mask = 0x0000ffff;
289 const MachInst reg_mask = 0x03e00000;
290 const int reg_shift = 21;
292 if ((inst & stq_mask) == stq_pattern) {
293 reg = (inst & reg_mask) >> reg_shift;
294 disp = sext<16>(inst & stq_disp_mask);
357 symtab->findSymbol(addr, symbol);
359 DPRINTFN(
"%#x: %s\n", addr, symbol);
A TranslatingPortProxy in FS mode translates a virtual address to a physical address and then calls t...
void trace(ThreadContext *tc, bool is_call)
virtual System * getSystemPtr()=0
const std::string & name()
bool decodeStack(MachInst inst, int &disp)
Addr task(Addr ksp) const
std::vector< Addr > stack
virtual MiscReg readMiscRegNoEffect(int misc_reg) const =0
virtual BaseCPU * getCpuPtr()=0
bool findAddress(const std::string &symbol, Addr &address) const
bool decodePrologue(Addr sp, Addr callpc, Addr func, int &size, Addr &ra)
virtual TheISA::PCState pcState()=0
void CopyOut(ThreadContext *tc, void *dest, Addr src, size_t cplen)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
std::string name(Addr ksp) const
const RegIndex ReturnAddressReg
Addr kernelStart
Beginning of kernel code.
virtual uint64_t readIntReg(int reg_idx)=0
bool decodeSave(MachInst inst, int ®, int &disp)
void CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen)
const RegIndex StackPointerReg
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
SymbolTable * kernelSymtab
kernel symbol table
virtual FSTranslatingPortProxy & getVirtProxy()=0
TranslatingPortProxy Object Declaration for FS.
void dump()
Dump all statistics data to the registered outputs.
bool findNearestAddr(Addr addr, Addr &symaddr, Addr &nextaddr) const
Addr kernelEnd
End of kernel code.