summaryrefslogtreecommitdiff
path: root/src/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/mips')
-rw-r--r--src/arch/mips/remote_gdb.cc4
-rw-r--r--src/arch/mips/remote_gdb.hh7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/arch/mips/remote_gdb.cc b/src/arch/mips/remote_gdb.cc
index 4fa7cac70..2cc2d779b 100644
--- a/src/arch/mips/remote_gdb.cc
+++ b/src/arch/mips/remote_gdb.cc
@@ -152,7 +152,7 @@ using namespace std;
using namespace MipsISA;
RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc)
- : BaseRemoteGDB(_system, tc)
+ : BaseRemoteGDB(_system, tc), regCache(this)
{
}
@@ -207,5 +207,5 @@ RemoteGDB::MipsGdbRegCache::setRegs(ThreadContext *context) const
RemoteGDB::BaseGdbRegCache*
RemoteGDB::gdbRegs() {
- return new MipsGdbRegCache(this);
+ return &regCache;
}
diff --git a/src/arch/mips/remote_gdb.hh b/src/arch/mips/remote_gdb.hh
index fd006e0b6..fba55d84c 100644
--- a/src/arch/mips/remote_gdb.hh
+++ b/src/arch/mips/remote_gdb.hh
@@ -70,9 +70,14 @@ class RemoteGDB : public BaseRemoteGDB
size_t size() const { return sizeof(r); }
void getRegs(ThreadContext*);
void setRegs(ThreadContext*) const;
- const std::string name() const { return gdb->name() + ".MipsGdbRegCache"; }
+ const std::string
+ name() const
+ {
+ return gdb->name() + ".MipsGdbRegCache";
+ }
};
+ MipsGdbRegCache regCache;
public:
RemoteGDB(System *_system, ThreadContext *tc);