gem5  v20.1.0.0
Public Member Functions | Private 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 Member Functions

 BaseGdbRegCache (BaseRemoteGDB *g)
 

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 56 of file remote_gdb.hh.

Member Function Documentation

◆ BaseGdbRegCache()

BaseGdbRegCache::BaseGdbRegCache
inlineprivate

Definition at line 119 of file remote_gdb.hh.

◆ 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 65 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 179 of file remote_gdb.cc.

References BaseRemoteGDB::context(), DPRINTF, RiscvISA::i, RiscvISA::NumIntArchRegs, ThreadContext::pcState(), r, ThreadContext::readIntReg(), and 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 71 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 188 of file remote_gdb.cc.

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

◆ 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 66 of file remote_gdb.hh.

References r.

Referenced by getRegs().

Member Data Documentation

◆ gpr

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

Definition at line 61 of file remote_gdb.hh.

◆ pc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::pc

Definition at line 62 of file remote_gdb.hh.

◆ r

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

Referenced by data(), getRegs(), and size().


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

Generated on Wed Sep 30 2020 14:03:08 for gem5 by doxygen 1.8.17