gem5 v25.0.0.1
Loading...
Searching...
No Matches
gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache Class Reference

#include <remote_gdb.hh>

Inheritance diagram for gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache:
gem5::BaseGdbRegCache

Classes

struct  GEM5_PACKED
 RISC-V Register Cache Order and sizes of registers found in ext/gdb-xml/riscv.xml To add support for more CSRs: More...

Public Member Functions

char * data ()
 Return the pointer to the raw bytes buffer containing the register values.
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).
void getRegs (ThreadContext *)
 Fill the raw buffer from the registers in the ThreadContext.
void setRegs (ThreadContext *) const
 Set the ThreadContext's registers from the values in the raw buffer.
const std::string name () const
 Return the name to use in places like DPRINTF.
Public Member Functions inherited from gem5::BaseGdbRegCache
 BaseGdbRegCache (BaseRemoteGDB *g)
virtual ~BaseGdbRegCache ()

Protected Attributes

struct gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache::GEM5_PACKED r
Protected Attributes inherited from gem5::BaseGdbRegCache
BaseRemoteGDBgdb

Private Member Functions

 BaseGdbRegCache (BaseRemoteGDB *g)

Detailed Description

Definition at line 65 of file remote_gdb.hh.

Member Function Documentation

◆ BaseGdbRegCache()

gem5::BaseGdbRegCache::BaseGdbRegCache ( BaseRemoteGDB * g)
inlineprivate

Definition at line 134 of file remote_gdb.hh.

◆ data()

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

Definition at line 131 of file remote_gdb.hh.

References r.

◆ getRegs()

void gem5::RemoteGDB::Riscv32GdbRegCache::getRegs ( ThreadContext * )
virtual

Fill the raw buffer from the registers in the ThreadContext.

Implements gem5::BaseGdbRegCache.

Definition at line 253 of file remote_gdb.cc.

References gem5::BaseRemoteGDB::context(), gem5::RiscvISA::CSR_CYCLE, gem5::RiscvISA::CSR_CYCLEH, gem5::RiscvISA::CSR_FCSR, gem5::RiscvISA::CSR_FFLAGS, gem5::RiscvISA::CSR_FRM, gem5::RiscvISA::CSR_MARCHID, gem5::RiscvISA::CSR_MCAUSE, gem5::RiscvISA::CSR_MCOUNTEREN, gem5::RiscvISA::CSR_MEDELEG, gem5::RiscvISA::CSR_MEPC, gem5::RiscvISA::CSR_MIDELEG, gem5::RiscvISA::CSR_MIE, gem5::RiscvISA::CSR_MIMPID, gem5::RiscvISA::CSR_MIP, gem5::RiscvISA::CSR_MISA, gem5::RiscvISA::CSR_MSCRATCH, gem5::RiscvISA::CSR_MSTATUS, gem5::RiscvISA::CSR_MSTATUSH, gem5::RiscvISA::CSR_MTVAL, gem5::RiscvISA::CSR_MTVEC, gem5::RiscvISA::CSR_MVENDORID, gem5::RiscvISA::CSR_SATP, gem5::RiscvISA::CSR_SCAUSE, gem5::RiscvISA::CSR_SCOUNTEREN, gem5::RiscvISA::CSR_SENVCFG, gem5::RiscvISA::CSR_SEPC, gem5::RiscvISA::CSR_SIE, gem5::RiscvISA::CSR_SIP, gem5::RiscvISA::CSR_SSCRATCH, gem5::RiscvISA::CSR_SSTATUS, gem5::RiscvISA::CSR_STVAL, gem5::RiscvISA::CSR_STVEC, gem5::RiscvISA::CSR_TIME, gem5::RiscvISA::CSR_TIMEH, gem5::RiscvISA::CSRData, gem5::RiscvISA::CSRMasks, DPRINTF, gem5::RiscvISA::floatRegClass(), gem5::BaseGdbRegCache::gdb, gem5::RiscvISA::RemoteGDB::getPrivilegeModeSet(), getRegs(), gem5::RiscvISA::i, gem5::RiscvISA::intRegClass(), gem5::RiscvISA::int_reg::NumArchRegs, gem5::RiscvISA::float_reg::NumRegs, r, gem5::RiscvISA::RemoteGDB::RemoteGDB(), gem5::RiscvISA::RV32, and size().

Referenced by getRegs().

◆ name()

const std::string gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache::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 gem5::BaseGdbRegCache.

Definition at line 137 of file remote_gdb.hh.

References gem5::BaseGdbRegCache::gdb.

◆ setRegs()

◆ size()

size_t gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache::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 gem5::BaseGdbRegCache.

Definition at line 132 of file remote_gdb.hh.

References r.

Referenced by getRegs().

Member Data Documentation

◆ r

struct gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache::GEM5_PACKED gem5::RiscvISA::RemoteGDB::Riscv32GdbRegCache::r
protected

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


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

Generated on Sat Oct 18 2025 08:07:01 for gem5 by doxygen 1.14.0