summaryrefslogtreecommitdiff
path: root/base/remote_gdb.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-10-12 13:45:21 -0400
committerNathan Binkert <binkertn@umich.edu>2005-10-12 13:45:21 -0400
commitb6d2555ec500494d531e94001c723cbc4c06225c (patch)
tree7ee5b36f965992054a82929707e45bd9c57a3ca7 /base/remote_gdb.hh
parent80a5c9303649121a18933610acd375ea091247ad (diff)
downloadgem5-b6d2555ec500494d531e94001c723cbc4c06225c.tar.xz
Make it easier to attach the remote debugger.
base/remote_gdb.cc: Keep track of a vector of all of the usable debuggers and provide a current_debugger variable that can be set from gdb to specify which remote debugger is desired. If debugger() is called and the current_debugger is not attached, call accept on its listener so we can still attach a remote debugger from the gdb prompt if we had forgotten to before. Print out more information when the simulator starts so we can distinguish debuggers more easily. base/remote_gdb.hh: Have a remote debugger instance keep track of its listener. Number the remote debuggers so it's easier to figure out which is which. --HG-- extra : convert_revision : 97119597ac3772ea4df6da3b3a4827f50253a51f
Diffstat (limited to 'base/remote_gdb.hh')
-rw-r--r--base/remote_gdb.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/remote_gdb.hh b/base/remote_gdb.hh
index f9a220a5d..652a58317 100644
--- a/base/remote_gdb.hh
+++ b/base/remote_gdb.hh
@@ -40,8 +40,13 @@ class System;
class ExecContext;
class PhysicalMemory;
+class GDBListener;
class RemoteGDB
{
+ private:
+ friend void debugger();
+ friend class GDBListener;
+
protected:
class Event : public PollEvent
{
@@ -55,6 +60,8 @@ class RemoteGDB
friend class Event;
Event *event;
+ GDBListener *listener;
+ int number;
protected:
int fd;