Skip to content

Commit

Permalink
deps: v8: cherry-pick cf71540c
Browse files Browse the repository at this point in the history
Original commit message:
    mac/arm64: Port SignalHandler::FillRegisterState().

    Bug: chromium:1098899
    Change-Id: I3ff79c00063f7da36b141a3a7b0d2daa71c9801a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270705
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    Auto-Submit: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68568}

Refs: nodejs#35415, nodejs#38005
  • Loading branch information
a60814billy committed Apr 2, 2021
1 parent 270801c commit 83501fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.26',
'v8_embedder_string': '-node.27',

##### V8 defaults for Node.js #####

Expand Down
9 changes: 8 additions & 1 deletion deps/v8/src/libsampler/sampler.cc
Expand Up @@ -468,7 +468,14 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
state->pc = reinterpret_cast<void*>(mcontext->__ss.__eip);
state->sp = reinterpret_cast<void*>(mcontext->__ss.__esp);
state->fp = reinterpret_cast<void*>(mcontext->__ss.__ebp);
#endif // V8_HOST_ARCH_IA32
#elif V8_HOST_ARCH_ARM64
state->pc =
reinterpret_cast<void*>(arm_thread_state64_get_pc(mcontext->__ss));
state->sp =
reinterpret_cast<void*>(arm_thread_state64_get_sp(mcontext->__ss));
state->fp =
reinterpret_cast<void*>(arm_thread_state64_get_fp(mcontext->__ss));
#endif // V8_HOST_ARCH_*
#elif V8_OS_FREEBSD
#if V8_HOST_ARCH_IA32
state->pc = reinterpret_cast<void*>(mcontext.mc_eip);
Expand Down

0 comments on commit 83501fd

Please sign in to comment.