diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/gdbstub.h | 25 | ||||
-rw-r--r-- | include/sysemu/block-backend.h | 2 |
2 files changed, 22 insertions, 5 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 20e1072692..94d8f83e92 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; @@ -166,11 +177,15 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf, int len) #endif -#ifdef CONFIG_USER_ONLY -int gdbserver_start(int); -#else -int gdbserver_start(const char *port); -#endif +/** + * gdbserver_start: start the gdb server + * @port_or_device: connection spec for gdb + * + * For CONFIG_USER this is either a tcp port or a path to a fifo. For + * system emulation you can use a full chardev spec for your gdbserver + * port. + */ +int gdbserver_start(const char *port_or_device); void gdbserver_cleanup(void); diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 34de7faa81..0917663d89 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -77,6 +77,8 @@ typedef struct BlockBackendPublic { } BlockBackendPublic; BlockBackend *blk_new(AioContext *ctx, uint64_t perm, uint64_t shared_perm); +BlockBackend *blk_new_with_bs(BlockDriverState *bs, uint64_t perm, + uint64_t shared_perm, Error **errp); BlockBackend *blk_new_open(const char *filename, const char *reference, QDict *options, int flags, Error **errp); int blk_get_refcnt(BlockBackend *blk); |