Skip to content

Commit

Permalink
fix(unwind): convert ucontext_t to unw_context_t on linux aarch64 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchanns authored Jun 7, 2024
1 parent e250b64 commit 72e2f38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bee/crash/unwind_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
namespace bee::crash {
void unwind(ucontext_t *ctx, uint16_t skip, unwind_callback func, void *ud) noexcept {
unw_cursor_t cursor;
#if defined(__aarch64__)
unw_context_t *unw_ctx = (unw_context_t *)ctx;
unw_init_local(&cursor, unw_ctx);
#else
unw_init_local(&cursor, ctx);
#endif
while (unw_step(&cursor) > 0) {
unw_word_t pc;
unw_get_reg(&cursor, UNW_REG_IP, &pc);
Expand Down

0 comments on commit 72e2f38

Please sign in to comment.