qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr
@ 2013-03-19 12:03 Fabien Chouteau
  2013-03-19 12:10 ` Alexander Graf
  0 siblings, 1 reply; 10+ messages in thread
From: Fabien Chouteau @ 2013-03-19 12:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, agraf

Although the support of this register may be uncomplete, there are no
reason to prevent the debugger from reading or writing it.

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

diff --git a/gdbstub.c b/gdbstub.c
index e414ad9..d23d9c5 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -781,7 +781,8 @@ static int cpu_gdb_write_register(CPUPPCState *env, uint8_t *mem_buf, int n)
             /* fpscr */
             if (gdb_has_xml)
                 return 0;
-            return 4;
+            env->fpscr = ldtul_p(mem_buf);
+            return sizeof(target_ulong);
         }
     }
     return 0;
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 09ad4ba..a5d2cc3 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -7693,7 +7693,7 @@ static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n)
         return 8;
     }
     if (n == 32) {
-        /* FPSCR not implemented  */
+        env->fpscr = ldl_p(mem_buf);
         return 4;
     }
     return 0;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-03-19 19:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19 12:03 [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr Fabien Chouteau
2013-03-19 12:10 ` Alexander Graf
2013-03-19 12:13   ` Peter Maydell
2013-03-19 12:16     ` Alexander Graf
2013-03-19 15:14   ` Fabien Chouteau
2013-03-19 15:23     ` Peter Maydell
2013-03-19 17:20       ` Fabien Chouteau
2013-03-19 17:21         ` Peter Maydell
2013-03-19 18:32         ` Richard Henderson
2013-03-19 19:48           ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).