From 1cbc83650dbfbe7d746da2fb76358a20ee803a76 Mon Sep 17 00:00:00 2001 From: Marcin Rajwa Date: Tue, 5 Feb 2019 16:20:06 +0100 Subject: [PATCH] GDB: Added support for memory write. Signed-off-by: Marcin Rajwa --- src/gdb/gdb.c | 5 +++-- src/include/sof/gdb/gdb.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gdb/gdb.c b/src/gdb/gdb.c index 8680d856f..210872db8 100644 --- a/src/gdb/gdb.c +++ b/src/gdb/gdb.c @@ -322,8 +322,9 @@ while (1) { strcpy((char *)remcom_out_buffer, "E01"); } break; - /* write memory (binary) */ - case 'X': + /* write memory */ + case 'X': /* binary mode */ + case 'M': if (hex_to_int(&request, &addr) && *request++ == ',' && hex_to_int(&request, &length) && *request++ == ':') { if (hex_to_mem(request, (void *)addr, length)) diff --git a/src/include/sof/gdb/gdb.h b/src/include/sof/gdb/gdb.h index 03ee76e03..ad49cca4c 100644 --- a/src/include/sof/gdb/gdb.h +++ b/src/include/sof/gdb/gdb.h @@ -8,6 +8,7 @@ #define FIRST_BYTE_MASK 0xF0000000 #define VALID_MEM_START_BYTE 0xB #define VALID_MEM_ADDRESS_LEN 0x8 + void gdb_handle_exception(void); void gdb_debug_info(unsigned char *str); void gdb_init_debug_exception(void);