Unexpected error with mona.py on x64 - windbg

My operating system is Windows 10. I configured Mona with WinDbg according to the documentation on the website.
I can use Mona with WinDbg x86. But in WinDbg x64 it says:
0:000> .load pykd.pyd
0:000> !py mona
unexpected error
Could anyone please tell me how to solve it?

Do you have a 2.7.11 python? It has the known bug: python can not be initialized in embedded mode on the Windows ( x86 and x64 both ). See http://www.hexblog.com/?p=949.
I recommend you use 2.7.10.
And I don't recommend you use mona.py in x64 windbg, it can not work properly nor with x64 application nor with wow64 application.

Related

Is it possible to select the architecture of an execute in Command Prompt?

I have SweetHome 3D.exe that include both x86 and x64 in the same installer.
During the process you have a place where you can select which architecture you want x86 or x64.
My problem came in silent mode where it doesn't ask and install x86 by default. Does anybody have an idea which command I need to add to be in x64. This is working, but it miss me the architecture selection option to add:
sweethome3d.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /LANG=french

Windbg under XP Sp3 cant find symbols and nowhere to download

I try to do some basic learnings for exploit dev, so I setup a Win XP SP3 machine, installed WinDbg for XP from here:
http://www.codemachine.com/downloads.html
I set Symbols path to:
srv*c:\symbols*https://msdl.microsoft.com/download/symbols
Then I simply start to debug Windows Media Player wmplayer.exe
When I try to show the !peb, I always get the message that my
Debugger is not using the correct symbols.
Any idea ?

Can't debug AMP code

I can't debug my AMP code.
I have:
Visual Studio 2015,
Windows 10 Home 64bit,
GeForce 660 Ti,
DirectX 12
In my C++ project I've set the 'Debugger type' to 'GPU only (C++ AMP)'
The 'Debugging accelerator type' is 'GPU - Software Emulator'
When I try to place a breakpoint in my lambda, I get the "The breakpoint will not be hit...' icon. Also, when I have code that gets the various accelerator infos, they all have 'is_debug=false'--including the 'direct3d/ref' accelerator and the GeForce 660Ti accelerator.
I've also tried specifically setting the default accelerator to direct3d_ref, but of course i think the problem is that it doesn't have debug, anyway.
What gives?
I've got the same situation.
One hint I found: https://msdn.microsoft.com/en-us/library/hh265136.aspx
"Supported Platforms
Debugging is supported on Windows 7, Windows 8, Windows Server 2008 R2, and Windows Server 2012. For debugging on the software emulator, Windows 8, or Windows Server 2012 is required. For debugging on the hardware, you must install the drivers for your graphics card. Not all hardware vendors implement all debugger features. See the vendor documentation for limitations."
From this, I gather that perhaps AMP debugging is not supported on Windows 10. Or perhaps the documentation is out of date.
It makes sense: AMP is made by Microsoft, but Windows 10 is made by Microsoft, so one would not expect them to be compatible. :)
Before I go back to Windows 8.1, I'd like to know for sure....
Another hint for this: When trying to debug I saw a debug output message saying "Please use the /DEBUG:FULL linker switch to hit breakpoints in C++ AMP code."
After changing the linker settings debugging worked for me.
Is your lambda function a c++/amp restricted Function?
It should be so, otherwise the GPU debugging has no permission to enter a c++ restricted code section.
Maybe that is why you get the:
"The breakpoint will not be hit..."
for more information read:
https://msdn.microsoft.com/en-us/library/hh873133.aspx
Of course a code example would be nice.
to try it out on a different machine.

Installing WinDbg 32-bit on a 64-bit system

I've installed WinDBG on Windows 7 64-bit, however, I want to install the 32 bit version, not the 64 bit version.
I found this link on the internet:
https://social.msdn.microsoft.com/forums/windowsdesktop/en-us/cd004535-75f1-48ee-9176-574b344ddce1/how-to-install-windbg-32bit-on-64bit-system
Following the accepted answer, I do not have that path on my computer.
I have:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Redist
However, there is no "Debugging Tools for Windows" folder in that direcotry like the answer says, only the VC folder. WinDBG is installed and working.
What can I do? Thanks.
You could download Windows SDK ISO file (https://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx) and install 32bit version from there. Also you could use !wow64exts.sw command to debug win32 process or dump using x64 version.

rundll32.exe equivalent for 64-bit DLLs

Is there an equivalent of rundll32.exe for calling 64-bit DLLs?
On 64-bit versions of Windows, two rundll32.exe programs exist:
64-bit: C:\Windows\System32\rundll32.exe
32-bit: C:\Windows\SysWOW64\rundll32.exe
If you are trying to do this from a 32-bit program, you might need to use C:\Windows\Sysnative or temporarily turn off WoW64 file system redirection. See the Microsoft documentation.