From ecec88750729b2c94d5ca9dedbf7a755c46c41a7 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 16 Jan 2018 01:25:39 -0800 Subject: 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 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/arch/mips/remote_gdb.cc | 11 ++++++----- src/arch/mips/remote_gdb.hh | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/arch/mips') diff --git a/src/arch/mips/remote_gdb.cc b/src/arch/mips/remote_gdb.cc index 2cc2d779b..e17f8fd1d 100644 --- a/src/arch/mips/remote_gdb.cc +++ b/src/arch/mips/remote_gdb.cc @@ -151,8 +151,8 @@ using namespace std; using namespace MipsISA; -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) { } @@ -168,7 +168,7 @@ RemoteGDB::acc(Addr va, size_t len) if (FullSystem) panic("acc not implemented for MIPS FS!"); else - return context->getProcessPtr()->pTable->lookup(va, entry); + return context()->getProcessPtr()->pTable->lookup(va, entry); } void @@ -205,7 +205,8 @@ RemoteGDB::MipsGdbRegCache::setRegs(ThreadContext *context) const context->setFloatRegBits(FLOATREG_FIR, r.fir); } -RemoteGDB::BaseGdbRegCache* -RemoteGDB::gdbRegs() { +BaseGdbRegCache* +RemoteGDB::gdbRegs() +{ return ®Cache; } diff --git a/src/arch/mips/remote_gdb.hh b/src/arch/mips/remote_gdb.hh index fba55d84c..169754a53 100644 --- a/src/arch/mips/remote_gdb.hh +++ b/src/arch/mips/remote_gdb.hh @@ -80,7 +80,7 @@ class RemoteGDB : public BaseRemoteGDB MipsGdbRegCache regCache; public: - RemoteGDB(System *_system, ThreadContext *tc); + RemoteGDB(System *_system, ThreadContext *tc, int _port); BaseGdbRegCache *gdbRegs(); }; -- cgit v1.2.3