qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-for-5.0] target/m68k/helper: Fix m68k_fpu_gdb_get_reg() use of GByteArray
@ 2020-04-09 17:25 Philippe Mathieu-Daudé
  2020-04-09 18:02 ` Laurent Vivier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-09 17:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, Alex Bennée, Laurent Vivier,
	Peter Xu

Since a010bdbe719 the gdbstub API takes a GByteArray*.
Unfortunately we forgot to update the gdb_get_reg*()
calls.  Do it now.

Fixes: a010bdbe719 ("extend GByteArray to read register helpers")
Reported-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Based-on: <20200409164954.36902-1-peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 target/m68k/helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/m68k/helper.c b/target/m68k/helper.c
index 014657c637..cad4083895 100644
--- a/target/m68k/helper.c
+++ b/target/m68k/helper.c
@@ -109,8 +109,8 @@ static int m68k_fpu_gdb_get_reg(CPUM68KState *env, GByteArray *mem_buf, int n)
 {
     if (n < 8) {
         int len = gdb_get_reg16(mem_buf, env->fregs[n].l.upper);
-        len += gdb_get_reg16(mem_buf + len, 0);
-        len += gdb_get_reg64(mem_buf + len, env->fregs[n].l.lower);
+        len += gdb_get_reg16(mem_buf, 0);
+        len += gdb_get_reg64(mem_buf, env->fregs[n].l.lower);
         return len;
     }
     switch (n) {
-- 
2.21.1



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

end of thread, other threads:[~2020-04-09 20:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-09 17:25 [PATCH-for-5.0] target/m68k/helper: Fix m68k_fpu_gdb_get_reg() use of GByteArray Philippe Mathieu-Daudé
2020-04-09 18:02 ` Laurent Vivier
2020-04-09 18:22 ` Peter Xu
2020-04-09 18:35   ` Laurent Vivier
2020-04-09 18:36   ` Laurent Vivier
2020-04-09 18:53     ` Peter Xu
2020-04-09 20:34 ` Alex Bennée

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).