https://githomelab.ru/pykd/pykd

1、安装python   (坑,分x86和x64,对应windbg版本)

2、安装pykd:'pip install pykd'

3、安装Windbg插件,

下载地址:https://githomelab.ru/pykd/pykd-ext/-/wikis/Downloads

安装步骤:https://githomelab.ru/pykd/pykd-ext

排坑记录:

1、执行!py命令后提示:failed to find python interpreter

解决方案:安装对于版本的python

2、执行!py命令后windbg闪退

排错过程:

windbg加载C:\Users\xxx\AppData\Local\CrashDumps目录下的dump文件

!analyze -v

应该是环境的问题,搜索中发现:https://stackoverflow.com/questions/43688302/windbg-cant-find-python-interpreter-for-pykd/45856752#45856752

I had this issue when having multiple python installations on the same machine. Managed to solve it by manually creating required registry key, as I did not want to reinstall any python versions, nor change the global path/pythonpath variables.

Note that you will need x64 python for windbgx64 and x86 python for windbgx86

Let's say you want to use python 3.7x86 installed at c:\python37_x86, and python 3.6x64installed at c:\python36_x64

  1. Create keys leading to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Python\PythonCore\3.7-32\InstallPath there, and set the (Default) to c:\python37_x86\ (the trailing backslash is important!)

  2. Similarly, create keys leading to HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.6\InstallPath there, and set the (Default) to c:\python36_x64\

  3. Unfortunately the PYTHONPATH environment variable is still being used, and must match the referenced python version(otherwise you will encounter Fatal Python error: unable to load the file system codec . NOTE: this may only be important if one of the versions is 2.x and the other 3.x. Try making it work without this step

To circumvent the last issue I created .bat files to modify the environment and launch windbg with the correct environment.

For example for launching 32 bit windbg:

set PYTHONPATH=C:\python37_x86\Lib;[...Rest of the PYTHONPATH for this python version...]
start windbgx -debugArch x86 -c ".load c:\dev\tools\pykd\x86\pykd.dll"

解决方案:使用bat脚本启动对应windbg

根据个人环境修改

x86:

e:
cd E:\Windows Kits\10\Debuggers\x86
set PYTHONPATH=D:\sdk\python37_86\Lib;
start windbg

x64

e:
cd E:\Windows Kits\10\Debuggers\x64
set PYTHONPATH=D:\sdk\Anaconda3\Lib;
start windbg

over!

最新文章

  1. avalon复杂绑定
  2. swt controls里的控件list
  3. 【转】Wince中文乱码解决方法
  4. 【转载】jQuery1.5之后的deferred对象详解
  5. oracle中SQL根据生日日期查询年龄的方法
  6. exploring the http Object
  7. 苹果App Store开发者帐户从申请,验证,到发布应用(1)
  8. 编写高质量代码:改善Java程序的151个建议(第二章:基本类型)
  9. es6中一些基本的使用方法
  10. 【一天一道LeetCode】#202. Happy Number
  11. 如何在本地数据中心安装Service Fabric for Windows集群
  12. [04-05]box框模型(Box Model)定义了元素框处理元素内容、内边距、边框和外边距的方式
  13. python3+selenium入门13-操作cookie
  14. offsetHeight,clientHeight,scrollHeight,offsetY等属性的理解
  15. Docker学习笔记之Docker的Build 原理
  16. 最大子数组问题/Maximum Subarray
  17. rpm_快速安装saltstake
  18. JVM总结-内存监视手段及各区域内存溢出解决
  19. ZooKeeper增加Observer部署模式提高性能(转)
  20. 找到一篇关于2.4/5G信道的新介绍

热门文章

  1. reStructuredText(.rst) && read the docs
  2. TypeScript 3.7 RC & Assertion Functions
  3. ts 在Function上创建静态属性和方法
  4. NGK英国路演圆满结束,未来科技布局看好NGK公链技术
  5. VS Code使用Git可视化管理源代码详细教程
  6. 大数据开发-linux下常见问题详解
  7. django学习-2.urls.py和view.py的相关知识点
  8. 18_MySQL之HAVING字句的使用
  9. epoll 原理
  10. springCloud中的服务调用feign