Is there any build instruction for pykd?

Aug 23, 2011 at 11:48 AM

I tried to build pykd in VS2010, but it seems there is no `boost\python` in the source, so the build failed. Where can I get these files?

 

Besides, I tried to load the binaries downloaded directly in this site, but the loading of pykd to windbg failed which says "Procedure "Py_InitModule4_64" could not be located in DLL "python26.dll", what's the problem here?

Coordinator
Aug 23, 2011 at 12:38 PM
Edited Aug 23, 2011 at 12:49 PM

1)

Unfortunatlly, there is an articale on russian only ( google translate: http://translate.google.ru/translate?js=n&prev=_t&hl=ru&ie=UTF-8&layout=2&eotf=1&sl=ru&tl=en&u=http%3A%2F%2Fpykd.blogspot.com%2F2011%2F02%2Fpykd.html )

boost you can download here: http://www.boost.org/

2)

We have never seen a such error. Could you say a version of the python26.dll or maybe post it by e-mail to pykd.codeplex@hotmail.com? Mine is 2.6.5150.1013.  It is placed in С:\windows\system32\ at x64 system and has a Py_InitModule4_64 import.

Aug 23, 2011 at 1:49 PM

Thanks a lot. The problem of cannot find Py_InitModule4_64 has been solved now, the problem is caused by that debug version of python.dll is used in the previous case, the problem solved after I used release version of python26.dll.

The downloaded pykd.pyd could be loaded to windbg now (both are 64 bit version), but I still got `unexpected error` when I run any extension command in pykd.pyd, such as `!pycmd`.

Is there caused by using the incorrect version python26.dll?

Can you share your python26.dll with me, and I will check whether it works or now. My email is lilotom#gmail.com(switch # to @)

Coordinator
Aug 23, 2011 at 2:25 PM

You can reinsatll python from python.org ( http://www.python.org/download/releases/2.6.6/ )

'unexpected error' - this is an internal error message from pykd. It may be result of incorrect python installation. For example, python can not find some standart module ( sys, exception or traceback ).  What is your pykd.pyd version?

 

Aug 23, 2011 at 3:10 PM

Thanks, the pykd I used is 0.0.19 (the latest?), I will try to reinstall Python.

Aug 23, 2011 at 3:13 PM

Actually, I found that there is no python*.dll in my python installation, only python.exe and pythonw.exe, and I checked that they work well.  The previous python26.dll is built myself.

Coordinator
Aug 23, 2011 at 3:48 PM
acel wrote:

Actually, I found that there is no python*.dll in my python installation, only python.exe and pythonw.exe, and I checked that they work well.  The previous python26.dll is built myself.


File pythonXX.dll is usually in %WinDir%\System32\

Aug 23, 2011 at 4:15 PM

You are right exactly. The extension command runs successfully (could run python script now) after I installed 64 bit python separately.  Thanks very much.

Besides, is there any documentation about the source code? Or I need to delve into the source code directly to understand it?  I think it will very useful to understand the internals of pykd.

Coordinator
Aug 24, 2011 at 7:03 AM

No there is no such documentation. If you want to work with source code I can recommend you this way: begin from looking at BOOST_PYTHON_MODULE( pykd ) routine. This is a gate between C++ code and python. So you can find quickly implementation of the python facade. Almost all python classed and routine have a very simple C++ implementation. Good luck!