gem5
|
#include <remote_gdb.hh>
Public Member Functions | |
char * | data () const |
Return the pointer to the raw bytes buffer containing the register values. More... | |
size_t | size () const |
Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet). More... | |
void | getRegs (ThreadContext *) |
Fill the raw buffer from the registers in the ThreadContext. More... | |
void | setRegs (ThreadContext *) const |
Set the ThreadContext's registers from the values in the raw buffer. More... | |
const std::string | name () const |
Return the name to use in places like DPRINTF. More... | |
Public Member Functions inherited from BaseRemoteGDB::BaseGdbRegCache | |
BaseGdbRegCache (BaseRemoteGDB *g) | |
virtual | ~BaseGdbRegCache () |
Private Member Functions | |
struct { | |
IntReg gpr [NumIntArchRegs] | |
IntReg pc | |
FloatRegBits fpr [NumFloatRegs] | |
MiscReg csr_base | |
uint32_t fflags | |
uint32_t frm | |
uint32_t fcsr | |
MiscReg csr [NumMiscRegs-ExplicitCSRs] | |
} | __attribute__ ((__packed__)) r |
Additional Inherited Members | |
Protected Attributes inherited from BaseRemoteGDB::BaseGdbRegCache | |
BaseRemoteGDB * | gdb |
Definition at line 57 of file remote_gdb.hh.
|
private |
|
inlinevirtual |
Return the pointer to the raw bytes buffer containing the register values.
Each byte of this buffer is literally encoded as two hex digits in the g or G RSP packet.
Implements BaseRemoteGDB::BaseGdbRegCache.
Definition at line 73 of file remote_gdb.hh.
References RiscvISA::r.
|
virtual |
Fill the raw buffer from the registers in the ThreadContext.
Implements BaseRemoteGDB::BaseGdbRegCache.
Definition at line 167 of file remote_gdb.cc.
References DPRINTF, RiscvISA::RemoteGDB::ExplicitCSRs, RiscvISA::i, RiscvISA::MISCREG_FCSR, RiscvISA::MISCREG_FFLAGS, RiscvISA::MISCREG_FRM, RiscvISA::NumFloatRegs, RiscvISA::NumIntArchRegs, RiscvISA::NumMiscRegs, ThreadContext::pcState(), RiscvISA::r, ThreadContext::readFloatRegBits(), ThreadContext::readIntReg(), ThreadContext::readMiscReg(), and size().
|
inlinevirtual |
Return the name to use in places like DPRINTF.
Having each concrete superclass redefine this member is useful in situations where the class of the regCache can change on the fly.
Implements BaseRemoteGDB::BaseGdbRegCache.
Definition at line 79 of file remote_gdb.hh.
References BaseRemoteGDB::BaseGdbRegCache::gdb, and BaseRemoteGDB::name().
|
virtual |
Set the ThreadContext's registers from the values in the raw buffer.
Implements BaseRemoteGDB::BaseGdbRegCache.
Definition at line 185 of file remote_gdb.cc.
References DPRINTF, RiscvISA::RemoteGDB::ExplicitCSRs, RiscvISA::i, RiscvISA::MISCREG_FCSR, RiscvISA::MISCREG_FFLAGS, RiscvISA::MISCREG_FRM, RiscvISA::NumFloatRegs, RiscvISA::NumIntArchRegs, RiscvISA::NumMiscRegs, ThreadContext::pcState(), RiscvISA::r, ThreadContext::setFloatRegBits(), ThreadContext::setIntReg(), and ThreadContext::setMiscReg().
|
inlinevirtual |
Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet).
Implements BaseRemoteGDB::BaseGdbRegCache.
Definition at line 74 of file remote_gdb.hh.
References RiscvISA::r.
Referenced by getRegs().
MiscReg RiscvISA::RemoteGDB::RiscvGdbRegCache::csr[NumMiscRegs-ExplicitCSRs] |
Definition at line 70 of file remote_gdb.hh.
MiscReg RiscvISA::RemoteGDB::RiscvGdbRegCache::csr_base |
Definition at line 66 of file remote_gdb.hh.
uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::fcsr |
Definition at line 69 of file remote_gdb.hh.
uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::fflags |
Definition at line 67 of file remote_gdb.hh.
FloatRegBits RiscvISA::RemoteGDB::RiscvGdbRegCache::fpr[NumFloatRegs] |
Definition at line 64 of file remote_gdb.hh.
uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::frm |
Definition at line 68 of file remote_gdb.hh.
IntReg RiscvISA::RemoteGDB::RiscvGdbRegCache::gpr[NumIntArchRegs] |
Definition at line 62 of file remote_gdb.hh.
IntReg RiscvISA::RemoteGDB::RiscvGdbRegCache::pc |
Definition at line 63 of file remote_gdb.hh.