mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
gdbstub component
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "esp_gdbstub.h"
|
||||
#include "esp_gdbstub_arch.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef CONFIG_ESP_GDBSTUB_SUPPORT_TASKS
|
||||
@@ -30,6 +30,7 @@
|
||||
#define GDBSTUB_ST_ENDPACKET -1
|
||||
#define GDBSTUB_ST_ERR -2
|
||||
#define GDBSTUB_ST_OK -3
|
||||
#define GDBSTUB_ST_CONT -4
|
||||
|
||||
/* Special task index values */
|
||||
#define GDBSTUB_CUR_TASK_INDEX_UNKNOWN -1
|
||||
@@ -125,6 +126,20 @@ int esp_gdbstub_readmem(intptr_t addr);
|
||||
*/
|
||||
void esp_gdbstub_flush(void);
|
||||
|
||||
/**
|
||||
* Write a byte to target memory
|
||||
* @param addr address
|
||||
* @param data data byte
|
||||
* @return 0 in case of success, -1 in case of error
|
||||
*/
|
||||
int esp_gdbstub_writemem(unsigned int addr, unsigned char data);
|
||||
|
||||
/**
|
||||
* Read a data from fifo and detect start symbol
|
||||
* @return 1 if break symbol was detected, or 0 if not
|
||||
*/
|
||||
int esp_gdbstub_getfifo(void);
|
||||
|
||||
/**** GDB packet related functions ****/
|
||||
|
||||
/** Begin a packet */
|
||||
@@ -143,7 +158,7 @@ void esp_gdbstub_send_hex(int val, int bits);
|
||||
void esp_gdbstub_send_end(void);
|
||||
|
||||
/** Send a packet with a string as content */
|
||||
void esp_gdbstub_send_str_packet(const char* str);
|
||||
void esp_gdbstub_send_str_packet(const char *str);
|
||||
|
||||
/** Get a hex value from the gdb packet */
|
||||
uint32_t esp_gdbstub_gethex(const unsigned char **ptr, int bits);
|
||||
|
Reference in New Issue
Block a user