RTOS: Add logging to FreeRTOS and general RTOS
Change-Id: I43d14f3b59daae7f90c344abdf71eaa8f74ef7ef Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/2391 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
committed by
Paul Fertser
parent
d06b09595b
commit
0836a0fa21
@@ -406,8 +406,11 @@ int rtos_thread_packet(struct connection *connection, char const *packet, int pa
|
||||
return ERROR_OK;
|
||||
} else if (packet[0] == 'H') { /* Set current thread ( 'c' for step and continue, 'g' for
|
||||
* all other operations ) */
|
||||
if ((packet[1] == 'g') && (target->rtos != NULL))
|
||||
if ((packet[1] == 'g') && (target->rtos != NULL)) {
|
||||
sscanf(packet, "Hg%16" SCNx64, &target->rtos->current_threadid);
|
||||
LOG_DEBUG("RTOS: GDB requested to set current thread to 0x%" PRIx64 "\r\n",
|
||||
target->rtos->current_threadid);
|
||||
}
|
||||
gdb_put_packet(connection, "OK", 2);
|
||||
return ERROR_OK;
|
||||
}
|
||||
@@ -424,6 +427,12 @@ int rtos_get_gdb_reg_list(struct connection *connection)
|
||||
((current_threadid != target->rtos->current_thread) ||
|
||||
(target->smp))) { /* in smp several current thread are possible */
|
||||
char *hex_reg_list;
|
||||
|
||||
LOG_DEBUG("RTOS: getting register list for thread 0x%" PRIx64
|
||||
", target->rtos->current_thread=0x%" PRIx64 "\r\n",
|
||||
current_threadid,
|
||||
target->rtos->current_thread);
|
||||
|
||||
target->rtos->type->get_thread_reg_list(target->rtos,
|
||||
current_threadid,
|
||||
&hex_reg_list);
|
||||
@@ -464,6 +473,8 @@ int rtos_generic_stack_read(struct target *target,
|
||||
LOG_ERROR("Error reading stack frame from thread");
|
||||
return retval;
|
||||
}
|
||||
LOG_DEBUG("RTOS: Read stack frame at 0x%x\r\n", address);
|
||||
|
||||
#if 0
|
||||
LOG_OUTPUT("Stack Data :");
|
||||
for (i = 0; i < stacking->stack_registers_size; i++)
|
||||
|
||||
Reference in New Issue
Block a user