diff options
author | Jie Zhang <jie.zhang@analog.com> | 2011-08-24 11:23:04 -0400 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-08-24 17:41:35 +0200 |
commit | 8d7ddde5f104dde8949dbefcad85f08b7313e126 (patch) | |
tree | e4378bc00ddde2eac4b525552ec98c04ce43bf61 /src/rtos | |
parent | 32862ed9f80e95ffca837247c905cde6857229e8 (diff) | |
download | riscv-openocd-8d7ddde5f104dde8949dbefcad85f08b7313e126.zip riscv-openocd-8d7ddde5f104dde8949dbefcad85f08b7313e126.tar.gz riscv-openocd-8d7ddde5f104dde8949dbefcad85f08b7313e126.tar.bz2 |
remove target argument from gdb packet handling functions
Diffstat (limited to 'src/rtos')
-rw-r--r-- | src/rtos/rtos.c | 8 | ||||
-rw-r--r-- | src/rtos/rtos.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 263795c..74e8724 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -128,8 +128,10 @@ int rtos_create(Jim_GetOptInfo *goi, struct target * target) -int gdb_thread_packet(struct connection *connection, struct target *target, char *packet, int packet_size) +int gdb_thread_packet(struct connection *connection, char *packet, int packet_size) { + struct target *target = get_target_from_connection(connection); + if (strstr(packet, "qP")) { #define TAG_THREADID 1 /* Echo the thread identifier */ @@ -501,8 +503,10 @@ int gdb_thread_packet(struct connection *connection, struct target *target, char return GDB_THREAD_PACKET_NOT_CONSUMED; } -int rtos_get_gdb_reg_list(struct connection *connection, struct target *target, struct reg **reg_list[], int *reg_list_size) +int rtos_get_gdb_reg_list(struct connection *connection, struct reg **reg_list[], int *reg_list_size) { + struct target *target = get_target_from_connection(connection); + if ( ( target->rtos != NULL ) && ( current_threadid != -1 ) && ( current_threadid != 0 ) && diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h index a6378c6..1a73bd7 100644 --- a/src/rtos/rtos.h +++ b/src/rtos/rtos.h @@ -99,8 +99,8 @@ struct rtos_register_stacking int rtos_create(Jim_GetOptInfo *goi, struct target * target); int rtos_generic_stack_read( struct target * target, const struct rtos_register_stacking* stacking, int64_t stack_ptr, char ** hex_reg_list ); int rtos_try_next( struct target * target ); -int gdb_thread_packet(struct connection *connection, struct target *target, char *packet, int packet_size); -int rtos_get_gdb_reg_list(struct connection *connection, struct target *target, struct reg **reg_list[], int *reg_list_size); +int gdb_thread_packet(struct connection *connection, char *packet, int packet_size); +int rtos_get_gdb_reg_list(struct connection *connection, struct reg **reg_list[], int *reg_list_size); int rtos_update_threads( struct target *target ); #endif // RTOS_H |