aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Blaicher <matthias@blaicher.com>2012-11-04 14:56:08 +0100
committerSpencer Oliver <spen@spen-soft.co.uk>2012-11-05 09:37:56 +0000
commit8104b58dbc55c7300b343231cc5bd430063d5721 (patch)
tree34cac28331a789f62698bc638c091137652c834c /src
parentfc302a025270ee6e1099aa58c1c833b0d080e4ce (diff)
downloadriscv-openocd-8104b58dbc55c7300b343231cc5bd430063d5721.zip
riscv-openocd-8104b58dbc55c7300b343231cc5bd430063d5721.tar.gz
riscv-openocd-8104b58dbc55c7300b343231cc5bd430063d5721.tar.bz2
rtos: Fix wrong ReadyList lookup in ChibiOS
We already have the address of the ReadyList provided by gdb. It is wrong to resolve that address a second time and it only works by accident. Change-Id: I82fa2360931c416290cd7f83e1883f86f90dedc2 Signed-off-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-on: http://openocd.zylin.com/959 Reviewed-by: Joel Bodenmann <joel@unormal.org> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/rtos/ChibiOS.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/rtos/ChibiOS.c b/src/rtos/ChibiOS.c
index c838b49..be5fe84 100644
--- a/src/rtos/ChibiOS.c
+++ b/src/rtos/ChibiOS.c
@@ -268,19 +268,11 @@ static int ChibiOS_update_threads(struct rtos *rtos)
/* ChibiOS does not save the current thread count. We have to first
* parse the double linked thread list to check for errors and the number of
* threads. */
- uint32_t rlist;
+ const uint32_t rlist = rtos->symbols[ChibiOS_VAL_rlist].address;
uint32_t current;
uint32_t previous;
uint32_t older;
- retval = target_read_buffer(rtos->target,
- rtos->symbols[ChibiOS_VAL_rlist].address,
- param->signature->ch_ptrsize,
- (uint8_t *)&rlist);
- if (retval != ERROR_OK) {
- LOG_ERROR("Could not read ChibiOS ReadyList from target");
- return retval;
- }
current = rlist;
previous = rlist;
while (1) {