rtos: Fix wrong ReadyList lookup in ChibiOS
authorMatthias Blaicher <matthias@blaicher.com>
Sun, 4 Nov 2012 13:56:08 +0000 (14:56 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 5 Nov 2012 09:37:56 +0000 (09:37 +0000)
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>
src/rtos/ChibiOS.c

index c838b493c7d5f965bab2a2cfe6ee72de61e241d2..be5fe8472d29f0ce339ec9b96efcfa4b4ecc1cf1 100644 (file)
@@ -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) {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)