gem5
|
Concrete subclasses of this abstract class represent how the register values are transmitted on the wire. More...
#include <remote_gdb.hh>
Public Member Functions | |
virtual char * | data () const =0 |
Return the pointer to the raw bytes buffer containing the register values. More... | |
virtual size_t | size () const =0 |
Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet). More... | |
virtual void | getRegs (ThreadContext *)=0 |
Fill the raw buffer from the registers in the ThreadContext. More... | |
virtual void | setRegs (ThreadContext *) const =0 |
Set the ThreadContext's registers from the values in the raw buffer. More... | |
virtual const std::string | name () const =0 |
Return the name to use in places like DPRINTF. More... | |
BaseGdbRegCache (BaseRemoteGDB *g) | |
virtual | ~BaseGdbRegCache () |
Protected Attributes | |
BaseRemoteGDB * | gdb |
Concrete subclasses of this abstract class represent how the register values are transmitted on the wire.
Usually each architecture should define one subclass, but there can be more if there is more than one possible wire format. For example, ARM defines both AArch32GdbRegCache and AArch64GdbRegCache.
Definition at line 183 of file remote_gdb.hh.
|
inline |
Definition at line 219 of file remote_gdb.hh.
|
inlinevirtual |
Definition at line 221 of file remote_gdb.hh.
|
pure virtual |
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.
Implemented in X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, RiscvISA::RemoteGDB::RiscvGdbRegCache, and MipsISA::RemoteGDB::MipsGdbRegCache.
Referenced by BaseRemoteGDB::cmd_reg_r(), and BaseRemoteGDB::cmd_reg_w().
|
pure virtual |
Fill the raw buffer from the registers in the ThreadContext.
Implemented in X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, RiscvISA::RemoteGDB::RiscvGdbRegCache, and MipsISA::RemoteGDB::MipsGdbRegCache.
Referenced by BaseRemoteGDB::trap().
|
pure virtual |
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.
Implemented in X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, RiscvISA::RemoteGDB::RiscvGdbRegCache, and MipsISA::RemoteGDB::MipsGdbRegCache.
|
pure virtual |
Set the ThreadContext's registers from the values in the raw buffer.
Implemented in X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, RiscvISA::RemoteGDB::RiscvGdbRegCache, and MipsISA::RemoteGDB::MipsGdbRegCache.
Referenced by BaseRemoteGDB::cmd_reg_w().
|
pure virtual |
Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet).
Implemented in X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, RiscvISA::RemoteGDB::RiscvGdbRegCache, and MipsISA::RemoteGDB::MipsGdbRegCache.
Referenced by BaseRemoteGDB::cmd_reg_r(), and BaseRemoteGDB::cmd_reg_w().
|
protected |
Definition at line 225 of file remote_gdb.hh.
Referenced by MipsISA::RemoteGDB::MipsGdbRegCache::name(), RiscvISA::RemoteGDB::RiscvGdbRegCache::name(), X86ISA::RemoteGDB::X86GdbRegCache::name(), SparcISA::RemoteGDB::SPARC64GdbRegCache::name(), ArmISA::RemoteGDB::AArch64GdbRegCache::name(), and X86ISA::RemoteGDB::AMD64GdbRegCache::name().