Patchwork [50/64] Gdbstub: handle read of fpscr

login
register
mail settings
Submitter Alexander Graf
Date Oct. 6, 2011, 8:05 a.m.
Message ID <1317888366-10509-51-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/117990/
State New
Headers show

Comments

Alexander Graf - Oct. 6, 2011, 8:05 a.m.
From: Fabien Chouteau <chouteau@adacore.com>

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 gdbstub.c                   |    2 +-
 target-ppc/translate_init.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/gdbstub.c b/gdbstub.c
index 12dd100..1d99e19 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -733,7 +733,7 @@  static int cpu_gdb_read_register(CPUState *env, uint8_t *mem_buf, int n)
             {
                 if (gdb_has_xml)
                     return 0;
-                GET_REG32(0); /* fpscr */
+                GET_REG32(env->fpscr);
             }
         }
     }
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 211f3bd..d09c7ca 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -9700,8 +9700,7 @@  static int gdb_get_float_reg(CPUState *env, uint8_t *mem_buf, int n)
         return 8;
     }
     if (n == 32) {
-        /* FPSCR not implemented  */
-        memset(mem_buf, 0, 4);
+        stl_p(mem_buf, env->fpscr);
         return 4;
     }
     return 0;