diff options
author | Steven Stallion <stallion@squareup.com> | 2017-05-03 12:46:11 -0500 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2018-10-16 11:58:03 +0100 |
commit | d92adf8abf6257c2d58ba409731f4d7fa5aa6b5f (patch) | |
tree | 89d1916c89ad13ae50d81a2f5c07a5a84782265d /src/rtos/embKernel.c | |
parent | b5964191f0d2fc3ace607af001df3d57cbfbaf2b (diff) | |
download | riscv-openocd-d92adf8abf6257c2d58ba409731f4d7fa5aa6b5f.zip riscv-openocd-d92adf8abf6257c2d58ba409731f4d7fa5aa6b5f.tar.gz riscv-openocd-d92adf8abf6257c2d58ba409731f4d7fa5aa6b5f.tar.bz2 |
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 <stallion@squareup.com>
Reviewed-on: http://openocd.zylin.com/4121
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/rtos/embKernel.c')
-rw-r--r-- | src/rtos/embKernel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rtos/embKernel.c b/src/rtos/embKernel.c index a40c86c..8a307f1 100644 --- a/src/rtos/embKernel.c +++ b/src/rtos/embKernel.c @@ -34,7 +34,8 @@ static bool embKernel_detect_rtos(struct target *target); static int embKernel_create(struct target *target); static int embKernel_update_threads(struct rtos *rtos); -static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list); +static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, + struct rtos_reg **reg_list, int *num_regs); static int embKernel_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); struct rtos_type embKernel_rtos = { @@ -300,13 +301,13 @@ static int embKernel_update_threads(struct rtos *rtos) return 0; } -static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list) +static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, + struct rtos_reg **reg_list, int *num_regs) { int retval; const struct embKernel_params *param; int64_t stack_ptr = 0; - *hex_reg_list = NULL; if (rtos == NULL) return -1; @@ -326,7 +327,7 @@ static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, c return retval; } - return rtos_generic_stack_read(rtos->target, param->stacking_info, stack_ptr, hex_reg_list); + return rtos_generic_stack_read(rtos->target, param->stacking_info, stack_ptr, reg_list, num_regs); } static int embKernel_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) |