gem5  v22.0.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
remote_gdb.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 ARM Limited
3  *
4  * The license below extends only to copyright in the software and shall
5  * not be construed as granting a license to any other intellectual
6  * property including but not limited to intellectual property relating
7  * to a hardware implementation of the functionality of the software
8  * licensed hereunder. You may use the software subject to the license
9  * terms below provided that you ensure that this notice is replicated
10  * unmodified and in its entirety in all distributions of the software,
11  * modified or unmodified, in source code or in binary form.
12  *
13  * Copyright 2015, 2021 LabWare
14  * Copyright 2014 Google, Inc.
15  * Copyright (c) 2002-2005 The Regents of The University of Michigan
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
42 #ifndef __REMOTE_GDB_HH__
43 #define __REMOTE_GDB_HH__
44 
45 #include <sys/signal.h>
46 
47 #include <cstdint>
48 #include <exception>
49 #include <map>
50 #include <string>
51 #include <vector>
52 
53 #include "arch/generic/pcstate.hh"
54 #include "base/cprintf.hh"
55 #include "base/pollevent.hh"
56 #include "base/socket.hh"
57 #include "base/types.hh"
58 #include "cpu/pc_event.hh"
59 #include "sim/debug.hh"
60 #include "sim/eventq.hh"
61 
62 /*
63  * This file implements a client for the GDB remote serial protocol as
64  * described in this official documentation:
65  *
66  * https://sourceware.org/gdb/current/onlinedocs/gdb/Remote-Protocol.html
67  */
68 
69 namespace gem5
70 {
71 
72 class System;
73 class ThreadContext;
74 
75 class BaseRemoteGDB;
76 class HardBreakpoint;
77 
86 {
87  public:
88 
96  virtual char *data() const = 0;
97 
104  virtual size_t size() const = 0;
105 
111  virtual void getRegs(ThreadContext*) = 0;
112 
119  virtual void setRegs(ThreadContext*) const = 0;
120 
129  virtual const std::string name() const = 0;
130 
135  {}
137  {}
138 
139  protected:
141 };
142 
143 class BaseRemoteGDB
144 {
145  friend class HardBreakpoint;
146  public:
147 
157  virtual ~BaseRemoteGDB();
158 
159  std::string name();
160 
161  void listen();
162  void connect();
163 
164  int port() const;
165 
166  void attach(int fd);
167  void detach();
168  bool isAttached() { return attached; }
169 
170  void addThreadContext(ThreadContext *_tc);
173 
174  void trap(ContextID id, int signum);
175  // end of api_remote_gdb
177 
178  template <class GDBStub, class ...Args>
179  static BaseRemoteGDB *
180  build(Args... args)
181  {
182  int port = getRemoteGDBPort();
183  if (port)
184  return new GDBStub(args..., port);
185  else
186  return nullptr;
187  }
188 
189  private:
190  /*
191  * Connection to the external GDB.
192  */
193 
194  /*
195  * Asynchronous socket events and event handlers.
196  *
197  * These events occur asynchronously and are handled asynchronously
198  * to main simulation loop - therefore they *shall not* interact with
199  * rest of gem5.
200  *
201  * The only thing they do is to schedule a synchronous event at instruction
202  * boundary to deal with the request.
203  */
204  void incomingData(int revent);
205  void incomingConnection(int revent);
206 
207  template <void (BaseRemoteGDB::*F)(int revent)>
208  class SocketEvent : public PollEvent
209  {
210  protected:
212 
213  public:
215  PollEvent(fd, e), gdb(gdb)
216  {}
217 
218  void process(int revent) { (gdb->*F)(revent); }
219  };
220 
221  typedef SocketEvent<&BaseRemoteGDB::incomingConnection>
225 
228 
231 
233  int _port;
234 
235  // The socket commands come in through.
236  int fd;
237 
238  // Transfer data to/from GDB.
239  uint8_t getbyte();
240  void putbyte(uint8_t b);
241 
242  void recv(std::vector<char> &bp);
243  void send(const char *data);
244  void send(const std::string &data) { send(data.c_str()); }
245 
246  template <typename ...Args>
247  void
248  send(const char *format, const Args &...args)
249  {
250  send(csprintf(format, args...));
251  }
252 
253  /*
254  * Process commands from remote GDB. If simulation has been
255  * stopped because of some kind of fault (as segmentation violation,
256  * or SW trap), 'signum' is the signal value reported back to GDB
257  * in "S" packet (this is done in trap()).
258  */
259  void processCommands(int signum=0);
260 
261  /*
262  * Simulator side debugger state.
263  */
264  bool attached = false;
265  bool threadSwitching = false;
266 
268 
269  std::map<ContextID, ThreadContext *> threads;
270  ThreadContext *tc = nullptr;
271 
273 
276 
277  class TrapEvent : public Event
278  {
279  protected:
280  int _type;
283 
284  public:
286  {}
287 
288  void type(int t) { _type = t; }
289  void id(ContextID id) { _id = id; }
290  void process() { gdb->trap(_id, _type); }
291  } trapEvent;
292 
293  /*
294  * The interface to the simulated system.
295  */
296  // Machine memory.
297  bool read(Addr addr, size_t size, char *data);
298  bool write(Addr addr, size_t size, const char *data);
299 
300  template <class T> T read(Addr addr);
301  template <class T> void write(Addr addr, T data);
302 
303  // Single step.
304  void singleStep();
306 
307  void clearSingleStep();
308  void setSingleStep();
309 
311  void scheduleInstCommitEvent(Event *ev, int delta);
314 
315  // Breakpoints.
316  void insertSoftBreak(Addr addr, size_t kind);
317  void removeSoftBreak(Addr addr, size_t kind);
318  void insertHardBreak(Addr addr, size_t kind);
319  void removeHardBreak(Addr addr, size_t kind);
320 
321  /*
322  * GDB commands.
323  */
324  struct GdbCommand
325  {
326  public:
327  struct Context
328  {
329  const GdbCommand *cmd;
330  char cmdByte;
331  int type;
332  char *data;
333  int len;
334  };
335 
336  typedef bool (BaseRemoteGDB::*Func)(Context &ctx);
337 
338  const char * const name;
339  const Func func;
340 
341  GdbCommand(const char *_name, Func _func) : name(_name), func(_func) {}
342  };
343 
344  static std::map<char, GdbCommand> commandMap;
345 
347 
348  bool cmdSignal(GdbCommand::Context &ctx);
349  bool cmdCont(GdbCommand::Context &ctx);
351  bool cmdDetach(GdbCommand::Context &ctx);
352  bool cmdRegR(GdbCommand::Context &ctx);
353  bool cmdRegW(GdbCommand::Context &ctx);
355  bool cmdMemR(GdbCommand::Context &ctx);
356  bool cmdMemW(GdbCommand::Context &ctx);
357  bool cmdQueryVar(GdbCommand::Context &ctx);
358  bool cmdStep(GdbCommand::Context &ctx);
363 
365  {
366  struct Context
367  {
368  const std::string &name;
370 
371  Context(const std::string &_name) : name(_name) {}
372  };
373 
374  using Func = void (BaseRemoteGDB::*)(Context &ctx);
375 
376  const char * const argSep;
377  const Func func;
378 
379  QuerySetCommand(Func _func, const char *_argSep=nullptr) :
380  argSep(_argSep), func(_func)
381  {}
382  };
383 
384  static std::map<std::string, QuerySetCommand> queryMap;
385 
386  void queryC(QuerySetCommand::Context &ctx);
389 
390  size_t threadInfoIdx = 0;
393 
394  protected:
395  ThreadContext *context() { return tc; }
396  System *system() { return sys; }
397 
398  void encodeBinaryData(const std::string &unencoded,
399  std::string &encoded) const;
400 
401  void encodeXferResponse(const std::string &unencoded,
402  std::string &encoded, size_t offset, size_t unencoded_length) const;
403 
404  // checkBpKind checks if a kind of breakpoint is legal. This function should
405  // be implemented by subclasses by arch. The "kind" is considered to be
406  // breakpoint size in some arch.
407  virtual bool checkBpKind(size_t kind);
408 
409  virtual BaseGdbRegCache *gdbRegs() = 0;
410 
411  virtual bool acc(Addr addr, size_t len) = 0;
412 
414 
422  virtual bool getXferFeaturesRead(const std::string &annex,
423  std::string &output);
424 };
425 
426 template <class T>
427 inline T
429 {
430  T temp;
431  read(addr, sizeof(T), (char *)&temp);
432  return temp;
433 }
434 
435 template <class T>
436 inline void
438 {
439  write(addr, sizeof(T), (const char *)&data);
440 }
441 
442 } // namespace gem5
443 
444 #endif /* __REMOTE_GDB_H__ */
gem5::BaseRemoteGDB::incomingData
void incomingData(int revent)
Definition: remote_gdb.cc:557
gem5::BaseRemoteGDB::queryXfer
void queryXfer(QuerySetCommand::Context &ctx)
Definition: remote_gdb.cc:1130
socket.hh
gem5::BaseRemoteGDB::cmdUnsupported
bool cmdUnsupported(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:926
gem5::BaseRemoteGDB::isAttached
bool isAttached()
Definition: remote_gdb.hh:168
gem5::BaseRemoteGDB::GdbCommand::Context::type
int type
Definition: remote_gdb.hh:331
gem5::BaseRemoteGDB::cmdDumpPageTable
bool cmdDumpPageTable(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1264
gem5::BaseRemoteGDB::TrapEvent::_type
int _type
Definition: remote_gdb.hh:280
gem5::ArmISA::format
Bitfield< 31, 29 > format
Definition: misc_types.hh:647
gem5::BaseRemoteGDB::cmdSetThread
bool cmdSetThread(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:998
gem5::EventWrapper
Definition: eventq.hh:1084
gem5::BaseRemoteGDB::insertSoftBreak
void insertSoftBreak(Addr addr, size_t kind)
Definition: remote_gdb.cc:787
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::BaseRemoteGDB::listen
void listen()
Definition: remote_gdb.cc:378
gem5::BaseRemoteGDB::connectEvent
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::connect > connectEvent
Definition: remote_gdb.hh:274
gem5::BaseRemoteGDB::singleStepEvent
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::singleStep > singleStepEvent
Definition: remote_gdb.hh:305
gem5::BaseRemoteGDB::GdbCommand::name
const char *const name
Definition: remote_gdb.hh:338
gem5::BaseRemoteGDB::gdbRegs
virtual BaseGdbRegCache * gdbRegs()=0
gem5::BaseRemoteGDB::QuerySetCommand::Context::name
const std::string & name
Definition: remote_gdb.hh:368
gem5::BaseRemoteGDB::cmdRegR
bool cmdRegR(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:974
gem5::output
static void output(const char *filename)
Definition: debug.cc:60
gem5::BaseRemoteGDB::encodeBinaryData
void encodeBinaryData(const std::string &unencoded, std::string &encoded) const
Definition: remote_gdb.cc:1239
gem5::BaseRemoteGDB::GdbCommand::Func
bool(BaseRemoteGDB::* Func)(Context &ctx)
Definition: remote_gdb.hh:336
gem5::BaseRemoteGDB::putbyte
void putbyte(uint8_t b)
Definition: remote_gdb.cc:585
gem5::BaseRemoteGDB::build
static BaseRemoteGDB * build(Args... args)
Definition: remote_gdb.hh:180
gem5::BaseGdbRegCache::name
virtual const std::string name() const =0
Return the name to use in places like DPRINTF.
gem5::BaseRemoteGDB::scheduleInstCommitEvent
void scheduleInstCommitEvent(Event *ev, int delta)
Schedule an event which will be triggered "delta" instructions later.
Definition: remote_gdb.cc:839
gem5::BaseRemoteGDB::QuerySetCommand
Definition: remote_gdb.hh:364
gem5::BaseRemoteGDB::fd
int fd
Definition: remote_gdb.hh:236
gem5::BaseRemoteGDB::listener
ListenSocket listener
Definition: remote_gdb.hh:232
gem5::BaseRemoteGDB::removeHardBreak
void removeHardBreak(Addr addr, size_t kind)
Definition: remote_gdb.cc:820
gem5::ListenSocket
Definition: socket.hh:38
gem5::BaseRemoteGDB::commandMap
static std::map< char, GdbCommand > commandMap
Definition: remote_gdb.hh:344
gem5::BaseRemoteGDB::queryC
void queryC(QuerySetCommand::Context &ctx)
Definition: remote_gdb.cc:1111
gem5::ArmISA::e
Bitfield< 9 > e
Definition: misc_types.hh:65
gem5::BaseRemoteGDB::insertHardBreak
void insertHardBreak(Addr addr, size_t kind)
Definition: remote_gdb.cc:805
gem5::BaseRemoteGDB::TrapEvent
Definition: remote_gdb.hh:277
gem5::BaseRemoteGDB::acc
virtual bool acc(Addr addr, size_t len)=0
gem5::BaseRemoteGDB::send
void send(const char *format, const Args &...args)
Definition: remote_gdb.hh:248
std::vector< char >
gem5::csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:161
gem5::BaseRemoteGDB::cmdMemW
bool cmdMemW(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1063
gem5::BaseRemoteGDB::TrapEvent::_id
ContextID _id
Definition: remote_gdb.hh:281
gem5::PollEvent
Definition: pollevent.hh:43
gem5::BaseRemoteGDB::GdbCommand::Context::data
char * data
Definition: remote_gdb.hh:332
gem5::BaseRemoteGDB::sys
System * sys
Definition: remote_gdb.hh:267
gem5::BaseRemoteGDB::cmdStep
bool cmdStep(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1284
gem5::BaseGdbRegCache
Concrete subclasses of this abstract class represent how the register values are transmitted on the w...
Definition: remote_gdb.hh:85
gem5::BaseRemoteGDB::SocketEvent::gdb
BaseRemoteGDB * gdb
Definition: remote_gdb.hh:211
gem5::BaseRemoteGDB::BaseRemoteGDB
BaseRemoteGDB(System *system, int _port)
Interface to other parts of the simulator.
Definition: remote_gdb.cc:358
gem5::BaseRemoteGDB::IncomingConnectionEvent
friend IncomingConnectionEvent
Definition: remote_gdb.hh:226
gem5::HardBreakpoint
Definition: remote_gdb.cc:169
gem5::BaseRemoteGDB::GdbCommand::Context::cmd
const GdbCommand * cmd
Definition: remote_gdb.hh:329
gem5::BaseRemoteGDB::SocketEvent
Definition: remote_gdb.hh:208
gem5::BaseRemoteGDB::attach
void attach(int fd)
Definition: remote_gdb.cc:425
gem5::BaseRemoteGDB::port
int port() const
Definition: remote_gdb.cc:417
gem5::BaseGdbRegCache::getRegs
virtual void getRegs(ThreadContext *)=0
Fill the raw buffer from the registers in the ThreadContext.
gem5::BaseRemoteGDB::GdbCommand::GdbCommand
GdbCommand(const char *_name, Func _func)
Definition: remote_gdb.hh:341
gem5::BaseRemoteGDB::TrapEvent::gdb
BaseRemoteGDB * gdb
Definition: remote_gdb.hh:282
gem5::BaseRemoteGDB::incomingDataEvent
IncomingDataEvent * incomingDataEvent
Definition: remote_gdb.hh:230
gem5::BaseRemoteGDB::GdbCommand::func
const Func func
Definition: remote_gdb.hh:339
gem5::BaseRemoteGDB::encodeXferResponse
void encodeXferResponse(const std::string &unencoded, std::string &encoded, size_t offset, size_t unencoded_length) const
Definition: remote_gdb.cc:1253
gem5::System
Definition: system.hh:75
gem5::BaseRemoteGDB::availableFeatures
virtual std::vector< std::string > availableFeatures() const
Definition: remote_gdb.cc:1226
gem5::ArmISA::b
Bitfield< 7 > b
Definition: misc_types.hh:382
gem5::BaseRemoteGDB::incomingConnectionEvent
IncomingConnectionEvent * incomingConnectionEvent
Definition: remote_gdb.hh:229
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:94
gem5::VegaISA::t
Bitfield< 51 > t
Definition: pagetable.hh:56
gem5::BaseRemoteGDB::QuerySetCommand::argSep
const char *const argSep
Definition: remote_gdb.hh:376
gem5::BaseRemoteGDB::TrapEvent::process
void process()
Definition: remote_gdb.hh:290
gem5::BaseRemoteGDB::tc
ThreadContext * tc
Definition: remote_gdb.hh:270
gem5::Event
Definition: eventq.hh:251
gem5::BaseRemoteGDB::cmdSignal
bool cmdSignal(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:935
debug.hh
pollevent.hh
gem5::BaseRemoteGDB::setSingleStep
void setSingleStep()
Definition: remote_gdb.cc:780
gem5::BaseRemoteGDB::SocketEvent::process
void process(int revent)
Definition: remote_gdb.hh:218
gem5::BaseRemoteGDB::name
std::string name()
Definition: remote_gdb.cc:372
len
uint16_t len
Definition: helpers.cc:62
gem5::BaseRemoteGDB::cmdAsyncCont
bool cmdAsyncCont(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:954
gem5::BaseGdbRegCache::size
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).
gem5::BaseRemoteGDB::_port
int _port
Definition: remote_gdb.hh:233
gem5::BaseRemoteGDB::IncomingDataEvent
friend IncomingDataEvent
Definition: remote_gdb.hh:227
gem5::ArmISA::offset
Bitfield< 23, 0 > offset
Definition: types.hh:144
gem5::BaseGdbRegCache::data
virtual char * data() const =0
Return the pointer to the raw bytes buffer containing the register values.
gem5::BaseRemoteGDB::send
void send(const std::string &data)
Definition: remote_gdb.hh:244
cprintf.hh
gem5::BaseGdbRegCache::gdb
BaseRemoteGDB * gdb
Definition: remote_gdb.hh:140
gem5::BaseRemoteGDB::querySupported
void querySupported(QuerySetCommand::Context &ctx)
Definition: remote_gdb.cc:1117
gem5::BaseRemoteGDB::trapEvent
gem5::BaseRemoteGDB::TrapEvent trapEvent
gem5::BaseRemoteGDB::QuerySetCommand::Context
Definition: remote_gdb.hh:366
gem5::BaseRemoteGDB::replaceThreadContext
void replaceThreadContext(ThreadContext *tc)
Definition: remote_gdb.hh:54
gem5::BaseRemoteGDB::cmdRegW
bool cmdRegW(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:984
gem5::getRemoteGDBPort
int getRemoteGDBPort()
Definition: debug.cc:120
gem5::BaseGdbRegCache::BaseGdbRegCache
BaseGdbRegCache(BaseRemoteGDB *g)
Definition: remote_gdb.hh:134
gem5::BaseRemoteGDB::getXferFeaturesRead
virtual bool getXferFeaturesRead(const std::string &annex, std::string &output)
Get an XML target description.
Definition: remote_gdb.cc:1232
gem5::MipsISA::g
Bitfield< 4 > g
Definition: dt_constants.hh:86
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::BaseRemoteGDB::write
bool write(Addr addr, size_t size, const char *data)
Definition: remote_gdb.cc:748
gem5::BaseRemoteGDB::removeSoftBreak
void removeSoftBreak(Addr addr, size_t kind)
Definition: remote_gdb.cc:796
gem5::BaseRemoteGDB::IncomingDataEvent
SocketEvent<&BaseRemoteGDB::incomingData > IncomingDataEvent
Definition: remote_gdb.hh:224
gem5::BaseRemoteGDB::clearSingleStep
void clearSingleStep()
Definition: remote_gdb.cc:774
gem5::BaseRemoteGDB::disconnectEvent
EventWrapper< BaseRemoteGDB, &BaseRemoteGDB::detach > disconnectEvent
Definition: remote_gdb.hh:275
gem5::BaseRemoteGDB::detach
void detach()
Definition: remote_gdb.cc:450
gem5::BaseRemoteGDB::TrapEvent::id
void id(ContextID id)
Definition: remote_gdb.hh:289
gem5::BaseRemoteGDB::IncomingConnectionEvent
SocketEvent<&BaseRemoteGDB::incomingConnection > IncomingConnectionEvent
Definition: remote_gdb.hh:222
gem5::BaseRemoteGDB::QuerySetCommand::QuerySetCommand
QuerySetCommand(Func _func, const char *_argSep=nullptr)
Definition: remote_gdb.hh:379
gem5::BaseRemoteGDB::regCachePtr
BaseGdbRegCache * regCachePtr
Definition: remote_gdb.hh:272
pcstate.hh
gem5::BaseRemoteGDB::processCommands
void processCommands(int signum=0)
Definition: remote_gdb.cc:675
gem5::BaseRemoteGDB::GdbCommand::Context
Definition: remote_gdb.hh:327
gem5::BaseRemoteGDB::TrapEvent::type
void type(int t)
Definition: remote_gdb.hh:288
gem5::BaseRemoteGDB::selectThreadContext
bool selectThreadContext(ContextID id)
Definition: remote_gdb.cc:498
gem5::BaseRemoteGDB::cmdClrHwBkpt
bool cmdClrHwBkpt(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1296
gem5::BaseRemoteGDB::cmdSetHwBkpt
bool cmdSetHwBkpt(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1329
gem5::BaseGdbRegCache::setRegs
virtual void setRegs(ThreadContext *) const =0
Set the ThreadContext's registers from the values in the raw buffer.
gem5::BaseRemoteGDB::send
void send(const char *data)
Definition: remote_gdb.cc:647
pc_event.hh
types.hh
gem5::BaseRemoteGDB::read
bool read(Addr addr, size_t size, char *data)
Definition: remote_gdb.cc:725
gem5::BaseRemoteGDB::descheduleInstCommitEvent
void descheduleInstCommitEvent(Event *ev)
Deschedule an instruction count based event.
Definition: remote_gdb.cc:854
gem5::BaseRemoteGDB::threadSwitching
bool threadSwitching
Definition: remote_gdb.hh:265
gem5::BaseRemoteGDB::QuerySetCommand::func
const Func func
Definition: remote_gdb.hh:377
gem5::BaseRemoteGDB::queryMap
static std::map< std::string, QuerySetCommand > queryMap
Definition: remote_gdb.hh:384
gem5::BaseRemoteGDB::recv
void recv(std::vector< char > &bp)
Definition: remote_gdb.cc:595
gem5::BaseRemoteGDB::cmdDetach
bool cmdDetach(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:967
gem5::ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:239
gem5::BaseRemoteGDB::addThreadContext
void addThreadContext(ThreadContext *_tc)
Definition: remote_gdb.cc:475
gem5::BaseRemoteGDB::QuerySetCommand::Context::args
std::vector< std::string > args
Definition: remote_gdb.hh:369
gem5::BaseRemoteGDB::cmdMemR
bool cmdMemR(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1039
gem5::BaseRemoteGDB::~BaseRemoteGDB
virtual ~BaseRemoteGDB()
Definition: remote_gdb.hh:57
gem5::BaseRemoteGDB::GdbCommand
Definition: remote_gdb.hh:324
gem5::BaseRemoteGDB::context
ThreadContext * context()
Definition: remote_gdb.hh:395
gem5::BaseRemoteGDB::QuerySetCommand::Context::Context
Context(const std::string &_name)
Definition: remote_gdb.hh:371
gem5::BaseRemoteGDB::system
System * system()
Definition: remote_gdb.hh:396
gem5::BaseRemoteGDB::singleStep
void singleStep()
Definition: remote_gdb.cc:766
gem5::BaseRemoteGDB::incomingConnection
void incomingConnection(int revent)
Definition: remote_gdb.cc:544
gem5::BaseRemoteGDB
Definition: remote_gdb.hh:48
gem5::BaseRemoteGDB::SocketEvent::SocketEvent
SocketEvent(BaseRemoteGDB *gdb, int fd, int e)
Definition: remote_gdb.hh:214
gem5::BaseRemoteGDB::GdbCommand::Context::cmdByte
char cmdByte
Definition: remote_gdb.hh:330
gem5::BaseRemoteGDB::queryFThreadInfo
void queryFThreadInfo(QuerySetCommand::Context &ctx)
Definition: remote_gdb.cc:1171
gem5::BaseRemoteGDB::cmdCont
bool cmdCont(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:942
gem5::BaseRemoteGDB::threads
std::map< ContextID, ThreadContext * > threads
Definition: remote_gdb.hh:269
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::BaseRemoteGDB::connect
void connect()
Definition: remote_gdb.cc:399
gem5::BaseRemoteGDB::cmdAsyncStep
bool cmdAsyncStep(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1271
gem5::BaseRemoteGDB::attached
bool attached
Definition: remote_gdb.hh:264
gem5::BaseRemoteGDB::threadInfoIdx
size_t threadInfoIdx
Definition: remote_gdb.hh:390
gem5::BaseRemoteGDB::cmdQueryVar
bool cmdQueryVar(GdbCommand::Context &ctx)
Definition: remote_gdb.cc:1191
gem5::BaseRemoteGDB::QuerySetCommand::Func
void(BaseRemoteGDB::*)(Context &ctx) Func
Definition: remote_gdb.hh:374
gem5::BaseGdbRegCache::~BaseGdbRegCache
virtual ~BaseGdbRegCache()
Definition: remote_gdb.hh:136
gem5::BaseRemoteGDB::trap
bool trap(ContextID id, int type)
Definition: remote_gdb.hh:55
gem5::BaseRemoteGDB::TrapEvent::TrapEvent
TrapEvent(BaseRemoteGDB *g)
Definition: remote_gdb.hh:285
gem5::BaseRemoteGDB::querySThreadInfo
void querySThreadInfo(QuerySetCommand::Context &ctx)
Definition: remote_gdb.cc:1178
gem5::BaseRemoteGDB::GdbCommand::Context::len
int len
Definition: remote_gdb.hh:333
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84
gem5::BaseRemoteGDB::getbyte
uint8_t getbyte()
Definition: remote_gdb.cc:575
eventq.hh
gem5::BaseRemoteGDB::checkBpKind
virtual bool checkBpKind(size_t kind)
Definition: remote_gdb.cc:920

Generated on Wed Jul 13 2022 10:39:11 for gem5 by doxygen 1.8.17