diff options
Diffstat (limited to 'include/exec/gdbstub.h')
-rw-r--r-- | include/exec/gdbstub.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 30b909ebd2..20e1072692 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -125,6 +125,24 @@ static inline int gdb_get_reg128(GByteArray *buf, uint64_t val_hi, return 16; } +static inline int gdb_get_float32(GByteArray *array, float32 val) +{ + uint8_t buf[sizeof(CPU_FloatU)]; + + stfl_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; + g_byte_array_set_size(array, oldlen + len); + memset(array->data + oldlen, 0, len); + + return len; +} + /** * gdb_get_reg_ptr: get pointer to start of last element * @len: length of element |