aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/rtos.c
diff options
context:
space:
mode:
authorEvan Hunter <ehunter@broadcom.com>2014-11-21 17:07:43 +0000
committerPaul Fertser <fercerpav@gmail.com>2015-04-14 11:42:58 +0100
commit0836a0fa21e7f2363891c04b195ddb91f94abf28 (patch)
tree3670b7eb485825b5c5b2ac4af2dcea20517fc258 /src/rtos/rtos.c
parentd06b09595b4c15d02660964bf9706cbd469b16d4 (diff)
downloadriscv-openocd-0836a0fa21e7f2363891c04b195ddb91f94abf28.zip
riscv-openocd-0836a0fa21e7f2363891c04b195ddb91f94abf28.tar.gz
riscv-openocd-0836a0fa21e7f2363891c04b195ddb91f94abf28.tar.bz2
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>
Diffstat (limited to 'src/rtos/rtos.c')
-rw-r--r--src/rtos/rtos.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index f14e538..9451703 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -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++)