gem5
v20.1.0.0
|
#include <remote_gdb.hh>
Classes | |
struct | GdbCommand |
class | SocketEvent |
class | TrapEvent |
Public Member Functions | |
bool | breakpoint () |
void | replaceThreadContext (ThreadContext *tc) |
virtual | ~BaseRemoteGDB () |
BaseRemoteGDB (System *system, ThreadContext *context, int _port) | |
Interface to other parts of the simulator. More... | |
virtual | ~BaseRemoteGDB () |
std::string | name () |
void | listen () |
void | connect () |
int | port () const |
void | attach (int fd) |
void | detach () |
bool | isAttached () |
void | replaceThreadContext (ThreadContext *_tc) |
bool | trap (int type) |
bool | breakpoint () |
Protected Member Functions | |
ThreadContext * | context () |
System * | system () |
void | encodeBinaryData (const std::string &unencoded, std::string &encoded) const |
void | encodeXferResponse (const std::string &unencoded, std::string &encoded, size_t offset, size_t unencoded_length) const |
virtual bool | checkBpLen (size_t len) |
virtual BaseGdbRegCache * | gdbRegs ()=0 |
virtual bool | acc (Addr addr, size_t len)=0 |
virtual std::vector< std::string > | availableFeatures () const |
virtual bool | getXferFeaturesRead (const std::string &annex, std::string &output) |
Get an XML target description. More... | |
Private Types | |
typedef SocketEvent<&BaseRemoteGDB::connectWrapper > | ConnectEvent |
typedef SocketEvent<&BaseRemoteGDB::incomingData > | DataEvent |
Private Attributes | |
friend | ConnectEvent |
friend | DataEvent |
ConnectEvent * | connectEvent |
DataEvent * | dataEvent |
ListenSocket | listener |
int | _port |
int | fd |
bool | active |
bool | attached |
System * | sys |
ThreadContext * | tc |
BaseGdbRegCache * | regCachePtr |
BaseRemoteGDB::TrapEvent | trapEvent |
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::singleStep > | singleStepEvent |
Static Private Attributes | |
static std::map< char, GdbCommand > | command_map |
Friends | |
class | HardBreakpoint |
Definition at line 43 of file remote_gdb.hh.
|
private |
Definition at line 183 of file remote_gdb.hh.
|
private |
Definition at line 184 of file remote_gdb.hh.
|
inlinevirtual |
Definition at line 51 of file remote_gdb.hh.
|
protectedpure virtual |
Implemented in RiscvISA::RemoteGDB, ArmISA::RemoteGDB, X86ISA::RemoteGDB, MipsISA::RemoteGDB, PowerISA::RemoteGDB, and SparcISA::RemoteGDB.
Referenced by cmd_mem_r(), and cmd_mem_w().
|
protectedvirtual |
Reimplemented in ArmISA::RemoteGDB, MipsISA::RemoteGDB, and PowerISA::RemoteGDB.
Definition at line 986 of file remote_gdb.cc.
Referenced by cmd_query_var().
|
inline |
Definition at line 48 of file remote_gdb.hh.
Referenced by System::breakpoint().
|
protectedvirtual |
Reimplemented in RiscvISA::RemoteGDB, and X86ISA::RemoteGDB.
Definition at line 805 of file remote_gdb.cc.
References ArmISA::len.
Referenced by insertHardBreak(), insertSoftBreak(), removeHardBreak(), and removeSoftBreak().
|
private |
Definition at line 653 of file remote_gdb.cc.
References descheduleInstCommitEvent(), and singleStepEvent.
Referenced by cmd_async_cont(), cmd_cont(), detach(), and trap().
|
private |
Definition at line 718 of file remote_gdb.cc.
References DPRINTF, and removeHardBreak().
|
private |
Definition at line 839 of file remote_gdb.cc.
References clearSingleStep(), BaseRemoteGDB::GdbCommand::Context::data, MipsISA::p, ThreadContext::pcState(), and tc.
|
private |
Definition at line 1024 of file remote_gdb.cc.
References BaseRemoteGDB::GdbCommand::Context::data, MipsISA::p, ThreadContext::pcState(), setSingleStep(), and tc.
|
private |
Definition at line 1049 of file remote_gdb.cc.
References addr, BaseRemoteGDB::GdbCommand::Context::data, DPRINTF, ArmISA::len, MipsISA::p, removeHardBreak(), removeSoftBreak(), and send().
|
private |
Definition at line 827 of file remote_gdb.cc.
References clearSingleStep(), BaseRemoteGDB::GdbCommand::Context::data, BaseRemoteGDB::GdbCommand::Context::len, MipsISA::p, ThreadContext::pcState(), and tc.
|
private |
Definition at line 852 of file remote_gdb.cc.
References detach().
|
private |
Definition at line 893 of file remote_gdb.cc.
References acc(), addr, BaseRemoteGDB::GdbCommand::Context::data, ArmISA::len, MipsISA::p, read(), and send().
|
private |
Definition at line 917 of file remote_gdb.cc.
References acc(), addr, BaseRemoteGDB::GdbCommand::Context::data, BaseRemoteGDB::GdbCommand::Context::len, ArmISA::len, MipsISA::p, send(), and write().
|
private |
Definition at line 941 of file remote_gdb.cc.
References availableFeatures(), BaseRemoteGDB::GdbCommand::Context::data, ArmISA::e, encodeXferResponse(), getXferFeaturesRead(), BaseRemoteGDB::GdbCommand::Context::len, length, ArmISA::offset, ArmISA::s, and send().
|
private |
Definition at line 859 of file remote_gdb.cc.
References BaseGdbRegCache::data(), regCachePtr, send(), and BaseGdbRegCache::size().
|
private |
Definition at line 869 of file remote_gdb.cc.
References BaseGdbRegCache::data(), BaseRemoteGDB::GdbCommand::Context::data, MipsISA::p, regCachePtr, send(), BaseGdbRegCache::setRegs(), BaseGdbRegCache::size(), and tc.
|
private |
Definition at line 1082 of file remote_gdb.cc.
References addr, BaseRemoteGDB::GdbCommand::Context::data, DPRINTF, insertHardBreak(), insertSoftBreak(), ArmISA::len, MipsISA::p, and send().
|
private |
Definition at line 883 of file remote_gdb.cc.
References BaseRemoteGDB::GdbCommand::Context::data, MipsISA::p, and send().
|
private |
Definition at line 820 of file remote_gdb.cc.
References csprintf(), send(), and BaseRemoteGDB::GdbCommand::Context::type.
|
private |
Definition at line 1037 of file remote_gdb.cc.
References BaseRemoteGDB::GdbCommand::Context::data, BaseRemoteGDB::GdbCommand::Context::len, MipsISA::p, ThreadContext::pcState(), setSingleStep(), and tc.
|
private |
Definition at line 811 of file remote_gdb.cc.
References BaseRemoteGDB::GdbCommand::Context::cmd, BaseRemoteGDB::GdbCommand::Context::data, DDUMP, DPRINTF, BaseRemoteGDB::GdbCommand::Context::len, and BaseRemoteGDB::GdbCommand::name.
|
inlineprivate |
Definition at line 167 of file remote_gdb.hh.
References connect().
|
inlineprotected |
Definition at line 304 of file remote_gdb.hh.
References tc.
Referenced by PowerISA::RemoteGDB::acc(), SparcISA::RemoteGDB::acc(), MipsISA::RemoteGDB::acc(), RiscvISA::RemoteGDB::acc(), X86ISA::RemoteGDB::acc(), ArmISA::RemoteGDB::acc(), SparcISA::RemoteGDB::gdbRegs(), ArmISA::RemoteGDB::gdbRegs(), X86ISA::RemoteGDB::gdbRegs(), PowerISA::RemoteGDB::PowerGdbRegCache::getRegs(), SparcISA::RemoteGDB::SPARCGdbRegCache::getRegs(), RiscvISA::RemoteGDB::RiscvGdbRegCache::getRegs(), MipsISA::RemoteGDB::MipsGdbRegCache::getRegs(), ArmISA::RemoteGDB::AArch32GdbRegCache::getRegs(), X86ISA::RemoteGDB::X86GdbRegCache::getRegs(), SparcISA::RemoteGDB::SPARC64GdbRegCache::getRegs(), ArmISA::RemoteGDB::AArch64GdbRegCache::getRegs(), X86ISA::RemoteGDB::AMD64GdbRegCache::getRegs(), ArmISA::RemoteGDB::getXferFeaturesRead(), PowerISA::RemoteGDB::PowerGdbRegCache::setRegs(), RiscvISA::RemoteGDB::RiscvGdbRegCache::setRegs(), SparcISA::RemoteGDB::SPARCGdbRegCache::setRegs(), MipsISA::RemoteGDB::MipsGdbRegCache::setRegs(), ArmISA::RemoteGDB::AArch32GdbRegCache::setRegs(), X86ISA::RemoteGDB::X86GdbRegCache::setRegs(), SparcISA::RemoteGDB::SPARC64GdbRegCache::setRegs(), ArmISA::RemoteGDB::AArch64GdbRegCache::setRegs(), and X86ISA::RemoteGDB::AMD64GdbRegCache::setRegs().
|
private |
Deschedule an instruction count based event.
Definition at line 741 of file remote_gdb.cc.
References ThreadContext::descheduleInstCountEvent(), Event::scheduled(), and tc.
Referenced by clearSingleStep(), and incomingData().
|
protected |
Definition at line 999 of file remote_gdb.cc.
References ArmISA::c.
Referenced by encodeXferResponse().
|
protected |
Definition at line 1013 of file remote_gdb.cc.
References encodeBinaryData(), and ArmISA::offset.
Referenced by cmd_query_var().
|
protectedpure virtual |
Implemented in RiscvISA::RemoteGDB, X86ISA::RemoteGDB, ArmISA::RemoteGDB, SparcISA::RemoteGDB, MipsISA::RemoteGDB, and PowerISA::RemoteGDB.
Referenced by trap().
|
private |
|
protectedvirtual |
Get an XML target description.
[in] | annex | the XML filename |
[out] | output | set to the decoded XML |
Reimplemented in ArmISA::RemoteGDB, MipsISA::RemoteGDB, and PowerISA::RemoteGDB.
Definition at line 992 of file remote_gdb.cc.
Referenced by cmd_query_var().
|
private |
Definition at line 486 of file remote_gdb.cc.
References descheduleInstCommitEvent(), detach(), Event::scheduled(), scheduleInstCommitEvent(), trapEvent, BaseRemoteGDB::TrapEvent::type(), and warn.
|
private |
Definition at line 684 of file remote_gdb.cc.
References addr, checkBpLen(), DPRINTF, HardBreakpoint, ArmISA::len, HardBreakpoint::refcount, and sys.
Referenced by cmd_set_hw_bkpt(), insertSoftBreak(), and setTempBreakpoint().
|
private |
Definition at line 666 of file remote_gdb.cc.
References addr, checkBpLen(), insertHardBreak(), and ArmISA::len.
Referenced by cmd_set_hw_bkpt().
|
private |
|
inlineprivate |
Definition at line 335 of file remote_gdb.hh.
|
private |
Definition at line 604 of file remote_gdb.cc.
References data, DPRINTF, DPRINTFNR, DTRACE, ThreadContext::getVirtProxy(), PortProxy::readBlob(), tc, and MipsISA::vaddr.
Referenced by cmd_mem_r(), getbyte(), and read().
|
private |
|
private |
Definition at line 699 of file remote_gdb.cc.
References addr, checkBpLen(), DPRINTF, ArmISA::i, ArmISA::len, and HardBreakpoint::refcount.
Referenced by clearTempBreakpoint(), cmd_clr_hw_bkpt(), and removeSoftBreak().
|
private |
Definition at line 675 of file remote_gdb.cc.
References addr, checkBpLen(), ArmISA::len, and removeHardBreak().
Referenced by cmd_clr_hw_bkpt().
|
inline |
Definition at line 49 of file remote_gdb.hh.
|
private |
Schedule an event which will be triggered "delta" instructions later.
Definition at line 733 of file remote_gdb.cc.
References ThreadContext::getCurrentInstCount(), ThreadContext::scheduleInstCountEvent(), and tc.
Referenced by incomingData(), setSingleStep(), and singleStep().
|
private |
Definition at line 575 of file remote_gdb.cc.
References ArmISA::c, DPRINTF, GDBBadP, GDBEnd, GDBStart, getbyte(), MipsISA::p, and putbyte().
Referenced by cmd_clr_hw_bkpt(), cmd_mem_r(), cmd_mem_w(), cmd_query_var(), cmd_reg_r(), cmd_reg_w(), cmd_set_hw_bkpt(), cmd_set_thread(), cmd_signal(), and trap().
|
private |
Definition at line 659 of file remote_gdb.cc.
References Event::scheduled(), scheduleInstCommitEvent(), and singleStepEvent.
Referenced by cmd_async_step(), and cmd_step().
|
private |
Definition at line 726 of file remote_gdb.cc.
References DPRINTF, and insertHardBreak().
|
private |
Definition at line 645 of file remote_gdb.cc.
References Event::scheduled(), scheduleInstCommitEvent(), singleStepEvent, and trap().
|
inlineprotected |
Definition at line 305 of file remote_gdb.hh.
References sys.
|
private |
Definition at line 627 of file remote_gdb.cc.
References data, DPRINTFN, DPRINTFNR, DTRACE, ThreadContext::getVirtProxy(), tc, MipsISA::vaddr, and PortProxy::writeBlob().
Referenced by cmd_mem_w(), putbyte(), and write().
|
inlineprivate |
Definition at line 344 of file remote_gdb.hh.
|
friend |
Definition at line 130 of file remote_gdb.hh.
Referenced by insertHardBreak().
|
private |
Definition at line 193 of file remote_gdb.hh.
|
private |
Definition at line 208 of file remote_gdb.hh.
|
private |
Definition at line 209 of file remote_gdb.hh.
Referenced by attach(), detach(), isAttached(), and trap().
|
staticprivate |
Definition at line 284 of file remote_gdb.hh.
Referenced by trap().
|
private |
Definition at line 186 of file remote_gdb.hh.
|
private |
Definition at line 189 of file remote_gdb.hh.
Referenced by listen().
|
private |
Definition at line 187 of file remote_gdb.hh.
|
private |
Definition at line 190 of file remote_gdb.hh.
|
private |
|
private |
Definition at line 192 of file remote_gdb.hh.
|
private |
Definition at line 214 of file remote_gdb.hh.
Referenced by cmd_reg_r(), cmd_reg_w(), and trap().
|
private |
Definition at line 242 of file remote_gdb.hh.
Referenced by clearSingleStep(), setSingleStep(), and singleStep().
|
private |
Definition at line 211 of file remote_gdb.hh.
Referenced by insertHardBreak(), name(), and system().
|
private |
Definition at line 212 of file remote_gdb.hh.
Referenced by cmd_async_cont(), cmd_async_step(), cmd_cont(), cmd_reg_w(), cmd_step(), context(), descheduleInstCommitEvent(), HardBreakpoint::process(), read(), replaceThreadContext(), scheduleInstCommitEvent(), trap(), and write().
|
private |
Referenced by incomingData().