Go to the documentation of this file.
42 #ifndef __REMOTE_GDB_HH__
43 #define __REMOTE_GDB_HH__
58 #include "gdbremote/signals.hh"
96 virtual char *
data()
const = 0;
104 virtual size_t size()
const = 0;
129 virtual const std::string
name()
const = 0;
174 void trap(
ContextID id, GDBSignal sig,
const std::string& stopReason=
"");
178 std::string stopReason);
181 template <
class GDBStub,
class ...Args>
186 return new GDBStub(args..., listen_config);
209 template <
void (BaseRemoteGDB::*F)(
int revent)>
223 typedef SocketEvent<&BaseRemoteGDB::incomingConnection>
248 template <
typename ...Args>
330 const std::string& stopReason);
429 static std::map<std::string, QuerySetCommand>
queryMap;
447 std::string &encoded)
const;
450 std::string &encoded,
size_t offset,
size_t unencoded_length)
const;
479 read(
addr,
sizeof(T), (
char *)&temp);
void incomingData(int revent)
const ListenSocket & hostSocket() const
bool cmdUnsupported(GdbCommand::Context &ctx)
bool sendMessage(std::string message)
bool cmdVKill(GdbMultiLetterCommand::Context &ctx)
void scheduleTrapEvent(ContextID id, GDBSignal type, int delta, std::string stopReason)
GdbMultiLetterCommand(const char *_name, Func _func)
static std::map< std::string, GdbMultiLetterCommand > multiLetterMap
bool cmdDumpPageTable(GdbCommand::Context &ctx)
Bitfield< 31, 29 > format
bool cmdMultiLetter(GdbCommand::Context &ctx)
bool cmdSetThread(GdbCommand::Context &ctx)
void sendOPacket(const std::string message)
bool querySymbol(QuerySetCommand::Context &ctx)
bool cmdMultiUnsupported(GdbMultiLetterCommand::Context &ctx)
void insertSoftBreak(Addr addr, size_t kind)
virtual BaseGdbRegCache * gdbRegs()=0
bool cmdRegR(GdbCommand::Context &ctx)
static void output(const char *filename)
bool cmdIsThreadAlive(GdbCommand::Context &ctx)
void encodeBinaryData(const std::string &unencoded, std::string &encoded) const
bool(BaseRemoteGDB::* Func)(Context &ctx)
virtual const std::string name() const =0
Return the name to use in places like DPRINTF.
void scheduleInstCommitEvent(Event *ev, int delta, ThreadContext *_tc)
Schedule an event which will be triggered "delta" instructions later.
void scheduleInstCommitEvent(Event *ev, int delta)
void removeHardBreak(Addr addr, size_t kind)
static std::map< char, GdbCommand > commandMap
void insertHardBreak(Addr addr, size_t kind)
virtual bool acc(Addr addr, size_t len)=0
bool read(Addr vaddr, size_t size, char *data)
void send(const char *format, const Args &...args)
MemberEventWrapper<&BaseRemoteGDB::singleStep > singleStepEvent
std::string csprintf(const char *format, const Args &...args)
MemberEventWrapper<&BaseRemoteGDB::connect > connectEvent
bool cmdMemW(GdbCommand::Context &ctx)
bool cmdStep(GdbCommand::Context &ctx)
void stopReason(std::string s)
Concrete subclasses of this abstract class represent how the register values are transmitted on the w...
void sendTPacket(GDBSignal sig, ContextID id, const std::string &stopReason)
friend IncomingConnectionEvent
bool queryXfer(QuerySetCommand::Context &ctx)
BaseRemoteGDB(System *system, ListenSocketConfig _listen_config)
Interface to other parts of the simulator.
bool queryC(QuerySetCommand::Context &ctx)
bool queryRcmd(QuerySetCommand::Context &ctx)
virtual void getRegs(ThreadContext *)=0
Fill the raw buffer from the registers in the ThreadContext.
GdbCommand(const char *_name, Func _func)
IncomingDataEvent * incomingDataEvent
void encodeXferResponse(const std::string &unencoded, std::string &encoded, size_t offset, size_t unencoded_length) const
virtual std::vector< std::string > availableFeatures() const
IncomingConnectionEvent * incomingConnectionEvent
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual bool writeBlob(Addr vaddr, size_t size, const char *data)
const GdbMultiLetterCommand * cmd
bool cmdSignal(GdbCommand::Context &ctx)
bool cmdAsyncCont(GdbCommand::Context &ctx)
virtual size_t 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).
bool queryAttached(QuerySetCommand::Context &ctx)
virtual char * data() const =0
Return the pointer to the raw bytes buffer containing the register values.
void send(const std::string &data)
bool querySupported(QuerySetCommand::Context &ctx)
gem5::BaseRemoteGDB::TrapEvent trapEvent
bool querySThreadInfo(QuerySetCommand::Context &ctx)
void replaceThreadContext(ThreadContext *tc)
bool cmdRegW(GdbCommand::Context &ctx)
BaseGdbRegCache(BaseRemoteGDB *g)
virtual bool getXferFeaturesRead(const std::string &annex, std::string &output)
Get an XML target description.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void removeSoftBreak(Addr addr, size_t kind)
SocketEvent<&BaseRemoteGDB::incomingData > IncomingDataEvent
bool write(Addr vaddr, size_t size, const char *data)
bool queryFThreadInfo(QuerySetCommand::Context &ctx)
SocketEvent<&BaseRemoteGDB::incomingConnection > IncomingConnectionEvent
QuerySetCommand(Func _func, const char *_argSep=nullptr)
BaseGdbRegCache * regCachePtr
bool(BaseRemoteGDB::* Func)(Context &ctx)
MemberEventWrapper<&BaseRemoteGDB::detach > disconnectEvent
void processCommands(GDBSignal sig=GDBSignal::ZERO)
bool selectThreadContext(ContextID id)
bool trap(ContextID id, int type)
bool cmdClrHwBkpt(GdbCommand::Context &ctx)
bool cmdSetHwBkpt(GdbCommand::Context &ctx)
virtual void setRegs(ThreadContext *) const =0
Set the ThreadContext's registers from the values in the raw buffer.
void send(const char *data)
void descheduleInstCommitEvent(Event *ev)
Deschedule an instruction count based event.
bool cmdReplyEmpty(GdbMultiLetterCommand::Context &ctx)
static std::map< std::string, QuerySetCommand > queryMap
void recv(std::vector< char > &bp)
bool cmdDetach(GdbCommand::Context &ctx)
int ContextID
Globally unique thread context ID.
void addThreadContext(ThreadContext *_tc)
std::vector< std::string > args
bool cmdMemR(GdbCommand::Context &ctx)
ThreadContext * context()
Context(const std::string &_name)
void sendSPacket(GDBSignal sig)
void incomingConnection(int revent)
SocketEvent(BaseRemoteGDB *gdb, int fd, int e)
static BaseRemoteGDB * build(ListenSocketConfig listen_config, Args... args)
bool cmdCont(GdbCommand::Context &ctx)
std::map< ContextID, ThreadContext * > threads
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
bool try_getbyte(uint8_t *c, int timeout=-1)
virtual bool readBlob(Addr vaddr, size_t size, char *data)
bool cmdAsyncStep(GdbCommand::Context &ctx)
bool cmdQueryVar(GdbCommand::Context &ctx)
virtual ~BaseGdbRegCache()
TrapEvent(BaseRemoteGDB *g)
bool(BaseRemoteGDB::*)(Context &ctx) Func
std::unique_ptr< ListenSocket > ListenSocketPtr
virtual bool checkBpKind(size_t kind)
Generated on Sun Jul 30 2023 01:56:47 for gem5 by doxygen 1.8.17