esp32_gdbstub: fix build error with esp32-2019r1 toolchain

Fixes https://github.com/espressif/esp-idf/issues/3866
This commit is contained in:
Mahavir Jain
2019-08-07 11:49:55 +05:30
parent 51d811a71c
commit 5203a15439
2 changed files with 6 additions and 2 deletions

View File

@@ -205,12 +205,14 @@ static void handle_H_command(const unsigned char* cmd, int len)
} else if (requested_task_index > s_scratch.task_count) {
ret = "E00";
} else {
TaskHandle_t handle;
TaskHandle_t handle = NULL;
get_task_handle(requested_task_index, &handle);
/* FIXME: for the task currently running on the other CPU, extracting the registers from TCB
* isn't valid. Need to use some IPC mechanism to obtain the registers of the other CPU
*/
esp_gdbstub_tcb_to_regfile(handle, &s_scratch.regfile);
if (handle != NULL) {
esp_gdbstub_tcb_to_regfile(handle, &s_scratch.regfile);
}
}
esp_gdbstub_send_str_packet(ret);
} else {