Go to the documentation of this file.
42 #ifndef __REMOTE_GDB_HH__
43 #define __REMOTE_GDB_HH__
45 #include <sys/signal.h>
53 #include "arch/pcstate.hh"
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);
196 template <
void (BaseRemoteGDB::*F)(
int revent)>
233 template <
typename ...Args>
361 static std::map<std::string, QuerySetCommand>
queryMap;
376 std::string &encoded)
const;
379 std::string &encoded,
size_t offset,
size_t unencoded_length)
const;
406 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 len)
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.
static std::map< char, GdbCommand > commandMap
void queryC(QuerySetCommand::Context &ctx)
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)
SocketEvent<&BaseRemoteGDB::incomingData > DataEvent
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.
virtual void getRegs(ThreadContext *)=0
Fill the raw buffer from the registers in the ThreadContext.
GdbCommand(const char *_name, Func _func)
void removeHardBreak(Addr addr, size_t len)
void encodeXferResponse(const std::string &unencoded, std::string &encoded, size_t offset, size_t unencoded_length) const
virtual std::vector< std::string > availableFeatures() const
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void removeSoftBreak(Addr addr, size_t len)
bool cmdSignal(GdbCommand::Context &ctx)
void connectWrapper(int revent)
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)
QuerySetCommand(Func _func, const char *_argSep=nullptr)
SocketEvent<&BaseRemoteGDB::connectWrapper > ConnectEvent
BaseGdbRegCache * regCachePtr
bool selectThreadContext(ContextID id)
bool trap(ContextID id, int type)
bool cmdClrHwBkpt(GdbCommand::Context &ctx)
bool cmdSetHwBkpt(GdbCommand::Context &ctx)
ConnectEvent * connectEvent
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
virtual bool checkBpLen(size_t len)
bool cmdMemR(GdbCommand::Context &ctx)
ThreadContext * context()
Context(const std::string &_name)
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....
void insertHardBreak(Addr addr, size_t len)
bool cmdAsyncStep(GdbCommand::Context &ctx)
bool cmdQueryVar(GdbCommand::Context &ctx)
void(BaseRemoteGDB::*)(Context &ctx) Func
virtual ~BaseGdbRegCache()
TrapEvent(BaseRemoteGDB *g)
void querySThreadInfo(QuerySetCommand::Context &ctx)
Generated on Wed Jul 28 2021 12:10:21 for gem5 by doxygen 1.8.17