X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Frtos%2Frtos.h;h=81751fe0a80ea2200478a4da7f085c82b522f237;hb=6ad89d61af681e11960082a906357d8e8c3396a1;hp=20f7de775b48a96f7d3c383ebda1550fc05f8816;hpb=c8e643fd9f09849b341942d11866ab45bc7c99a3;p=openocd.git diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h index 20f7de775b..81751fe0a8 100644 --- a/src/rtos/rtos.h +++ b/src/rtos/rtos.h @@ -82,6 +82,13 @@ struct rtos_type { int (*clean)(struct target *target); char * (*ps_command)(struct target *target); int (*set_reg)(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_value); + /* Implement these if different threads in the RTOS can see memory + * differently (for instance because address translation might be different + * for each thread). */ + int (*read_buffer)(struct rtos *rtos, target_addr_t address, uint32_t size, + uint8_t *buffer); + int (*write_buffer)(struct rtos *rtos, target_addr_t address, uint32_t size, + const uint8_t *buffer); }; struct stack_register_offset { @@ -127,5 +134,9 @@ void rtos_free_threadlist(struct rtos *rtos); int rtos_smp_init(struct target *target); /* function for handling symbol access */ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_size); +int rtos_read_buffer(struct target *target, target_addr_t address, + uint32_t size, uint8_t *buffer); +int rtos_write_buffer(struct target *target, target_addr_t address, + uint32_t size, const uint8_t *buffer); #endif /* OPENOCD_RTOS_RTOS_H */