Go to the documentation of this file.
142 #include "blobs/gdb_xml_riscv_cpu.hh"
143 #include "blobs/gdb_xml_riscv_csr.hh"
144 #include "blobs/gdb_xml_riscv_fpu.hh"
145 #include "blobs/gdb_xml_riscv_target.hh"
147 #include "debug/GDBAcc.hh"
170 satp.mode != AddrXlateMode::BARE) {
186 DPRINTF(GDBAcc,
"getregs in remotegdb, size %lu\n",
size());
300 DPRINTF(GDBAcc,
"setregs in remotegdb \n");
312 newVal = (oldVal & ~
mask) | (
r.fflags &
mask);
319 newVal = (oldVal & ~
mask) | (
r.frm &
mask);
326 newVal = (oldVal & ~
mask) | (
r.fcsr &
mask);
340 newVal = (oldVal & ~
mask) | (
r.ustatus &
mask);
346 newVal = (oldVal & ~
mask) | (
r.uie &
mask);
362 newVal = (oldVal & ~
mask) | (
r.uip &
mask);
370 newVal = (oldVal & ~
mask) | (
r.sstatus &
mask);
380 newVal = (oldVal & ~
mask) | (
r.sie &
mask);
398 newVal = (oldVal & ~
mask) | (
r.sip &
mask);
416 newVal = (oldVal & ~
mask) | (
r.mstatus &
mask);
422 newVal = (oldVal & ~
mask) | (
r.misa &
mask);
432 newVal = (oldVal & ~
mask) | (
r.mie &
mask);
450 newVal = (oldVal & ~
mask) | (
r.mip &
mask);
466 #define GDB_XML(x, s) \
468 x, std::string(reinterpret_cast<const char *>(Blobs::s), \
471 static const std::map<std::string, std::string> annexMap{
472 GDB_XML(
"target.xml", gdb_xml_riscv_target),
473 GDB_XML(
"riscv-64bit-cpu.xml", gdb_xml_riscv_cpu),
474 GDB_XML(
"riscv-64bit-fpu.xml", gdb_xml_riscv_fpu),
475 GDB_XML(
"riscv-64bit-csr.xml", gdb_xml_riscv_csr)};
477 auto it = annexMap.find(annex);
478 if (it == annexMap.end())
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
static void output(const char *filename)
bool getXferFeaturesRead(const std::string &annex, std::string &output) override
Reply to qXfer:features:read:xxx.xml qeuries.
const std::map< int, RegVal > CSRMasks
virtual BaseMMU * getMMUPtr()=0
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
void getRegs(ThreadContext *)
Fill the raw buffer from the registers in the ThreadContext.
struct RiscvISA::RemoteGDB::RiscvGdbRegCache::@15 r
RISC-V Register Cache Order and sizes of registers found in ext/gdb-xml/riscv.xml To add support for ...
EmulationPageTable * pTable
void setRegs(ThreadContext *) const
Set the ThreadContext's registers from the values in the raw buffer.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual Process * getProcessPtr()=0
BaseGdbRegCache * gdbRegs() override
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).
const Entry * lookup(Addr vaddr)
Lookup function.
PrivilegeMode getMemPriv(ThreadContext *tc, BaseTLB::Mode mode)
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
ThreadContext * context()
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
bool acc(Addr addr, size_t len) override
constexpr decltype(nullptr) NoFault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Concrete subclasses of this abstract class represent how the register values are transmitted on the w...
virtual TheISA::PCState pcState() const =0
RiscvGdbRegCache regCache
virtual void setFloatReg(RegIndex reg_idx, RegVal val)=0
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
virtual RegVal readIntReg(RegIndex reg_idx) const =0
const std::map< int, CSRMetadata > CSRData
Fault startFunctional(ThreadContext *_tc, Addr &addr, unsigned &logBytes, BaseTLB::Mode mode)
RemoteGDB(System *_system, ThreadContext *tc, int _port)
Generated on Tue Jun 22 2021 15:28:21 for gem5 by doxygen 1.8.17