From d92adf8abf6257c2d58ba409731f4d7fa5aa6b5f Mon Sep 17 00:00:00 2001 From: Steven Stallion Date: Wed, 3 May 2017 12:46:11 -0500 Subject: rtos: support gdb_get_register_packet This patch adds support for p packet responses by targets configured with RTOS support. This change required moving to a rtos_reg struct, which is similar to struct reg used by targets, which resulted in needing to update each stacking with register numbers. This patch also allows targets with non-linear register numbers to function with RTOSes as well. Change-Id: I5b189d74110d6b6f2fa851a67ab0762ae6b1832f Signed-off-by: Steven Stallion Reviewed-on: http://openocd.zylin.com/4121 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/rtos/eCos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/rtos/eCos.c') diff --git a/src/rtos/eCos.c b/src/rtos/eCos.c index 9e41030..e6b7073 100644 --- a/src/rtos/eCos.c +++ b/src/rtos/eCos.c @@ -30,7 +30,7 @@ static bool eCos_detect_rtos(struct target *target); static int eCos_create(struct target *target); static int eCos_update_threads(struct rtos *rtos); -static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list); +static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); static int eCos_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); struct eCos_thread_state { @@ -285,13 +285,12 @@ static int eCos_update_threads(struct rtos *rtos) return 0; } -static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list) +static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, + struct rtos_reg **reg_list, int *num_regs) { int retval; const struct eCos_params *param; - *hex_reg_list = NULL; - if (rtos == NULL) return -1; @@ -345,7 +344,8 @@ static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char * return rtos_generic_stack_read(rtos->target, param->stacking_info, stack_ptr, - hex_reg_list); + reg_list, + num_regs); } return -1; -- cgit v1.1