summaryrefslogtreecommitdiff
path: root/src/arch/riscv
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-01-16 01:25:39 -0800
committerGabe Black <gabeblack@google.com>2018-01-20 07:28:42 +0000
commitecec88750729b2c94d5ca9dedbf7a755c46c41a7 (patch)
treecdadcf01c85f622d4c869fb85208c48a2fdb2469 /src/arch/riscv
parent372adea6879ac549df4a415b5913d28b6683d535 (diff)
downloadgem5-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/arch/riscv')
-rw-r--r--src/arch/riscv/remote_gdb.cc11
-rw-r--r--src/arch/riscv/remote_gdb.hh2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/arch/riscv/remote_gdb.cc b/src/arch/riscv/remote_gdb.cc
index 3488c8192..4f423fc01 100644
--- a/src/arch/riscv/remote_gdb.cc
+++ b/src/arch/riscv/remote_gdb.cc
@@ -148,8 +148,8 @@
using namespace std;
using namespace RiscvISA;
-RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc)
- : BaseRemoteGDB(_system, tc), regCache(this)
+RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc, int _port)
+ : BaseRemoteGDB(_system, tc, _port), regCache(this)
{
}
@@ -160,7 +160,7 @@ RemoteGDB::acc(Addr va, size_t len)
if (FullSystem)
panic("acc not implemented for RISCV FS!");
else
- return context->getProcessPtr()->pTable->lookup(va, entry);
+ return context()->getProcessPtr()->pTable->lookup(va, entry);
}
void
@@ -199,7 +199,8 @@ RemoteGDB::RiscvGdbRegCache::setRegs(ThreadContext *context) const
context->setMiscReg(i, r.csr[i - ExplicitCSRs]);
}
-RemoteGDB::BaseGdbRegCache*
-RemoteGDB::gdbRegs() {
+BaseGdbRegCache*
+RemoteGDB::gdbRegs()
+{
return &regCache;
}
diff --git a/src/arch/riscv/remote_gdb.hh b/src/arch/riscv/remote_gdb.hh
index 4b9d6e7f2..739cb5a3e 100644
--- a/src/arch/riscv/remote_gdb.hh
+++ b/src/arch/riscv/remote_gdb.hh
@@ -85,7 +85,7 @@ class RemoteGDB : public BaseRemoteGDB
RiscvGdbRegCache regCache;
public:
- RemoteGDB(System *_system, ThreadContext *tc);
+ RemoteGDB(System *_system, ThreadContext *tc, int _port);
BaseGdbRegCache *gdbRegs();
};