From 3ce0fc57a0e7d528ce0435c93205f9f6558c38ff Mon Sep 17 00:00:00 2001 From: Gustavo Romero Date: Fri, 5 Jul 2024 09:40:43 +0100 Subject: gdbstub: Make hex conversion function non-internal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make gdb_hextomem non-internal so it's not confined to use only in gdbstub.c. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240628050850.536447-8-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-37-alex.bennee@linaro.org> --- include/gdbstub/commands.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/gdbstub/commands.h') diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index 306dfdef97..e51f276b40 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -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 */ -- cgit 1.4.1