Go to the documentation of this file.
42 #ifndef __REMOTE_GDB_HH__
43 #define __REMOTE_GDB_HH__
45 #include <sys/signal.h>
96 virtual char *
data()
const = 0;
104 virtual size_t size()
const = 0;
129 virtual const std::string
name()
const = 0;
178 template <
class GDBStub,
class ...Args>
184 return new GDBStub(args...,
port);
207 template <
void (BaseRemoteGDB::*F)(
int revent)>
221 typedef SocketEvent<&BaseRemoteGDB::incomingConnection>
246 template <
typename ...Args>
384 static std::map<std::string, QuerySetCommand>
queryMap;
399 std::string &encoded)
const;
402 std::string &encoded,
size_t offset,
size_t unencoded_length)
const;
431 read(
addr,
sizeof(T), (
char *)&temp);
void incomingData(int revent)
void queryXfer(QuerySetCommand::Context &ctx)
bool cmdUnsupported(GdbCommand::Context &ctx)
bool cmdDumpPageTable(GdbCommand::Context &ctx)
Bitfield< 31, 29 > format
bool cmdSetThread(GdbCommand::Context &ctx)
void insertSoftBreak(Addr addr, size_t kind)
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::connect > connectEvent
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::singleStep > singleStepEvent
virtual BaseGdbRegCache * gdbRegs()=0
bool cmdRegR(GdbCommand::Context &ctx)
static void output(const char *filename)
void encodeBinaryData(const std::string &unencoded, std::string &encoded) const
bool(BaseRemoteGDB::* Func)(Context &ctx)
static BaseRemoteGDB * build(Args... args)
virtual const std::string name() const =0
Return the name to use in places like DPRINTF.
void scheduleInstCommitEvent(Event *ev, int delta)
Schedule an event which will be triggered "delta" instructions later.
void removeHardBreak(Addr addr, size_t kind)
static std::map< char, GdbCommand > commandMap
void queryC(QuerySetCommand::Context &ctx)
void insertHardBreak(Addr addr, size_t kind)
virtual bool acc(Addr addr, size_t len)=0
void send(const char *format, const Args &...args)
std::string csprintf(const char *format, const Args &...args)
bool cmdMemW(GdbCommand::Context &ctx)
bool cmdStep(GdbCommand::Context &ctx)
Concrete subclasses of this abstract class represent how the register values are transmitted on the w...
BaseRemoteGDB(System *system, int _port)
Interface to other parts of the simulator.
friend IncomingConnectionEvent
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.
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).
virtual char * data() const =0
Return the pointer to the raw bytes buffer containing the register values.
void send(const std::string &data)
void querySupported(QuerySetCommand::Context &ctx)
gem5::BaseRemoteGDB::TrapEvent trapEvent
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.
bool write(Addr addr, size_t size, const char *data)
void removeSoftBreak(Addr addr, size_t kind)
SocketEvent<&BaseRemoteGDB::incomingData > IncomingDataEvent
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::detach > disconnectEvent
SocketEvent<&BaseRemoteGDB::incomingConnection > IncomingConnectionEvent
QuerySetCommand(Func _func, const char *_argSep=nullptr)
BaseGdbRegCache * regCachePtr
void processCommands(int signum=0)
bool selectThreadContext(ContextID id)
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)
bool read(Addr addr, size_t size, char *data)
void descheduleInstCommitEvent(Event *ev)
Deschedule an instruction count based event.
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 incomingConnection(int revent)
SocketEvent(BaseRemoteGDB *gdb, int fd, int e)
void queryFThreadInfo(QuerySetCommand::Context &ctx)
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 cmdAsyncStep(GdbCommand::Context &ctx)
bool cmdQueryVar(GdbCommand::Context &ctx)
void(BaseRemoteGDB::*)(Context &ctx) Func
virtual ~BaseGdbRegCache()
bool trap(ContextID id, int type)
TrapEvent(BaseRemoteGDB *g)
void querySThreadInfo(QuerySetCommand::Context &ctx)
virtual bool checkBpKind(size_t kind)
Generated on Thu Jun 16 2022 10:41:41 for gem5 by doxygen 1.8.17