uint64_t->target_addr_t for stack pointers.
[openocd.git] / src / rtos / rtos.c
index c9c4efd41be25aace93def82a3ed391ec4f9b451..f401c3d30bdacfe7b07b6c1d5f6324b35ff64c6c 100644 (file)
@@ -234,7 +234,7 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s
        uint64_t addr = 0;
        size_t reply_len;
        char reply[GDB_BUFFER_SIZE + 1], cur_sym[GDB_BUFFER_SIZE / 2 + 1] = ""; /* Extra byte for null-termination */
-       struct symbol_table_elem *next_sym = NULL;
+       struct symbol_table_elem *next_sym;
        struct target *target = get_target_from_connection(connection);
        struct rtos *os = target->rtos;
 
@@ -266,8 +266,17 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s
                        cur_sym[0] = '\x00';
                }
        }
+
+       LOG_DEBUG("RTOS: Address of symbol '%s' is 0x%" PRIx64, cur_sym, addr);
+
        next_sym = next_symbol(os, cur_sym, addr);
 
+       /* Should never happen unless the debugger misbehaves */
+       if (!next_sym) {
+               LOG_WARNING("RTOS: Debugger sent us qSymbol with '%s' that we did not ask for", cur_sym);
+               goto done;
+       }
+
        if (!next_sym->symbol_name) {
                /* No more symbols need looking up */
 
@@ -291,6 +300,8 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s
                goto done;
        }
 
+       LOG_DEBUG("RTOS: Requesting symbol lookup of '%s' from the debugger", next_sym->symbol_name);
+
        reply_len = snprintf(reply, sizeof(reply), "qSymbol:");
        reply_len += hexify(reply + reply_len,
                (const uint8_t *)next_sym->symbol_name, strlen(next_sym->symbol_name),
@@ -605,7 +616,7 @@ int rtos_generic_stack_read(struct target *target,
                LOG_OUTPUT("\r\n");
 #endif
 
-       int64_t new_stack_ptr;
+       target_addr_t new_stack_ptr;
        if (stacking->calculate_process_stack) {
                new_stack_ptr = stacking->calculate_process_stack(target,
                                stack_data, stacking, stack_ptr);

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)