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/sparc/remote_gdb.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/arch/sparc/remote_gdb.cc') diff --git a/src/arch/sparc/remote_gdb.cc b/src/arch/sparc/remote_gdb.cc index 3f4df0d3a..baec0e7be 100644 --- a/src/arch/sparc/remote_gdb.cc +++ b/src/arch/sparc/remote_gdb.cc @@ -147,8 +147,8 @@ using namespace std; using namespace SparcISA; -RemoteGDB::RemoteGDB(System *_system, ThreadContext *c) - : BaseRemoteGDB(_system, c), regCache32(this), regCache64(this) +RemoteGDB::RemoteGDB(System *_system, ThreadContext *c, int _port) + : BaseRemoteGDB(_system, c, _port), regCache32(this), regCache64(this) {} /////////////////////////////////////////////////////////// @@ -170,7 +170,7 @@ RemoteGDB::acc(Addr va, size_t len) TlbEntry entry; // Check to make sure the first byte is mapped into the processes // address space. - if (context->getProcessPtr()->pTable->lookup(va, entry)) + if (context()->getProcessPtr()->pTable->lookup(va, entry)) return true; return false; } @@ -244,10 +244,10 @@ RemoteGDB::SPARC64GdbRegCache::setRegs(ThreadContext *context) const } -RemoteGDB::BaseGdbRegCache* +BaseGdbRegCache* RemoteGDB::gdbRegs() { - PSTATE pstate = context->readMiscReg(MISCREG_PSTATE); + PSTATE pstate = context()->readMiscReg(MISCREG_PSTATE); if (pstate.am) { return ®Cache32; } else { -- cgit v1.2.3