码迷,mamicode.com
首页 > 其他好文 > 详细

pykd试用

时间:2015-06-13 19:59:10      阅读:425      评论:0      收藏:0      [点我收藏+]

标签:

啥是pykd?

一个windbg插件,能在windbg里面运行python指令

 

试用步骤

下载from https://pykd.codeplex.com/releases/view/615625

解压后有这样几个文件

dbgeng.dll
dbghelp.dll
msdia120.dll
pykd.pyd
srcsrv.dll
symsrv.dll

运行windbg,attach一个进程

敲入命令

.load C:\Users\cutepig\Downloads\pykd-0.3.0.26-py27-win32\pykd\pykd.pyd

0:019> !py
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> ls
Traceback (most recent call last):
  File "<console>", line 1, in <module>
NameError: name ‘ls‘ is not defined
>>> print ‘xx‘
xx

 

从原代码编译 (未做)
https://pykd.codeplex.com/wikipage?title=PYKD%200.2.%20Documentation&referringTitle=Documentation#introduction-buildingfromsource

安装:Python. boost
设置环境变量:$(DIA_SDK_ROOT) $(DBG_SDK_ROOT) $(BOOST_ROOT) $(PYTHON_ROOT)
编译boost:
编译pykd:

执行自带的单元测试
F:\_codes\pykd-84103\branch\0.3.x\test\scripts>_run_p
ykdtest.cmd C:\Users\cutepig\Downloads\pykd-0.3.0.26-py27-win32\pykd\pykd.pyd

 

pykd试用

标签:

原文地址:http://www.cnblogs.com/cutepig/p/4573932.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!