aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-04-30 20:01:15 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-05-06 09:29:26 +0100
commit38c1c09839c90317314be48f8758e9001ee40b91 (patch)
tree93d09b8680bc5e1b89530906cfa0ab210d0e261c /include
parentf2385398b2f02eec9ea78ea4aa88c5ee66cd1ded (diff)
downloadqemu-38c1c09839c90317314be48f8758e9001ee40b91.zip
qemu-38c1c09839c90317314be48f8758e9001ee40b91.tar.gz
qemu-38c1c09839c90317314be48f8758e9001ee40b91.tar.bz2
gdbstub: Introduce gdb_get_float64() to get 64-bit float registers
When converted to use GByteArray in commits 462474d760c and a010bdbe719, the call to stfq_p() was removed. This call serialize a float. Since we now use a GByteArray, we can not use stfq_p() directly. Introduce the gdb_get_float64() helper to load a float64 register. Fixes: 462474d760c ("target/m68k: use gdb_get_reg helpers") Fixes: a010bdbe719 ("extend GByteArray to read register helpers") Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200414163853.12164-3-philmd@redhat.com> Message-Id: <20200430190122.4592-3-alex.bennee@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/exec/gdbstub.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index 20e1072..4a2b8e3 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -134,6 +134,17 @@ static inline int gdb_get_float32(GByteArray *array, float32 val)
return sizeof(buf);
}
+
+static inline int gdb_get_float64(GByteArray *array, float64 val)
+{
+ uint8_t buf[sizeof(CPU_DoubleU)];
+
+ stfq_p(buf, val);
+ g_byte_array_append(array, buf, sizeof(buf));
+
+ return sizeof(buf);
+}
+
static inline int gdb_get_zeroes(GByteArray *array, size_t len)
{
guint oldlen = array->len;