gem5
v21.0.0.0
|
These methods relate to the BaseRemoteGDB and BaseGdbRegCache interfaces. More...
Functions | |
virtual char * | BaseGdbRegCache::data () const =0 |
Return the pointer to the raw bytes buffer containing the register values. More... | |
virtual size_t | BaseGdbRegCache::size () const =0 |
Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet). More... | |
virtual void | BaseGdbRegCache::getRegs (ThreadContext *)=0 |
Fill the raw buffer from the registers in the ThreadContext. More... | |
virtual void | BaseGdbRegCache::setRegs (ThreadContext *) const =0 |
Set the ThreadContext's registers from the values in the raw buffer. More... | |
virtual const std::string | BaseGdbRegCache::name () const =0 |
Return the name to use in places like DPRINTF. More... | |
BaseGdbRegCache::BaseGdbRegCache (BaseRemoteGDB *g) | |
BaseRemoteGDB::BaseRemoteGDB (System *system, ThreadContext *context, int _port) | |
Interface to other parts of the simulator. More... | |
virtual | BaseRemoteGDB::~BaseRemoteGDB () |
std::string | BaseRemoteGDB::name () |
void | BaseRemoteGDB::listen () |
void | BaseRemoteGDB::connect () |
int | BaseRemoteGDB::port () const |
void | BaseRemoteGDB::attach (int fd) |
void | BaseRemoteGDB::detach () |
bool | BaseRemoteGDB::isAttached () |
void | BaseRemoteGDB::replaceThreadContext (ThreadContext *_tc) |
bool | BaseRemoteGDB::trap (int type) |
bool | BaseRemoteGDB::breakpoint () |
These methods relate to the BaseRemoteGDB and BaseGdbRegCache interfaces.
void BaseRemoteGDB::attach | ( | int | fd | ) |
Definition at line 378 of file remote_gdb.cc.
References BaseRemoteGDB::attached, BaseRemoteGDB::dataEvent, DPRINTFN, ArmISA::f, BaseRemoteGDB::fd, pollQueue, and PollQueue::schedule().
Referenced by BaseRemoteGDB::connect().
|
inline |
Definition at line 121 of file remote_gdb.hh.
BaseRemoteGDB::BaseRemoteGDB | ( | System * | system, |
ThreadContext * | context, | ||
int | _port | ||
) |
Interface to other parts of the simulator.
Definition at line 313 of file remote_gdb.cc.
References debuggers.
|
inline |
Definition at line 160 of file remote_gdb.hh.
References BaseRemoteGDB::trap().
void BaseRemoteGDB::connect | ( | ) |
Definition at line 354 of file remote_gdb.cc.
References ListenSocket::accept(), BaseRemoteGDB::attach(), BaseRemoteGDB::isAttached(), ListenSocket::islistening(), BaseRemoteGDB::listener, and panic_if.
Referenced by BaseRemoteGDB::connectWrapper().
|
pure virtual |
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.
Implemented in RiscvISA::RemoteGDB::RiscvGdbRegCache, X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, ArmISA::RemoteGDB::AArch32GdbRegCache, MipsISA::RemoteGDB::MipsGdbRegCache, SparcISA::RemoteGDB::SPARCGdbRegCache, and PowerISA::RemoteGDB::PowerGdbRegCache.
Referenced by BaseRemoteGDB::cmd_reg_r(), and BaseRemoteGDB::cmd_reg_w().
void BaseRemoteGDB::detach | ( | ) |
Definition at line 390 of file remote_gdb.cc.
References BaseRemoteGDB::active, BaseRemoteGDB::attached, BaseRemoteGDB::clearSingleStep(), BaseRemoteGDB::dataEvent, DPRINTFN, BaseRemoteGDB::fd, pollQueue, and PollQueue::remove().
Referenced by BaseRemoteGDB::cmd_detach(), BaseRemoteGDB::incomingData(), and BaseRemoteGDB::trap().
|
pure virtual |
Fill the raw buffer from the registers in the ThreadContext.
Implemented in RiscvISA::RemoteGDB::RiscvGdbRegCache, X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, ArmISA::RemoteGDB::AArch32GdbRegCache, MipsISA::RemoteGDB::MipsGdbRegCache, SparcISA::RemoteGDB::SPARCGdbRegCache, and PowerISA::RemoteGDB::PowerGdbRegCache.
Referenced by BaseRemoteGDB::trap().
|
inline |
Definition at line 155 of file remote_gdb.hh.
References BaseRemoteGDB::attached.
Referenced by BaseRemoteGDB::connect().
void BaseRemoteGDB::listen | ( | ) |
Definition at line 334 of file remote_gdb.cc.
References BaseRemoteGDB::_port, ListenSocket::allDisabled(), ccprintf(), BaseRemoteGDB::connectEvent, curTick(), DPRINTF, ListenSocket::getfd(), ListenSocket::listen(), BaseRemoteGDB::listener, BaseRemoteGDB::name(), pollQueue, PollQueue::schedule(), and warn_once.
std::string BaseRemoteGDB::name | ( | ) |
Definition at line 328 of file remote_gdb.cc.
References SimObject::name(), and BaseRemoteGDB::sys.
Referenced by BaseRemoteGDB::listen(), PowerISA::RemoteGDB::PowerGdbRegCache::name(), SparcISA::RemoteGDB::SPARCGdbRegCache::name(), MipsISA::RemoteGDB::MipsGdbRegCache::name(), ArmISA::RemoteGDB::AArch32GdbRegCache::name(), X86ISA::RemoteGDB::X86GdbRegCache::name(), SparcISA::RemoteGDB::SPARC64GdbRegCache::name(), ArmISA::RemoteGDB::AArch64GdbRegCache::name(), X86ISA::RemoteGDB::AMD64GdbRegCache::name(), RiscvISA::RemoteGDB::RiscvGdbRegCache::name(), and HardBreakpoint::name().
|
pure virtual |
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.
Implemented in RiscvISA::RemoteGDB::RiscvGdbRegCache, X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, ArmISA::RemoteGDB::AArch32GdbRegCache, MipsISA::RemoteGDB::MipsGdbRegCache, SparcISA::RemoteGDB::SPARCGdbRegCache, and PowerISA::RemoteGDB::PowerGdbRegCache.
int BaseRemoteGDB::port | ( | ) | const |
Definition at line 370 of file remote_gdb.cc.
References BaseRemoteGDB::_port, ListenSocket::islistening(), BaseRemoteGDB::listener, and panic_if.
|
inline |
Definition at line 157 of file remote_gdb.hh.
References BaseRemoteGDB::tc.
|
pure virtual |
Set the ThreadContext's registers from the values in the raw buffer.
Implemented in RiscvISA::RemoteGDB::RiscvGdbRegCache, X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, ArmISA::RemoteGDB::AArch32GdbRegCache, MipsISA::RemoteGDB::MipsGdbRegCache, SparcISA::RemoteGDB::SPARCGdbRegCache, and PowerISA::RemoteGDB::PowerGdbRegCache.
Referenced by BaseRemoteGDB::cmd_reg_w().
|
pure virtual |
Return the size of the raw buffer, in bytes (i.e., half of the number of digits in the g/G packet).
Implemented in RiscvISA::RemoteGDB::RiscvGdbRegCache, X86ISA::RemoteGDB::AMD64GdbRegCache, ArmISA::RemoteGDB::AArch64GdbRegCache, SparcISA::RemoteGDB::SPARC64GdbRegCache, X86ISA::RemoteGDB::X86GdbRegCache, ArmISA::RemoteGDB::AArch32GdbRegCache, MipsISA::RemoteGDB::MipsGdbRegCache, SparcISA::RemoteGDB::SPARCGdbRegCache, and PowerISA::RemoteGDB::PowerGdbRegCache.
Referenced by BaseRemoteGDB::cmd_reg_r(), and BaseRemoteGDB::cmd_reg_w().
bool BaseRemoteGDB::trap | ( | int | type | ) |
Definition at line 408 of file remote_gdb.cc.
References BaseRemoteGDB::active, BaseRemoteGDB::attached, BaseRemoteGDB::clearSingleStep(), BaseRemoteGDB::GdbCommand::Context::cmd, BaseRemoteGDB::GdbCommand::Context::cmd_byte, BaseRemoteGDB::command_map, csprintf(), data, BaseRemoteGDB::GdbCommand::Context::data, BaseRemoteGDB::detach(), DPRINTF, ArmISA::e, BaseRemoteGDB::GdbCommand::func, BaseRemoteGDB::gdbRegs(), BaseGdbRegCache::getRegs(), BaseRemoteGDB::GdbCommand::Context::len, panic, ThreadContext::pcState(), BaseRemoteGDB::recv(), BaseRemoteGDB::regCachePtr, BaseRemoteGDB::send(), BaseRemoteGDB::tc, BaseRemoteGDB::GdbCommand::Context::type, X86ISA::type, and warn.
Referenced by BaseRemoteGDB::breakpoint(), HardBreakpoint::process(), BaseRemoteGDB::TrapEvent::process(), and BaseRemoteGDB::singleStep().
|
virtual |