gem5  v21.0.1.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
 
   uint64_t   fpu [NumFloatRegs]
 
   uint32_t   fflags
 
   uint32_t   frm
 
   uint32_t   fcsr
 
   uint32_t   placeholder
 
   uint64_t   cycle
 
   uint64_t   time
 
   uint64_t   ustatus
 
   uint64_t   uie
 
   uint64_t   utvec
 
   uint64_t   uscratch
 
   uint64_t   uepc
 
   uint64_t   ucause
 
   uint64_t   utval
 
   uint64_t   uip
 
   uint64_t   sstatus
 
   uint64_t   sedeleg
 
   uint64_t   sideleg
 
   uint64_t   sie
 
   uint64_t   stvec
 
   uint64_t   scounteren
 
   uint64_t   sscratch
 
   uint64_t   sepc
 
   uint64_t   scause
 
   uint64_t   stval
 
   uint64_t   sip
 
   uint64_t   satp
 
   uint64_t   mvendorid
 
   uint64_t   marchid
 
   uint64_t   mimpid
 
   uint64_t   mhartid
 
   uint64_t   mstatus
 
   uint64_t   misa
 
   uint64_t   medeleg
 
   uint64_t   mideleg
 
   uint64_t   mie
 
   uint64_t   mtvec
 
   uint64_t   mcounteren
 
   uint64_t   mscratch
 
   uint64_t   mepc
 
   uint64_t   mcause
 
   uint64_t   mtval
 
   uint64_t   mip
 
   uint64_t   hstatus
 
   uint64_t   hedeleg
 
   uint64_t   hideleg
 
   uint64_t   hie
 
   uint64_t   htvec
 
   uint64_t   hscratch
 
   uint64_t   hepc
 
   uint64_t   hcause
 
   uint64_t   hbadaddr
 
   uint64_t   hip
 
r
 RISC-V Register Cache Order and sizes of registers found in ext/gdb-xml/riscv.xml To add support for more CSRs: More...
 

Additional Inherited Members

- Protected Attributes inherited from BaseGdbRegCache
BaseRemoteGDBgdb
 

Detailed Description

Definition at line 57 of file remote_gdb.hh.

Member Function Documentation

◆ BaseGdbRegCache()

BaseGdbRegCache::BaseGdbRegCache
inlineprivate

Definition at line 121 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 128 of file remote_gdb.hh.

References r.

◆ getRegs()

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

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

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

◆ setRegs()

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

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

References r.

Referenced by getRegs().

Member Data Documentation

◆ cycle

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::cycle

Definition at line 78 of file remote_gdb.hh.

◆ fcsr

uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::fcsr

Definition at line 75 of file remote_gdb.hh.

◆ fflags

uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::fflags

Definition at line 73 of file remote_gdb.hh.

◆ fpu

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::fpu[NumFloatRegs]

Definition at line 72 of file remote_gdb.hh.

◆ frm

uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::frm

Definition at line 74 of file remote_gdb.hh.

◆ gpr

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

Definition at line 70 of file remote_gdb.hh.

◆ hbadaddr

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hbadaddr

Definition at line 124 of file remote_gdb.hh.

◆ hcause

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hcause

Definition at line 123 of file remote_gdb.hh.

◆ hedeleg

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hedeleg

Definition at line 117 of file remote_gdb.hh.

◆ hepc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hepc

Definition at line 122 of file remote_gdb.hh.

◆ hideleg

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hideleg

Definition at line 118 of file remote_gdb.hh.

◆ hie

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hie

Definition at line 119 of file remote_gdb.hh.

◆ hip

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hip

Definition at line 125 of file remote_gdb.hh.

◆ hscratch

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hscratch

Definition at line 121 of file remote_gdb.hh.

◆ hstatus

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::hstatus

Definition at line 116 of file remote_gdb.hh.

◆ htvec

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::htvec

Definition at line 120 of file remote_gdb.hh.

◆ marchid

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::marchid

Definition at line 101 of file remote_gdb.hh.

◆ mcause

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mcause

Definition at line 113 of file remote_gdb.hh.

◆ mcounteren

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mcounteren

Definition at line 110 of file remote_gdb.hh.

◆ medeleg

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::medeleg

Definition at line 106 of file remote_gdb.hh.

◆ mepc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mepc

Definition at line 112 of file remote_gdb.hh.

◆ mhartid

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mhartid

Definition at line 103 of file remote_gdb.hh.

◆ mideleg

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mideleg

Definition at line 107 of file remote_gdb.hh.

◆ mie

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mie

Definition at line 108 of file remote_gdb.hh.

◆ mimpid

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mimpid

Definition at line 102 of file remote_gdb.hh.

◆ mip

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mip

Definition at line 115 of file remote_gdb.hh.

◆ misa

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::misa

Definition at line 105 of file remote_gdb.hh.

◆ mscratch

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mscratch

Definition at line 111 of file remote_gdb.hh.

◆ mstatus

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mstatus

Definition at line 104 of file remote_gdb.hh.

◆ mtval

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mtval

Definition at line 114 of file remote_gdb.hh.

◆ mtvec

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mtvec

Definition at line 109 of file remote_gdb.hh.

◆ mvendorid

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::mvendorid

Definition at line 100 of file remote_gdb.hh.

◆ pc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::pc

Definition at line 71 of file remote_gdb.hh.

◆ placeholder

uint32_t RiscvISA::RemoteGDB::RiscvGdbRegCache::placeholder

Definition at line 77 of file remote_gdb.hh.

◆ r

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

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

  1. Uncomment relevant lines in ext/gdb-xml/riscv-64bit-csr.xml
  2. Add register to struct below
  3. Modify RiscvGdbRegCache::getRegs and setRegs

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

◆ satp

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::satp

Definition at line 99 of file remote_gdb.hh.

◆ scause

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::scause

Definition at line 96 of file remote_gdb.hh.

◆ scounteren

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::scounteren

Definition at line 93 of file remote_gdb.hh.

◆ sedeleg

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sedeleg

Definition at line 89 of file remote_gdb.hh.

◆ sepc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sepc

Definition at line 95 of file remote_gdb.hh.

◆ sideleg

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sideleg

Definition at line 90 of file remote_gdb.hh.

◆ sie

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sie

Definition at line 91 of file remote_gdb.hh.

◆ sip

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sip

Definition at line 98 of file remote_gdb.hh.

◆ sscratch

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sscratch

Definition at line 94 of file remote_gdb.hh.

◆ sstatus

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::sstatus

Definition at line 88 of file remote_gdb.hh.

◆ stval

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::stval

Definition at line 97 of file remote_gdb.hh.

◆ stvec

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::stvec

Definition at line 92 of file remote_gdb.hh.

◆ time

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::time

Definition at line 79 of file remote_gdb.hh.

◆ ucause

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::ucause

Definition at line 85 of file remote_gdb.hh.

◆ uepc

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::uepc

Definition at line 84 of file remote_gdb.hh.

◆ uie

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::uie

Definition at line 81 of file remote_gdb.hh.

◆ uip

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::uip

Definition at line 87 of file remote_gdb.hh.

◆ uscratch

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::uscratch

Definition at line 83 of file remote_gdb.hh.

◆ ustatus

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::ustatus

Definition at line 80 of file remote_gdb.hh.

◆ utval

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::utval

Definition at line 86 of file remote_gdb.hh.

◆ utvec

uint64_t RiscvISA::RemoteGDB::RiscvGdbRegCache::utvec

Definition at line 82 of file remote_gdb.hh.


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

Generated on Tue Jun 22 2021 15:29:10 for gem5 by doxygen 1.8.17