summaryrefslogtreecommitdiff
path: root/src/arch/power
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/power')
-rw-r--r--src/arch/power/remote_gdb.cc4
-rw-r--r--src/arch/power/remote_gdb.hh7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/arch/power/remote_gdb.cc b/src/arch/power/remote_gdb.cc
index 1ed7afbc0..c85aa38f2 100644
--- a/src/arch/power/remote_gdb.cc
+++ b/src/arch/power/remote_gdb.cc
@@ -152,7 +152,7 @@ using namespace std;
using namespace PowerISA;
RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc)
- : BaseRemoteGDB(_system, tc)
+ : BaseRemoteGDB(_system, tc), regCache(this)
{
}
@@ -218,6 +218,6 @@ RemoteGDB::PowerGdbRegCache::setRegs(ThreadContext *context) const
RemoteGDB::BaseGdbRegCache*
RemoteGDB::gdbRegs() {
- return new PowerGdbRegCache(this);
+ return &regCache;
}
diff --git a/src/arch/power/remote_gdb.hh b/src/arch/power/remote_gdb.hh
index e1c396266..9fefb345b 100644
--- a/src/arch/power/remote_gdb.hh
+++ b/src/arch/power/remote_gdb.hh
@@ -69,9 +69,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() + ".PowerGdbRegCache"; }
+ const std::string
+ name() const
+ {
+ return gdb->name() + ".PowerGdbRegCache";
+ }
};
+ PowerGdbRegCache regCache;
public:
RemoteGDB(System *_system, ThreadContext *tc);