From 2ef78de6cf54ede74ec10db2769a89f6a86b3a94 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" <SND\kernelnet_cp@9b283d60-5439-405e-af05-b73fd8c4d996> Date: Wed, 21 Nov 2012 07:37:47 +0000 Subject: [PATCH] [0.2.x] fixed : is64BitSystem return false in wow64 mode git-svn-id: https://pykd.svn.codeplex.com/svn@81254 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/win/dbgeng.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pykd/win/dbgeng.cpp b/pykd/win/dbgeng.cpp index b4381e5..6b32982 100644 --- a/pykd/win/dbgeng.cpp +++ b/pykd/win/dbgeng.cpp @@ -564,12 +564,13 @@ bool is64bitSystem() PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate ); HRESULT hres; - - hres = g_dbgEng->control->IsPointer64Bit(); + ULONG procType; + + hres = g_dbgEng->control->GetActualProcessorType( &procType ); if ( FAILED( hres ) ) - throw DbgException( "IDebugControl::IsPointer64Bit failed" ); + throw DbgException( "IDebugControl::GetActualProcessorType failed" ); - return hres == S_OK; + return procType == IMAGE_FILE_MACHINE_AMD64; } ///////////////////////////////////////////////////////////////////////////////