Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Unified Diff: runtime/vm/signal_handler_macos.cc

Issue 583683002: Fixes for the profiler on arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/signal_handler_linux.cc ('k') | runtime/vm/signal_handler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/signal_handler_macos.cc
===================================================================
--- runtime/vm/signal_handler_macos.cc (revision 40496)
+++ runtime/vm/signal_handler_macos.cc (working copy)
@@ -20,6 +20,8 @@
pc = static_cast<uintptr_t>(mcontext->__ss.__eip);
#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
pc = static_cast<uintptr_t>(mcontext->__ss.__eip);
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
+ pc = static_cast<uintptr_t>(mcontext->__ss.__rip);
#else
UNIMPLEMENTED();
#endif // TARGET_ARCH_...
@@ -39,6 +41,8 @@
fp = static_cast<uintptr_t>(mcontext->__ss.__ebp);
#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
fp = static_cast<uintptr_t>(mcontext->__ss.__ebp);
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
+ fp = static_cast<uintptr_t>(mcontext->__ss.__rbp);
#else
UNIMPLEMENTED();
#endif // TARGET_ARCH_...
@@ -47,7 +51,7 @@
}
-uintptr_t SignalHandler::GetStackPointer(const mcontext_t& mcontext) {
+uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
uintptr_t sp = 0;
#if defined(TARGET_ARCH_IA32)
@@ -58,6 +62,8 @@
sp = static_cast<uintptr_t>(mcontext->__ss.__esp);
#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
sp = static_cast<uintptr_t>(mcontext->__ss.__esp);
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
+ sp = static_cast<uintptr_t>(mcontext->__ss.__rsp);
#else
UNIMPLEMENTED();
#endif // TARGET_ARCH_...
@@ -66,6 +72,11 @@
}
+uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
+ return GetCStackPointer(mcontext);
+}
+
+
void SignalHandler::Install(SignalAction action) {
struct sigaction act;
act.sa_handler = NULL;
« no previous file with comments | « runtime/vm/signal_handler_linux.cc ('k') | runtime/vm/signal_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698