mirror of https://github.com/thesofproject/sof.git
GDB: Added support for memory read.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
parent
9e1bed23aa
commit
aae1c4c1d0
|
@ -309,6 +309,19 @@ while (1) {
|
|||
strcpy((char *)remcom_out_buffer, "OK");
|
||||
}
|
||||
break;
|
||||
/* read memory */
|
||||
case 'm':
|
||||
i = hex_to_int(&request, &addr);
|
||||
if (i == VALID_MEM_ADDRESS_LEN &&
|
||||
((addr & FIRST_BYTE_MASK) >> 28) == VALID_MEM_START_BYTE &&
|
||||
*request++ == ',' && hex_to_int(&request, &length)) {
|
||||
if (mem_to_hex((void *)addr, remcom_out_buffer, length))
|
||||
break;
|
||||
strcpy((char *)remcom_out_buffer, "E03");
|
||||
} else {
|
||||
strcpy((char *)remcom_out_buffer, "E01");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
gdb_log_exception("Unknown GDB command.");
|
||||
break;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#define GDB_NUMBER_OF_REGISTERS 64
|
||||
#define DISABLE_LOWER_INTERRUPTS_MASK ~0x1F
|
||||
#define REGISTER_MASK 0xFF
|
||||
#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);
|
||||
|
|
Loading…
Reference in New Issue