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

Add support for custom panic handler #8711

Merged
merged 2 commits into from
Oct 6, 2023
Merged

Conversation

me-no-dev
Copy link
Member

redo for: #8574

Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change get_arduino_panic_handler return type to avoid compilation warning. arduino_panic_handler_t is already a pointer.

cores/esp32/esp32-hal-misc.c Outdated Show resolved Hide resolved
cores/esp32/esp32-hal.h Outdated Show resolved Hide resolved
@me-no-dev me-no-dev merged commit 9a28c93 into master Oct 6, 2023
30 checks passed
@me-no-dev me-no-dev deleted the feature/panic_handler branch October 6, 2023 10:48
@Laxilef
Copy link

Laxilef commented Oct 21, 2024

Hi @me-no-dev

Please explain how to work with the set_arduino_panic_handler? Previously, I created an array of pairs and filled it like this:

std::make_pair(esp_cpu_process_stack_pc(stk_frame.pc), stk_frame.sp);

But now the backtrace array in the arduino_panic_info_t structure is filled only PC:

    pc_ptr = esp_cpu_process_stack_pc(stk_frame.pc);
    if (esp_ptr_executable((void *)pc_ptr)) {
      p_info.backtrace[p_info.backtrace_len++] = pc_ptr;
    // ...

How can I get SP? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants