diff options
author | Gabe Black <gabeblack@google.com> | 2018-01-16 01:25:39 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-01-20 07:28:42 +0000 |
commit | ecec88750729b2c94d5ca9dedbf7a755c46c41a7 (patch) | |
tree | cdadcf01c85f622d4c869fb85208c48a2fdb2469 /src/sim | |
parent | 372adea6879ac549df4a415b5913d28b6683d535 (diff) | |
download | gem5-ecec88750729b2c94d5ca9dedbf7a755c46c41a7.tar.xz |
sim, arch, base: Refactor the base remote GDB class.
Fold the GDBListener class into the main BaseRemoteGDB class, move
around a bunch of functions, convert a lot of internal functions to
be private, move some functions into the .cc, make some functions
non-virtual which didn't really need to be overridden.
Change-Id: Id0832b730b0fdfb2eababa5067e72c66de1c147d
Reviewed-on: https://gem5-review.googlesource.com/7422
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/system.cc | 9 | ||||
-rw-r--r-- | src/sim/system.hh | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc index 2f047f227..ed01e0e64 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -261,16 +261,15 @@ System::registerThreadContext(ThreadContext *tc, ContextID assigned) #if THE_ISA != NULL_ISA int port = getRemoteGDBPort(); if (port) { - RemoteGDB *rgdb = new RemoteGDB(this, tc); - GDBListener *gdbl = new GDBListener(rgdb, port + id); - gdbl->listen(); + RemoteGDB *rgdb = new RemoteGDB(this, tc, port + id); + rgdb->listen(); BaseCPU *cpu = tc->getCpuPtr(); if (cpu->waitForRemoteGDB()) { inform("%s: Waiting for a remote GDB connection on port %d.\n", - cpu->name(), gdbl->getPort()); + cpu->name(), rgdb->port()); - gdbl->accept(); + rgdb->connect(); } if (remoteGDB.size() <= id) { remoteGDB.resize(id + 1); diff --git a/src/sim/system.hh b/src/sim/system.hh index acd3108a0..5b0c17872 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -75,7 +75,6 @@ #endif class BaseRemoteGDB; -class GDBListener; class KvmVM; class ObjectFile; class ThreadContext; @@ -491,7 +490,6 @@ class System : public MemObject public: std::vector<BaseRemoteGDB *> remoteGDB; - std::vector<GDBListener *> gdbListen; bool breakpoint(); public: |