summaryrefslogtreecommitdiff
path: root/deps/v8/src/trap-handler/trap-handler-simulator.h
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2023-03-30 12:11:08 +0200
committerNode.js GitHub Bot <github-bot@iojs.org>2023-03-31 14:15:23 +0000
commitf226350fcbebd4449fb0034fdaffa147e4de28ea (patch)
tree8896397ec8829c238012bfbe9781f4e2d94708bc /deps/v8/src/trap-handler/trap-handler-simulator.h
parent10928cb0a4643a11c02af7bab93fc4b5abe2ce7d (diff)
downloadnode-new-f226350fcbebd4449fb0034fdaffa147e4de28ea.tar.gz
deps: update V8 to 11.3.244.4
PR-URL: https://github.com/nodejs/node/pull/47251 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
Diffstat (limited to 'deps/v8/src/trap-handler/trap-handler-simulator.h')
-rw-r--r--deps/v8/src/trap-handler/trap-handler-simulator.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/deps/v8/src/trap-handler/trap-handler-simulator.h b/deps/v8/src/trap-handler/trap-handler-simulator.h
index bfceb49697..0ab80d202e 100644
--- a/deps/v8/src/trap-handler/trap-handler-simulator.h
+++ b/deps/v8/src/trap-handler/trap-handler-simulator.h
@@ -7,6 +7,8 @@
#include <cstdint>
+#include "include/v8config.h"
+
// This header defines the ProbeMemory function to be used by simulators to
// trigger a signal at a defined location, before doing an actual memory access.
@@ -16,9 +18,7 @@
#error "Do only include this file on simulator builds on x64."
#endif
-namespace v8 {
-namespace internal {
-namespace trap_handler {
+namespace v8::internal::trap_handler {
// Probe a memory address by doing a 1-byte read from the given address. If the
// address is not readable, this will cause a trap as usual, but the trap
@@ -28,10 +28,16 @@ namespace trap_handler {
// is not registered as a protected instruction, the signal will be propagated
// as usual.
// If the read at {address} succeeds, this function returns {0} instead.
-extern "C" uintptr_t ProbeMemory(uintptr_t address, uintptr_t pc);
+uintptr_t ProbeMemory(uintptr_t address, uintptr_t pc)
+// Specify an explicit symbol name (defined in
+// handler-outside-simulator.cc). Just {extern "C"} would produce
+// "ProbeMemory", but we want something more expressive on stack traces.
+#if V8_OS_DARWIN
+ asm("_v8_internal_simulator_ProbeMemory");
+#else
+ asm("v8_internal_simulator_ProbeMemory");
+#endif
-} // namespace trap_handler
-} // namespace internal
-} // namespace v8
+} // namespace v8::internal::trap_handler
#endif // V8_TRAP_HANDLER_TRAP_HANDLER_SIMULATOR_H_