summaryrefslogtreecommitdiff
path: root/src/arch/x86
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/x86
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/x86')
-rw-r--r--src/arch/x86/remote_gdb.cc16
-rw-r--r--src/arch/x86/remote_gdb.hh2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/arch/x86/remote_gdb.cc b/src/arch/x86/remote_gdb.cc
index a6fdabd73..175cabba3 100644
--- a/src/arch/x86/remote_gdb.cc
+++ b/src/arch/x86/remote_gdb.cc
@@ -64,8 +64,8 @@
using namespace std;
using namespace X86ISA;
-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)
{}
bool
@@ -73,9 +73,9 @@ RemoteGDB::acc(Addr va, size_t len)
{
if (FullSystem) {
Walker *walker = dynamic_cast<TLB *>(
- context->getDTBPtr())->getWalker();
+ context()->getDTBPtr())->getWalker();
unsigned logBytes;
- Fault fault = walker->startFunctional(context, va, logBytes,
+ Fault fault = walker->startFunctional(context(), va, logBytes,
BaseTLB::Read);
if (fault != NoFault)
return false;
@@ -84,19 +84,19 @@ RemoteGDB::acc(Addr va, size_t len)
if ((va & ~mask(logBytes)) == (endVa & ~mask(logBytes)))
return true;
- fault = walker->startFunctional(context, endVa, logBytes,
+ fault = walker->startFunctional(context(), endVa, logBytes,
BaseTLB::Read);
return fault == NoFault;
} else {
TlbEntry entry;
- return context->getProcessPtr()->pTable->lookup(va, entry);
+ return context()->getProcessPtr()->pTable->lookup(va, entry);
}
}
-RemoteGDB::BaseGdbRegCache*
+BaseGdbRegCache*
RemoteGDB::gdbRegs()
{
- HandyM5Reg m5reg = context->readMiscRegNoEffect(MISCREG_M5_REG);
+ HandyM5Reg m5reg = context()->readMiscRegNoEffect(MISCREG_M5_REG);
if (m5reg.submode == SixtyFourBitMode)
return &regCache64;
else
diff --git a/src/arch/x86/remote_gdb.hh b/src/arch/x86/remote_gdb.hh
index f1cbcbe8c..0cae4fe30 100644
--- a/src/arch/x86/remote_gdb.hh
+++ b/src/arch/x86/remote_gdb.hh
@@ -143,7 +143,7 @@ class RemoteGDB : public BaseRemoteGDB
AMD64GdbRegCache regCache64;
public:
- RemoteGDB(System *system, ThreadContext *context);
+ RemoteGDB(System *system, ThreadContext *context, int _port);
BaseGdbRegCache *gdbRegs();
};
} // namespace X86ISA