Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect register values returned in p packet for ESP32-C* (RISC-V) on FreeRTOS (OCD-1055) #352

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/rtos/FreeRTOS.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ static int freertos_read_esp_symbol_table(struct rtos *rtos, int index, uint8_t
assert(val);

if (!rtos_data->esp_symbols) {
if (rtos->symbols == NULL)
return ERROR_FAIL;

if (!rtos->symbols[FREERTOS_VAL_ESP_OPENOCD_PARAMS].address)
return ERROR_FAIL;

Expand Down
60 changes: 30 additions & 30 deletions src/rtos/rtos_freertos_stackings.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,36 +738,36 @@ static const struct rtos_register_stacking rtos_freertos_voluntary_esp32_s3_stac
static const struct stack_register_offset rtos_freertos_riscv_stack_offsets[] = {
{ GDB_REGNO_ZERO, -1, 32 },
{ GDB_REGNO_RA, 0x04, 32 },
{ GDB_REGNO_A0, 0x08, 32 },
{ GDB_REGNO_A1, 0x0C, 32 },
{ GDB_REGNO_A2, 0x10, 32 },
{ GDB_REGNO_A3, 0x14, 32 },
{ GDB_REGNO_A4, 0x18, 32 },
{ GDB_REGNO_A5, 0x1C, 32 },
{ GDB_REGNO_A6, 0x20, 32 },
{ GDB_REGNO_A7, 0x24, 32 },
{ GDB_REGNO_T0, 0x28, 32 },
{ GDB_REGNO_T1, 0x2C, 32 },
{ GDB_REGNO_T2, 0x30, 32 },
{ GDB_REGNO_T3, 0x34, 32 },
{ GDB_REGNO_T4, 0x38, 32 },
{ GDB_REGNO_T5, 0x3C, 32 },
{ GDB_REGNO_T6, 0x40, 32 },
{ GDB_REGNO_SP, 0x44, 32 },
{ GDB_REGNO_GP, 0x48, 32 },
{ GDB_REGNO_TP, 0x4C, 32 },
{ GDB_REGNO_FP, 0x50, 32 },
{ GDB_REGNO_S1, 0x54, 32 },
{ GDB_REGNO_S2, 0x58, 32 },
{ GDB_REGNO_S3, 0x5C, 32 },
{ GDB_REGNO_S4, 0x60, 32 },
{ GDB_REGNO_S5, 0x64, 32 },
{ GDB_REGNO_S6, 0x68, 32 },
{ GDB_REGNO_S7, 0x6C, 32 },
{ GDB_REGNO_S8, 0x70, 32 },
{ GDB_REGNO_S9, 0x74, 32 },
{ GDB_REGNO_S10, 0x78, 32 },
{ GDB_REGNO_S11, 0x7C, 32 },
{ GDB_REGNO_SP, 0x08, 32 },
{ GDB_REGNO_GP, 0x0C, 32 },
{ GDB_REGNO_TP, 0x10, 32 },
{ GDB_REGNO_T0, 0x14, 32 },
{ GDB_REGNO_T1, 0x18, 32 },
{ GDB_REGNO_T2, 0x1C, 32 },
{ GDB_REGNO_FP, 0x20, 32 },
{ GDB_REGNO_S1, 0x24, 32 },
{ GDB_REGNO_A0, 0x28, 32 },
{ GDB_REGNO_A1, 0x2C, 32 },
{ GDB_REGNO_A2, 0x30, 32 },
{ GDB_REGNO_A3, 0x34, 32 },
{ GDB_REGNO_A4, 0x38, 32 },
{ GDB_REGNO_A5, 0x3C, 32 },
{ GDB_REGNO_A6, 0x40, 32 },
{ GDB_REGNO_A7, 0x44, 32 },
{ GDB_REGNO_S2, 0x48, 32 },
{ GDB_REGNO_S3, 0x4C, 32 },
{ GDB_REGNO_S4, 0x50, 32 },
{ GDB_REGNO_S5, 0x54, 32 },
{ GDB_REGNO_S6, 0x58, 32 },
{ GDB_REGNO_S7, 0x5C, 32 },
{ GDB_REGNO_S8, 0x60, 32 },
{ GDB_REGNO_S9, 0x64, 32 },
{ GDB_REGNO_S10, 0x68, 32 },
{ GDB_REGNO_S11, 0x6C, 32 },
{ GDB_REGNO_T3, 0x70, 32 },
{ GDB_REGNO_T4, 0x74, 32 },
{ GDB_REGNO_T5, 0x78, 32 },
{ GDB_REGNO_T6, 0x7C, 32 },
{ GDB_REGNO_PC, 0x00, 32 },
};

Expand Down