X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Frtos%2Frtos.c;fp=src%2Frtos%2Frtos.c;h=4552a87d150c353388cfc888d3040fb8d8cbb5e5;hp=84ee498beaa1af2b0ca19b5ae656bda04f6d00eb;hb=293fb9b25faf8c89a9d06d73b83526b86d4c14d8;hpb=d301d8b42f0bfe67d76d6f340db6570cc71c876e diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 84ee498bea..4552a87d15 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -57,6 +57,15 @@ int rtos_smp_init(struct target *target) return ERROR_TARGET_INIT_FAILED; } +static int rtos_target_for_threadid(struct connection *connection, int64_t threadid, struct target **t) +{ + struct target *curr = get_target_from_connection(connection); + if (t) + *t = curr; + + return ERROR_OK; +} + static int os_alloc(struct target *target, struct rtos_type *ostype) { struct rtos *os = target->rtos = calloc(1, sizeof(struct rtos)); @@ -72,6 +81,7 @@ static int os_alloc(struct target *target, struct rtos_type *ostype) /* RTOS drivers can override the packet handler in _create(). */ os->gdb_thread_packet = rtos_thread_packet; + os->gdb_target_for_threadid = rtos_target_for_threadid; return JIM_OK; }