[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 07/11] gdbstub: Make hex conversion function non-internal
From: |
Gustavo Romero |
Subject: |
[PATCH v6 07/11] gdbstub: Make hex conversion function non-internal |
Date: |
Fri, 28 Jun 2024 05:08:46 +0000 |
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>
---
gdbstub/internals.h | 1 -
include/gdbstub/commands.h | 6 ++++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index 34121dc61a..bf5a5c6302 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -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);
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 */
--
2.34.1
- Re: [PATCH v6 01/11] gdbstub: Clean up process_string_cmd, (continued)
- [PATCH v6 03/11] gdbstub: Add support for target-specific stubs, Gustavo Romero, 2024/06/28
- [PATCH v6 02/11] gdbstub: Move GdbCmdParseEntry into a new header file, Gustavo Romero, 2024/06/28
- [PATCH v6 04/11] target/arm: Fix exception case in allocation_tag_mem_probe, Gustavo Romero, 2024/06/28
- [PATCH v6 05/11] target/arm: Make some MTE helpers widely available, Gustavo Romero, 2024/06/28
- [PATCH v6 06/11] target/arm: Factor out code for setting MTE TCF0 field, Gustavo Romero, 2024/06/28
- [PATCH v6 07/11] gdbstub: Make hex conversion function non-internal,
Gustavo Romero <=
- [PATCH v6 08/11] gdbstub: Pass CPU context to command handler, Gustavo Romero, 2024/06/28
- [PATCH v6 09/11] gdbstub: Use true to set cmd_startswith, Gustavo Romero, 2024/06/28
- [PATCH v6 10/11] gdbstub: Add support for MTE in user mode, Gustavo Romero, 2024/06/28
- [PATCH v6 11/11] tests/tcg/aarch64: Add MTE gdbstub tests, Gustavo Romero, 2024/06/28
- Re: [PATCH v6 00/11] Add MTE stubs for aarch64 user mode, Alex Bennée, 2024/06/28