qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 09/21] gdbstub: make various helpers visible to the rest o


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 09/21] gdbstub: make various helpers visible to the rest of the module
Date: Thu, 5 Jan 2023 18:09:15 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 5/1/23 17:43, Alex Bennée wrote:
We will be needing to use these helpers between the user and softmmu
files so declare them in the headers, add a system prefix and remove

"system prefix" -> "'gdb_' prefix"

static from the implementations.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
  gdbstub/internals.h |  25 ++++
  gdbstub/gdbstub.c   | 271 ++++++++++++++++++++++----------------------
  2 files changed, 161 insertions(+), 135 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

+/*
+ * Connection helpers for both softmmu and user backends
+ */
+
+void gdb_put_strbuf(void);
+int gdb_put_packet(const char *buf);
+int gdb_put_packet_binary(const char *buf, int len, bool dump);
+void gdb_hextomem(GByteArray *mem, const char *buf, int len);
+void gdb_memtohex(GString *buf, const uint8_t *mem, int len);
+void gdb_memtox(GString *buf, const char *mem, int len);
+void gdb_read_byte(uint8_t ch);
+
+/* utility helpers */
+CPUState *gdb_first_attached_cpu(void);
+void gdb_append_thread_id(CPUState *cpu, GString *buf);
+int gdb_get_cpu_index(CPUState *cpu);
+
+void gdb_init_gdbserver_state(void);
+void gdb_create_default_process(GDBState *s);
+
+/*
+ * Helpers with separate softmmu and user implementations
+ */
+void gdb_put_buffer(const uint8_t *buf, int len);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]