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

Unified Diff: runtime/vm/signal_handler_android.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.h ('k') | runtime/vm/signal_handler_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/signal_handler_android.cc
===================================================================
--- runtime/vm/signal_handler_android.cc (revision 40496)
+++ runtime/vm/signal_handler_android.cc (working copy)
@@ -38,7 +38,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_ARM)
@@ -52,6 +52,20 @@
}
+uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
+ uintptr_t sp = 0;
+
+#if defined(TARGET_ARCH_ARM)
+ sp = static_cast<uintptr_t>(mcontext.arm_sp);
+#elif defined(TARGET_ARCH_ARM64)
+ sp = static_cast<uintptr_t>(mcontext.regs[18]);
+#else
+ UNIMPLEMENTED();
+#endif // TARGET_ARCH_...
+ return sp;
+}
+
+
void SignalHandler::Install(SignalAction action) {
struct sigaction act;
memset(&act, 0, sizeof(act));
« no previous file with comments | « runtime/vm/signal_handler.h ('k') | runtime/vm/signal_handler_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698