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

Unified Diff: runtime/vm/thread_interrupter_win.cc

Issue 443763003: Fix profiler on Win64 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « 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/thread_interrupter_win.cc
diff --git a/runtime/vm/thread_interrupter_win.cc b/runtime/vm/thread_interrupter_win.cc
index ef9223fcf351d65f117ba7f45157fcc1db3941d8..a7e66ab111d92b5fd588ea15c2d278401c1a48b4 100644
--- a/runtime/vm/thread_interrupter_win.cc
+++ b/runtime/vm/thread_interrupter_win.cc
@@ -19,7 +19,16 @@ class ThreadInterrupterWin : public AllStatic {
static bool GrabRegisters(HANDLE handle, InterruptedThreadState* state) {
CONTEXT context;
memset(&context, 0, sizeof(context));
+#if defined(TARGET_ARCH_IA32)
+ // On IA32, CONTEXT_CONTROL includes Eip, Ebp, and Esp.
context.ContextFlags = CONTEXT_CONTROL;
+#elif defined(TARGET_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();
+#endif
if (GetThreadContext(handle, &context) != 0) {
#if defined(TARGET_ARCH_IA32)
state->pc = static_cast<uintptr_t>(context.Eip);
« 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