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

Unified Diff: runtime/vm/thread_interrupter_win.cc

Issue 1290613002: Allow simulator runs on Windows: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/atomic_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_interrupter_win.cc
diff --git a/runtime/vm/thread_interrupter_win.cc b/runtime/vm/thread_interrupter_win.cc
index 07feed063a07e5e70685e3a71238beb651b9e664..1bfd84f78bc501896064a641709e70d5fec0e0b6 100644
--- a/runtime/vm/thread_interrupter_win.cc
+++ b/runtime/vm/thread_interrupter_win.cc
@@ -21,29 +21,29 @@ class ThreadInterrupterWin : public AllStatic {
static bool GrabRegisters(HANDLE handle, InterruptedThreadState* state) {
CONTEXT context;
memset(&context, 0, sizeof(context));
-#if defined(TARGET_ARCH_IA32)
+#if defined(HOST_ARCH_IA32)
// On IA32, CONTEXT_CONTROL includes Eip, Ebp, and Esp.
context.ContextFlags = CONTEXT_CONTROL;
-#elif defined(TARGET_ARCH_X64)
+#elif defined(HOST_ARCH_X64)
// On X64, CONTEXT_CONTROL includes Rip and Rsp. Rbp is classified
// as an "integer" register.
context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
#else
- UNIMPLEMENTED();
+#error Unsupported architecture.
#endif
if (GetThreadContext(handle, &context) != 0) {
-#if defined(TARGET_ARCH_IA32)
+#if defined(HOST_ARCH_IA32)
state->pc = static_cast<uintptr_t>(context.Eip);
state->fp = static_cast<uintptr_t>(context.Ebp);
state->csp = static_cast<uintptr_t>(context.Esp);
state->dsp = static_cast<uintptr_t>(context.Esp);
-#elif defined(TARGET_ARCH_X64)
+#elif defined(HOST_ARCH_X64)
state->pc = static_cast<uintptr_t>(context.Rip);
state->fp = static_cast<uintptr_t>(context.Rbp);
state->csp = static_cast<uintptr_t>(context.Rsp);
state->dsp = static_cast<uintptr_t>(context.Rsp);
#else
- UNIMPLEMENTED();
+#error Unsupported architecture.
#endif
return true;
}
« no previous file with comments | « runtime/vm/atomic_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698