]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
gdbstub: Make hex conversion function non-internal
authorGustavo Romero <gustavo.romero@linaro.org>
Fri, 5 Jul 2024 08:40:43 +0000 (09:40 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 5 Jul 2024 11:35:19 +0000 (12:35 +0100)
Make gdb_hextomem non-internal so it's not confined to use only in
gdbstub.c.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240628050850.536447-8-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240705084047.857176-37-alex.bennee@linaro.org>

gdbstub/internals.h
include/gdbstub/commands.h

index 34121dc61afc81307547d320aefde1431a41492d..bf5a5c63029c998cb0e64cd73076ceb7b02953a6 100644 (file)
@@ -107,7 +107,6 @@ static inline int tohex(int v)
 
 void gdb_put_strbuf(void);
 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);
index 306dfdef97931242b9e7bc3ab4a01370cc1dd5d9..e51f276b40aed338680a55fc32a5ce6ba159f182 100644 (file)
@@ -91,4 +91,10 @@ void gdb_extend_set_table(GdbCmdParseEntry *table, int size);
  */
 void gdb_extend_qsupported_features(char *qsupported_features);
 
+/**
+ * Convert a hex string to bytes. Conversion is done per byte, so 2 hex digits
+ * are converted to 1 byte. Invalid hex digits are treated as 0 digits.
+ */
+void gdb_hextomem(GByteArray *mem, const char *buf, int len);
+
 #endif /* GDBSTUB_COMMANDS_H */