Skip to content

Commit

Permalink
Add FreeBSD support to jl_get_rsp_from_ctx (JuliaLang#42038)
Browse files Browse the repository at this point in the history
This was a TODO item in a comment.
  • Loading branch information
ararslan committed Aug 28, 2021
1 parent 88a6376 commit 6e91085
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/signals-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ static inline __attribute__((unused)) uintptr_t jl_get_rsp_from_ctx(const void *
#elif defined(_OS_DARWIN_) && defined(_CPU_AARCH64_)
const ucontext64_t *ctx = (const ucontext64_t*)_ctx;
return ctx->uc_mcontext64->__ss.__sp;
#elif defined(_OS_FREEBSD_) && defined(_CPU_X86_64_)
const ucontext_t *ctx = (const ucontext_t*)_ctx;
return ctx->uc_mcontext.mc_rsp;
#else
// TODO Add support for FreeBSD and PowerPC(64)?
// TODO Add support for PowerPC(64)?
return 0;
#endif
}
Expand Down

0 comments on commit 6e91085

Please sign in to comment.