param = (const struct FreeRTOS_params *) rtos->rtos_specific_params;
if (rtos->symbols == NULL) {
- LOG_OUTPUT("No symbols for FreeRTOS\r\n");
+ LOG_ERROR("No symbols for FreeRTOS");
return -3;
}
if (rtos->symbols[FreeRTOS_VAL_uxCurrentNumberOfTasks].address == 0) {
- LOG_OUTPUT("Don't have the number of threads in FreeRTOS \r\n");
+ LOG_ERROR("Don't have the number of threads in FreeRTOS");
return -2;
}
(uint8_t *)&thread_list_size);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read FreeRTOS thread count from target\r\n");
+ LOG_ERROR("Could not read FreeRTOS thread count from target");
return retval;
}
param->pointer_width,
(uint8_t *)&rtos->current_thread);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading current thread in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading current thread in FreeRTOS thread list");
return retval;
}
param->thread_count_width,
(uint8_t *)&list_thread_count);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading number of threads in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading number of threads in FreeRTOS thread list");
free(list_of_lists);
return retval;
}
param->pointer_width,
(uint8_t *)&list_elem_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading first thread item location in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading first thread item location in FreeRTOS thread list");
free(list_of_lists);
return retval;
}
param->pointer_width,
(uint8_t *)&(rtos->thread_details[tasks_found].threadid));
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread list item object in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading thread list item object in FreeRTOS thread list");
free(list_of_lists);
return retval;
}
FREERTOS_THREAD_NAME_STR_SIZE,
(uint8_t *)&tmp_str);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading first thread item location in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading first thread item location in FreeRTOS thread list");
free(list_of_lists);
return retval;
}
param->pointer_width,
(uint8_t *)&list_elem_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading next thread item location in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading next thread item location in FreeRTOS thread list");
free(list_of_lists);
return retval;
}
param->pointer_width,
(uint8_t *)&stack_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading stack frame from FreeRTOS thread\r\n");
+ LOG_ERROR("Error reading stack frame from FreeRTOS thread");
return retval;
}
return rtos_generic_stack_read(rtos->target, param->stacking_info, stack_ptr, hex_reg_list);
-
}
static int FreeRTOS_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[])
FREERTOS_THREAD_NAME_STR_SIZE,
(uint8_t *)&tmp_str);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading first thread item location in FreeRTOS thread list\r\n");
+ LOG_ERROR("Error reading first thread item location in FreeRTOS thread list");
return retval;
}
tmp_str[FREERTOS_THREAD_NAME_STR_SIZE-1] = '\x00';
i++;
}
if (i >= FREERTOS_NUM_PARAMS) {
- LOG_OUTPUT("Could not find target in FreeRTOS compatibility list\r\n");
+ LOG_ERROR("Could not find target in FreeRTOS compatibility list");
return -1;
}
param = (const struct ThreadX_params *) rtos->rtos_specific_params;
if (rtos->symbols == NULL) {
- LOG_OUTPUT("No symbols for ThreadX\r\n");
+ LOG_ERROR("No symbols for ThreadX");
return -4;
}
if (rtos->symbols[ThreadX_VAL_tx_thread_created_count].address == 0) {
- LOG_OUTPUT("Don't have the number of threads in ThreadX \r\n");
+ LOG_ERROR("Don't have the number of threads in ThreadX");
return -2;
}
(uint8_t *)&thread_list_size);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read ThreadX thread count from target\r\n");
+ LOG_ERROR("Could not read ThreadX thread count from target");
return retval;
}
(uint8_t *)&rtos->current_thread);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read ThreadX current thread from target\r\n");
+ LOG_ERROR("Could not read ThreadX current thread from target");
return retval;
}
param->pointer_width,
(uint8_t *)&thread_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read ThreadX thread location from target\r\n");
+ LOG_ERROR("Could not read ThreadX thread location from target");
return retval;
}
param->pointer_width,
(uint8_t *)&name_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read ThreadX thread name pointer from target\r\n");
+ LOG_ERROR("Could not read ThreadX thread name pointer from target");
return retval;
}
THREADX_THREAD_NAME_STR_SIZE,
(uint8_t *)&tmp_str);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread name from ThreadX target\r\n");
+ LOG_ERROR("Error reading thread name from ThreadX target");
return retval;
}
tmp_str[THREADX_THREAD_NAME_STR_SIZE-1] = '\x00';
4,
(uint8_t *)&thread_status);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread state from ThreadX target\r\n");
+ LOG_ERROR("Error reading thread state from ThreadX target");
return retval;
}
param->pointer_width,
(uint8_t *) &thread_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading next thread pointer in ThreadX thread list\r\n");
+ LOG_ERROR("Error reading next thread pointer in ThreadX thread list");
return retval;
}
}
param->pointer_width,
(uint8_t *)&stack_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading stack frame from ThreadX thread\r\n");
+ LOG_ERROR("Error reading stack frame from ThreadX thread");
return retval;
}
param = (const struct ThreadX_params *) rtos->rtos_specific_params;
if (rtos->symbols == NULL) {
- LOG_OUTPUT("No symbols for ThreadX\r\n");
+ LOG_ERROR("No symbols for ThreadX");
return -3;
}
param->pointer_width,
(uint8_t *)&name_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read ThreadX thread name pointer from target\r\n");
+ LOG_ERROR("Could not read ThreadX thread name pointer from target");
return retval;
}
THREADX_THREAD_NAME_STR_SIZE,
(uint8_t *)&tmp_str);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread name from ThreadX target\r\n");
+ LOG_ERROR("Error reading thread name from ThreadX target");
return retval;
}
tmp_str[THREADX_THREAD_NAME_STR_SIZE-1] = '\x00';
4,
(uint8_t *)&thread_status);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread state from ThreadX target\r\n");
+ LOG_ERROR("Error reading thread state from ThreadX target");
return retval;
}
i++;
}
if (i >= THREADX_NUM_PARAMS) {
- LOG_OUTPUT("Could not find target in ThreadX compatibility list\r\n");
+ LOG_ERROR("Could not find target in ThreadX compatibility list");
return -1;
}
param = (const struct eCos_params *) rtos->rtos_specific_params;
if (rtos->symbols == NULL) {
- LOG_OUTPUT("No symbols for eCos\r\n");
+ LOG_ERROR("No symbols for eCos");
return -4;
}
if (rtos->symbols[eCos_VAL_thread_list].address == 0) {
- LOG_OUTPUT("Don't have the thread list head\r\n");
+ LOG_ERROR("Don't have the thread list head");
return -2;
}
2,
(uint8_t *)&rtos->current_thread);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read eCos current thread from target\r\n");
+ LOG_ERROR("Could not read eCos current thread from target");
return retval;
}
2,
(uint8_t *)&thread_id);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read eCos thread id from target\r\n");
+ LOG_ERROR("Could not read eCos thread id from target");
return retval;
}
rtos->thread_details[tasks_found].threadid = thread_id;
param->pointer_width,
(uint8_t *)&name_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Could not read eCos thread name pointer from target\r\n");
+ LOG_ERROR("Could not read eCos thread name pointer from target");
return retval;
}
ECOS_THREAD_NAME_STR_SIZE,
(uint8_t *)&tmp_str);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread name from eCos target\r\n");
+ LOG_ERROR("Error reading thread name from eCos target");
return retval;
}
tmp_str[ECOS_THREAD_NAME_STR_SIZE-1] = '\x00';
4,
(uint8_t *)&thread_status);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading thread state from eCos target\r\n");
+ LOG_ERROR("Error reading thread state from eCos target");
return retval;
}
param->pointer_width,
(uint8_t *) &thread_index);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading next thread pointer in eCos thread list\r\n");
+ LOG_ERROR("Error reading next thread pointer in eCos thread list");
return retval;
}
} while (thread_index != first_thread);
2,
(uint8_t *)&id);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading unique id from eCos thread\r\n");
+ LOG_ERROR("Error reading unique id from eCos thread");
return retval;
}
param->pointer_width,
(uint8_t *)&stack_ptr);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading stack frame from eCos thread\r\n");
+ LOG_ERROR("Error reading stack frame from eCos thread");
return retval;
}
i++;
}
if (i >= ECOS_NUM_PARAMS) {
- LOG_OUTPUT("Could not find target in eCos compatibility list\r\n");
+ LOG_ERROR("Could not find target in eCos compatibility list");
return -1;
}
}
if (os->type->detect_rtos(target)) {
- LOG_OUTPUT("Auto-detected RTOS: %s\r\n", os->type->name);
+ LOG_INFO("Auto-detected RTOS: %s", os->type->name);
rtos_detected = 1;
goto done;
} else {
}
if (8 + (strlen(next_sym) * 2) + 1 > sizeof(reply)) {
- LOG_OUTPUT("ERROR: RTOS symbol '%s' name is too long for GDB!", next_sym);
+ LOG_ERROR("ERROR: RTOS symbol '%s' name is too long for GDB!", next_sym);
goto done;
}
int retval;
if (stack_ptr == 0) {
- LOG_OUTPUT("Error: null stack pointer in thread\r\n");
+ LOG_ERROR("Error: null stack pointer in thread");
return -5;
}
/* Read the stack */
address -= stacking->stack_registers_size;
retval = target_read_buffer(target, address, stacking->stack_registers_size, stack_data);
if (retval != ERROR_OK) {
- LOG_OUTPUT("Error reading stack frame from FreeRTOS thread\r\n");
+ LOG_ERROR("Error reading stack frame from FreeRTOS thread");
return retval;
}
#if 0