The detection framework assumes rtos->symbols is dynamically allocated,
an assumption that the ChibiOS variant breaks by providing a raw statically
allocated symbol list.
Change-Id: I379bcc2af99006912608ddd3f646ff7085606f47
Signed-off-by: Richard Braun <rbraun@sceen.net>
Reviewed-on: http://openocd.zylin.com/2597
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
static int ChibiOS_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[])
{
- *symbol_list = ChibiOS_symbol_list;
+ *symbol_list = malloc(sizeof(ChibiOS_symbol_list));
+
+ if (*symbol_list == NULL)
+ return ERROR_FAIL;
+
+ memcpy(*symbol_list, ChibiOS_symbol_list, sizeof(ChibiOS_symbol_list));
return 0;
}