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

Unified Diff: src/platform-win32.cc

Issue 173115: Change some integer types to make the x64 Win32 platform happier. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « src/objects-inl.h ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
===================================================================
--- src/platform-win32.cc (revision 2742)
+++ src/platform-win32.cc (working copy)
@@ -54,10 +54,6 @@
#define _WIN32_WINNT 0x500
#endif
-#ifdef _WIN64
-#error Windows 64-bit blatforms not supported
-#endif
-
#include <windows.h>
#include <time.h> // For LocalOffset() implementation.
@@ -1190,6 +1186,9 @@
memset(&context, 0, sizeof(context));
context.ContextFlags = CONTEXT_CONTROL;
context.ContextFlags = CONTEXT_CONTROL;
+#ifdef _WIN64
+ // TODO(X64): Implement context capture.
+#else
__asm call x
__asm x: pop eax
__asm mov context.Eip, eax
@@ -1199,15 +1198,22 @@
// capture the context instead of inline assembler. However it is
// only available on XP, Vista, Server 2003 and Server 2008 which
// might not be sufficient.
+#endif
// Initialize the stack walking
STACKFRAME64 stack_frame;
memset(&stack_frame, 0, sizeof(stack_frame));
+#ifdef _WIN64
+ stack_frame.AddrPC.Offset = context.Rip;
+ stack_frame.AddrFrame.Offset = context.Rbp;
+ stack_frame.AddrStack.Offset = context.Rsp;
+#else
stack_frame.AddrPC.Offset = context.Eip;
+ stack_frame.AddrFrame.Offset = context.Ebp;
+ stack_frame.AddrStack.Offset = context.Esp;
+#endif
stack_frame.AddrPC.Mode = AddrModeFlat;
- stack_frame.AddrFrame.Offset = context.Ebp;
stack_frame.AddrFrame.Mode = AddrModeFlat;
- stack_frame.AddrStack.Offset = context.Esp;
stack_frame.AddrStack.Mode = AddrModeFlat;
int frames_count = 0;
« no previous file with comments | « src/objects-inl.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698