diff --git a/ext/gdb-xml/power.xml b/ext/gdb-xml/power.xml
new file mode 100644
index 0000000000..da5a07ca91
--- /dev/null
+++ b/ext/gdb-xml/power.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+ powerpc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/arch/power/SConscript b/src/arch/power/SConscript
index a91b5d985e..1187acf3d6 100644
--- a/src/arch/power/SConscript
+++ b/src/arch/power/SConscript
@@ -1,6 +1,7 @@
# -*- mode:python -*-
# Copyright (c) 2009 The University of Edinburgh
+# Copyright (c) 2020 LabWare
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,3 +57,5 @@ if env['TARGET_ISA'] == 'power':
DebugFlag('Power')
ISADesc('isa/main.isa')
+
+ GdbXml('power.xml', 'gdb_xml_power')
diff --git a/src/arch/power/remote_gdb.cc b/src/arch/power/remote_gdb.cc
index ccee0b1327..661c4310e7 100644
--- a/src/arch/power/remote_gdb.cc
+++ b/src/arch/power/remote_gdb.cc
@@ -136,6 +136,7 @@
#include
+#include "blobs/gdb_xml_power.hh"
#include "cpu/thread_state.hh"
#include "debug/GDBAcc.hh"
#include "debug/GDBMisc.hh"
@@ -213,3 +214,19 @@ RemoteGDB::gdbRegs()
return ®Cache;
}
+bool
+RemoteGDB::getXferFeaturesRead(const std::string &annex, std::string &output)
+{
+#define GDB_XML(x, s) \
+ { x, std::string(reinterpret_cast(Blobs::s), \
+ Blobs::s ## _len) }
+ static const std::map annexMap {
+ GDB_XML("target.xml", gdb_xml_power),
+ };
+#undef GDB_XML
+ auto it = annexMap.find(annex);
+ if (it == annexMap.end())
+ return false;
+ output = it->second;
+ return true;
+}
diff --git a/src/arch/power/remote_gdb.hh b/src/arch/power/remote_gdb.hh
index 1b673bbed2..3bb726e52a 100644
--- a/src/arch/power/remote_gdb.hh
+++ b/src/arch/power/remote_gdb.hh
@@ -76,6 +76,12 @@ class RemoteGDB : public BaseRemoteGDB
public:
RemoteGDB(System *_system, ThreadContext *tc, int _port);
BaseGdbRegCache *gdbRegs();
+ std::vector
+ availableFeatures() const
+ {
+ return {"qXfer:features:read+"};
+ };
+ bool getXferFeaturesRead(const std::string &annex, std::string &output);
};
} // namespace PowerISA