rtos/FreeRTOS: Fix FreeRTOS thread list reading
Change-Id: I749ae94ec7279907b1905c02ecc1e9661f43ef70 Signed-off-by: Rahul Masurkar <rahulgm@marvell.com> Reviewed-on: http://openocd.zylin.com/5273 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
bb1c7ae4ae
commit
6568d29cc1
|
@ -263,14 +263,14 @@ static int FreeRTOS_update_threads(struct rtos *rtos)
|
||||||
|
|
||||||
symbol_address_t *list_of_lists =
|
symbol_address_t *list_of_lists =
|
||||||
malloc(sizeof(symbol_address_t) *
|
malloc(sizeof(symbol_address_t) *
|
||||||
(max_used_priority+1 + 5));
|
(max_used_priority + 5));
|
||||||
if (!list_of_lists) {
|
if (!list_of_lists) {
|
||||||
LOG_ERROR("Error allocating memory for %" PRId64 " priorities", max_used_priority);
|
LOG_ERROR("Error allocating memory for %" PRId64 " priorities", max_used_priority);
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int num_lists;
|
int num_lists;
|
||||||
for (num_lists = 0; num_lists <= max_used_priority; num_lists++)
|
for (num_lists = 0; num_lists < max_used_priority; num_lists++)
|
||||||
list_of_lists[num_lists] = rtos->symbols[FreeRTOS_VAL_pxReadyTasksLists].address +
|
list_of_lists[num_lists] = rtos->symbols[FreeRTOS_VAL_pxReadyTasksLists].address +
|
||||||
num_lists * param->list_width;
|
num_lists * param->list_width;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue