diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index c9c4efd41..0e747e3e4 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -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 == NULL) { + 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),