gem5  v19.0.0.0
Public Member Functions | Private Attributes | List of all members
RiscvISA::RemoteGDB::RiscvGdbRegCache Class Reference

#include <remote_gdb.hh>

Inheritance diagram for RiscvISA::RemoteGDB::RiscvGdbRegCache:
BaseGdbRegCache

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 BaseGdbRegCache
 BaseGdbRegCache (BaseRemoteGDB *g)
 
virtual ~BaseGdbRegCache ()
 

Private Attributes

struct {
   uint64_t   gpr [NumIntArchRegs]
 
   uint64_t   pc
 
r
 

Additional Inherited Members

- Protected Attributes inherited from BaseGdbRegCache
BaseRemoteGDBgdb
 

Detailed Description

Definition at line 60 of file remote_gdb.hh.

Member Function Documentation

◆ data()

char* RiscvISA::RemoteGDB::RiscvGdbRegCache::data ( ) const
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 BaseGdbRegCache.

Definition at line 69 of file remote_gdb.hh.

References r.

◆ getRegs()

void RemoteGDB::RiscvGdbRegCache::getRegs ( ThreadContext )
virtual

Fill the raw buffer from the registers in the ThreadContext.

Implements BaseGdbRegCache.

Definition at line 164 of file remote_gdb.cc.

References DPRINTF, RiscvISA::i, RiscvISA::NumIntArchRegs, ThreadContext::pcState(), RiscvISA::r, and ThreadContext::readIntReg().

Referenced by size().

◆ name()

const std::string RiscvISA::RemoteGDB::RiscvGdbRegCache::name ( ) const
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 BaseGdbRegCache.

Definition at line 75 of file remote_gdb.hh.

References BaseGdbRegCache::gdb, and BaseRemoteGDB::name().

◆ setRegs()

void RemoteGDB::RiscvGdbRegCache::setRegs ( ThreadContext ) const
virtual

Set the ThreadContext's registers from the values in the raw buffer.

Implements BaseGdbRegCache.

Definition at line 173 of file remote_gdb.cc.

References DPRINTF, RiscvISA::i, RiscvISA::NumIntArchRegs, ThreadContext::pcState(), RiscvISA::r, and ThreadContext::setIntReg().

Referenced by size().

◆ size()

size_t RiscvISA::RemoteGDB::RiscvGdbRegCache::size ( ) const
inlinevirtual

Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet).

Implements BaseGdbRegCache.

Definition at line 70 of file remote_gdb.hh.

References getRegs(), r, and setRegs().

Member Data Documentation

◆ gpr

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::gpr[NumIntArchRegs]

Definition at line 65 of file remote_gdb.hh.

◆ pc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::pc

Definition at line 66 of file remote_gdb.hh.

◆ r

struct { ... } RiscvISA::RemoteGDB::RiscvGdbRegCache::r

Referenced by data(), and size().


The documentation for this class was generated from the following files:

Generated on Fri Feb 28 2020 16:27:23 for gem5 by doxygen 1.8.13