|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD |
| 2 | + * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: Apache-2.0 |
5 | 5 | */ |
@@ -150,7 +150,7 @@ typedef struct { |
150 | 150 |
|
151 | 151 | /** |
152 | 152 | * @brief Set a register's offset (relative to CFA). |
153 | | - * The highest bit is set to 1 to mark that this register needs to be retrived because it has been |
| 153 | + * The highest bit is set to 1 to mark that this register needs to be retrieved because it has been |
154 | 154 | * altered. |
155 | 155 | */ |
156 | 156 | #define ESP_EH_FRAME_SET_REG_OFFSET(offset) (0x80000000 | offset) |
@@ -201,7 +201,7 @@ typedef struct { |
201 | 201 | #define ESP_EH_FRAME_GET_CFA_OFF(value) ((value) >> 8) |
202 | 202 |
|
203 | 203 | /** |
204 | | - * @brief Unsupported opcode value to return when exeucting 0-opcode type instructions. |
| 204 | + * @brief Unsupported opcode value to return when executing 0-opcode type instructions. |
205 | 205 | */ |
206 | 206 | #define ESP_EH_FRAME_UNSUPPORTED_OPCODE ((uint32_t) -1) |
207 | 207 |
|
@@ -253,8 +253,8 @@ typedef struct { |
253 | 253 | * @brief Symbols defined by the linker. |
254 | 254 | * Retrieve the addresses of both .eh_frame_hdr and .eh_frame sections. |
255 | 255 | */ |
256 | | -extern void *__eh_frame_hdr; |
257 | | -extern void *__eh_frame; |
| 256 | +extern uint8_t __eh_frame_hdr[]; |
| 257 | +extern uint8_t __eh_frame[]; |
258 | 258 |
|
259 | 259 | /** |
260 | 260 | * @brief Decode multiple bytes encoded in LEB128. |
@@ -727,7 +727,7 @@ static uint32_t esp_eh_frame_initialize_state(const uint8_t* cie, ExecutionFrame |
727 | 727 | * @param state DWARF VM registers. |
728 | 728 | * |
729 | 729 | * @return Return Address of the current context. Frame has been restored to the previous context |
730 | | - * (before calling the function program counter is currently going throught). |
| 730 | + * (before calling the function program counter is currently going through). |
731 | 731 | */ |
732 | 732 | static uint32_t esp_eh_frame_restore_caller_state(const uint32_t* fde, |
733 | 733 | ExecutionFrame* frame, |
@@ -768,7 +768,7 @@ static uint32_t esp_eh_frame_restore_caller_state(const uint32_t* fde, |
768 | 768 | */ |
769 | 769 | bool success = esp_eh_frame_execute(instructions, instructions_length, frame, state); |
770 | 770 | if (!success) { |
771 | | - /* An error occured (unsupported opcode), return PC as the return address. |
| 771 | + /* An error occurred (unsupported opcode), return PC as the return address. |
772 | 772 | * This will be tested by the caller, and the backtrace will be finished. */ |
773 | 773 | return EXECUTION_FRAME_PC(*frame); |
774 | 774 | } |
@@ -799,7 +799,7 @@ static uint32_t esp_eh_frame_restore_caller_state(const uint32_t* fde, |
799 | 799 | /* If the frame was not available, it would be possible to retrieve the return address |
800 | 800 | * register thanks to CIE structure. |
801 | 801 | * The return address points to the address the PC needs to jump to. It |
802 | | - * does NOT point to the instruction where the routine call occured. |
| 802 | + * does NOT point to the instruction where the routine call occurred. |
803 | 803 | * This can cause problems with functions without epilogue (i.e. function |
804 | 804 | * which last instruction is a function call). This happens when compiler |
805 | 805 | * optimization are ON or when a function is marked as "noreturn". |
@@ -840,7 +840,7 @@ static bool esp_eh_frame_missing_info(const uint32_t* fde, uint32_t pc) |
840 | 840 |
|
841 | 841 | /** |
842 | 842 | * @brief When one step of the backtrace is generated, output it to the serial. |
843 | | - * This function can be overriden as it is defined as weak. |
| 843 | + * This function can be overridden as it is defined as weak. |
844 | 844 | * |
845 | 845 | * @param pc Program counter of the backtrace step. |
846 | 846 | * @param sp Stack pointer of the backtrace step. |
|
0 commit comments