From 41ab3e6e7e9b5a5f4427949f9a981cdf2186c88a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 11 May 2017 14:11:28 -0700 Subject: base: Refactor the GDB code. The new version modularizes the implementation of the various commands, gets rid of dynamic allocation of the register cache, fixes some small style problems, and uses exceptions to simplify error handling internal to the GDB stub. Change-Id: Iff3548373ce4adfb99106a810f5713b769df89b2 Reviewed-on: https://gem5-review.googlesource.com/3280 Reviewed-by: Andreas Sandberg Reviewed-by: Boris Shingarov Maintainer: Andreas Sandberg --- src/arch/riscv/remote_gdb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/arch/riscv/remote_gdb.cc') diff --git a/src/arch/riscv/remote_gdb.cc b/src/arch/riscv/remote_gdb.cc index 2b508762d..3488c8192 100644 --- a/src/arch/riscv/remote_gdb.cc +++ b/src/arch/riscv/remote_gdb.cc @@ -149,7 +149,7 @@ using namespace std; using namespace RiscvISA; RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc) - : BaseRemoteGDB(_system, tc) + : BaseRemoteGDB(_system, tc), regCache(this) { } @@ -201,5 +201,5 @@ RemoteGDB::RiscvGdbRegCache::setRegs(ThreadContext *context) const RemoteGDB::BaseGdbRegCache* RemoteGDB::gdbRegs() { - return new RiscvGdbRegCache(this); + return ®Cache; } -- cgit v1.2.3