]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/hppa: fix setting registers via gdb
authorSven Schnelle <svens@stackframe.org>
Mon, 28 Jan 2019 16:53:33 +0000 (17:53 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 6 Feb 2019 10:49:21 +0000 (10:49 +0000)
While doing 'set $pcoqh=0xf0000000' i triggered the assertion below.
The argument order for deposit64() is wrong, and val needs to be
moved to the end.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Message-Id: <20190128165333.3814-1-svens@stackframe.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/hppa/gdbstub.c

index e2e9c4d77f3c063aff8ed5bbc89543e5afc69132..3157a690f2b17ef6feb3fa013317da9afc316a4b 100644 (file)
@@ -266,7 +266,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     case 65 ... 127:
         {
             uint64_t *fr = &env->fr[(n - 64) / 2];
-            *fr = deposit64(*fr, val, (n & 1 ? 0 : 32), 32);
+            *fr = deposit64(*fr, (n & 1 ? 0 : 32), 32, val);
         }
         break;
     default: