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

Unified Diff: runtime/vm/signal_handler_android.cc

Issue 1184673005: Fix ia32 android build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/signal_handler_android.cc
diff --git a/runtime/vm/signal_handler_android.cc b/runtime/vm/signal_handler_android.cc
index cc42e69859aab55b699158edc0dab91643aa63c2..65407511ec9fe28e1defb2e4f85882a7f9e7898c 100644
--- a/runtime/vm/signal_handler_android.cc
+++ b/runtime/vm/signal_handler_android.cc
@@ -12,7 +12,9 @@ namespace dart {
uintptr_t SignalHandler::GetProgramCounter(const mcontext_t& mcontext) {
uintptr_t pc = 0;
-#if defined(HOST_ARCH_ARM)
+#if defined(HOST_ARCH_IA32)
+ pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
+#elif defined(HOST_ARCH_ARM)
pc = static_cast<uintptr_t>(mcontext.arm_pc);
#elif defined(HOST_ARCH_ARM64)
pc = static_cast<uintptr_t>(mcontext.pc);
@@ -26,7 +28,9 @@ uintptr_t SignalHandler::GetProgramCounter(const mcontext_t& mcontext) {
uintptr_t SignalHandler::GetFramePointer(const mcontext_t& mcontext) {
uintptr_t fp = 0;
-#if defined(HOST_ARCH_ARM)
+#if defined(HOST_ARCH_IA32)
+ fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
+#elif defined(HOST_ARCH_ARM)
fp = static_cast<uintptr_t>(mcontext.arm_fp);
#elif defined(HOST_ARCH_ARM64)
fp = static_cast<uintptr_t>(mcontext.regs[29]);
@@ -41,7 +45,9 @@ uintptr_t SignalHandler::GetFramePointer(const mcontext_t& mcontext) {
uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
uintptr_t sp = 0;
-#if defined(HOST_ARCH_ARM)
+#if defined(HOST_ARCH_IA32)
+ sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(HOST_ARCH_ARM)
sp = static_cast<uintptr_t>(mcontext.arm_sp);
#elif defined(HOST_ARCH_ARM64)
sp = static_cast<uintptr_t>(mcontext.sp);
@@ -55,7 +61,9 @@ uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
uintptr_t sp = 0;
-#if defined(HOST_ARCH_ARM)
+#if defined(HOST_ARCH_IA32)
+ sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(HOST_ARCH_ARM)
sp = static_cast<uintptr_t>(mcontext.arm_sp);
#elif defined(HOST_ARCH_ARM64)
sp = static_cast<uintptr_t>(mcontext.regs[18]);
@@ -68,7 +76,10 @@ uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) {
uintptr_t lr = 0;
-#if defined(HOST_ARCH_ARM)
+
+#if defined(HOST_ARCH_IA32)
+ lr = 0;
+#elif defined(HOST_ARCH_ARM)
lr = static_cast<uintptr_t>(mcontext.arm_lr);
#elif defined(HOST_ARCH_ARM64)
lr = static_cast<uintptr_t>(mcontext.regs[30]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698