50 if (base ==
ULL(0xfffffc0000000000))
133 const MachInst mem_mask = 0xffff0000;
134 const MachInst lda_pattern = 0x23de0000;
135 const MachInst lda_disp_mask = 0x0000ffff;
147 const MachInst intop_mask = 0xffe01fff;
148 const MachInst addq_pattern = 0x43c0141e;
149 const MachInst subq_pattern = 0x43c0153e;
150 const MachInst intop_disp_mask = 0x001fe000;
151 const int intop_disp_shift = 13;
153 if ((inst & mem_mask) == lda_pattern)
154 disp = -sext<16>(inst & lda_disp_mask);
155 else if ((inst & intop_mask) == addq_pattern)
156 disp = -
int((inst & intop_disp_mask) >> intop_disp_shift);
157 else if ((inst & intop_mask) == subq_pattern)
158 disp =
int((inst & intop_disp_mask) >> intop_disp_shift);
174 const MachInst stq_mask = 0xfc1f0000;
175 const MachInst stq_pattern = 0xb41e0000;
176 const MachInst stq_disp_mask = 0x0000ffff;
177 const MachInst reg_mask = 0x03e00000;
178 const int reg_shift = 21;
180 if ((inst & stq_mask) == stq_pattern) {
181 reg = (inst & reg_mask) >> reg_shift;
182 disp = sext<16>(inst & stq_disp_mask);
227 panic(
"Stack trace dump not implemented.\n");
#define panic(...)
This implements a cprintf based panic() function.
ProcessInfo(ThreadContext *_tc)
virtual PortProxy & getVirtProxy()=0
T read(Addr address) const
Read sizeof(T) bytes from address and return as object T.
std::string name(Addr ksp) const
void trace(ThreadContext *tc, bool is_call)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
MipsISA::MachInst MachInst
bool decodeSave(MachInst inst, int ®, int &disp)
std::vector< Addr > stack
PortProxy Object Declaration.
bool decodePrologue(Addr sp, Addr callpc, Addr func, int &size, Addr &ra)
Addr task(Addr ksp) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
This object is a proxy for a port or other object which implements the functional response protocol...
void readString(std::string &str, Addr addr) const
Same as tryReadString, but insists on success.
const int ReturnAddressReg
void dump()
Dump all statistics data to the registered outputs.
bool decodeStack(MachInst inst, int &disp)
const ByteOrder GuestByteOrder