]> Git Repo - qemu.git/blobdiff - target-m68k/gdbstub.c
ppc/mmu-hash64: Remove duplicated #include statement
[qemu.git] / target-m68k / gdbstub.c
index 2eb4b980c4ce0e84bc73cd4f8261844dd800d90b..c7f44c9bb32be14ef0323fce8b243e1bf59a46fb 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
+#include "exec/gdbstub.h"
 
-static int cpu_gdb_read_register(CPUM68KState *env, uint8_t *mem_buf, int n)
+int m68k_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
 {
+    M68kCPU *cpu = M68K_CPU(cs);
+    CPUM68KState *env = &cpu->env;
+
     if (n < 8) {
         /* D0-D7 */
-        GET_REG32(env->dregs[n]);
+        return gdb_get_reg32(mem_buf, env->dregs[n]);
     } else if (n < 16) {
         /* A0-A7 */
-        GET_REG32(env->aregs[n - 8]);
+        return gdb_get_reg32(mem_buf, env->aregs[n - 8]);
     } else {
         switch (n) {
         case 16:
-            GET_REG32(env->sr);
+            return gdb_get_reg32(mem_buf, env->sr);
         case 17:
-            GET_REG32(env->pc);
+            return gdb_get_reg32(mem_buf, env->pc);
         }
     }
     /* FP registers not included here because they vary between
@@ -39,8 +46,10 @@ static int cpu_gdb_read_register(CPUM68KState *env, uint8_t *mem_buf, int n)
     return 0;
 }
 
-static int cpu_gdb_write_register(CPUM68KState *env, uint8_t *mem_buf, int n)
+int m68k_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
 {
+    M68kCPU *cpu = M68K_CPU(cs);
+    CPUM68KState *env = &cpu->env;
     uint32_t tmp;
 
     tmp = ldl_p(mem_buf);
This page took 0.024992 seconds and 4 git commands to generate.