42#include <sys/signal.h>
59#include "debug/GDBAcc.hh"
71 regCache32(this), regCache64(this)
75RemoteGDB::acc(Addr va,
size_t len)
78 Walker *walker =
dynamic_cast<MMU *
>(
79 context()->getMMUPtr())->getDataWalker();
81 Fault fault = walker->startFunctional(context(), va, logBytes,
87 if ((va & ~
mask(logBytes)) == (endVa & ~
mask(logBytes)))
90 fault = walker->startFunctional(context(), endVa, logBytes,
94 return context()->getProcessPtr()->pTable->lookup(va) !=
nullptr;
104 auto arch =
system()->workload->getArch();
105 if (arch == loader::X86_64) {
107 }
else if (arch == loader::I386) {
109 }
else if (arch != loader::UnknownArch) {
110 panic(
"Unrecognized workload arch %s.",
111 loader::archToString(arch));
116 HandyM5Reg m5reg = context()->readMiscRegNoEffect(misc_reg::M5Reg);
117 if (m5reg.submode == SixtyFourBitMode)
128 DPRINTF(GDBAcc,
"getRegs in remotegdb \n");
145 r.rip =
context->pcState().instAddr();
158 DPRINTF(GDBAcc,
"getRegs in remotegdb \n");
167 r.eip =
context->pcState().instAddr();
180 DPRINTF(GDBAcc,
"setRegs in remotegdb \n");
200 warn(
"Remote gdb: Ignoring update to CS.\n");
202 warn(
"Remote gdb: Ignoring update to SS.\n");
204 warn(
"Remote gdb: Ignoring update to DS.\n");
206 warn(
"Remote gdb: Ignoring update to ES.\n");
208 warn(
"Remote gdb: Ignoring update to FS.\n");
210 warn(
"Remote gdb: Ignoring update to GS.\n");
216 DPRINTF(GDBAcc,
"setRegs in remotegdb \n");
228 warn(
"Remote gdb: Ignoring update to CS.\n");
230 warn(
"Remote gdb: Ignoring update to SS.\n");
232 warn(
"Remote gdb: Ignoring update to DS.\n");
234 warn(
"Remote gdb: Ignoring update to ES.\n");
236 warn(
"Remote gdb: Ignoring update to FS.\n");
238 warn(
"Remote gdb: Ignoring update to GS.\n");
RemoteGDB(System *_system, ListenSocketConfig _listen_config)
ThreadContext * context()
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void getRegs(ThreadContext *)
Fill the raw buffer from the registers in the ThreadContext.
struct gem5::X86ISA::RemoteGDB::AMD64GdbRegCache::GEM5_PACKED r
void setRegs(ThreadContext *) const
Set the ThreadContext's registers from the values in the raw buffer.
void getRegs(ThreadContext *)
Fill the raw buffer from the registers in the ThreadContext.
struct gem5::X86ISA::RemoteGDB::X86GdbRegCache::@302170246304373166075260337127051153361152075153 r
void setRegs(ThreadContext *) const
Set the ThreadContext's registers from the values in the raw buffer.
#define panic(...)
This implements a cprintf based panic() function.
This is exposed globally, independent of the ISA.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
constexpr decltype(nullptr) NoFault
Declarations of a non-full system Page Table.