5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windbg上でPython

Last updated at Posted at 2014-02-27

windbgを使ってダンプの解析したり、ライブデバッグするときにこの作業自動化できたら楽なのになーと思うときないですか?
私はあります。けどwindbgのスクリプト機能を覚えるのもなんかなーと思ってたらpythonをwindbg上で使える拡張を見つけたので紹介しておきます。

Python extension for WinDbg
https://pykd.codeplex.com/

以下にインストールからhello worldの流れを適当に書いておきます。

1. 自分の環境にあったインストーラを下記からダウンロードして実行

  • 私はなんちゃらsetup.exeを使いました

  • windbgのインストールフォルダにあるwindbg拡張のフォルダ?のパスをインストール途中に聞かれます

  • pythonが入ってない環境の場合、ネットからpythonのmsiをダウンロードして実行してくれます

2. windbgを起動

3. windbgをとりあえず適当なプロセスにアタッチしてみる

  • notepad.exeとかでいいです

4. python拡張を読み込む

0:001>.load pykd.pyd

5. python インタプリタを起動

0:001>!pycmd

6. hello worldを出力してみる

>>>print "hello world"

でも私あんまりpythonしらないんですよね。まぁ適当にググりながら弄ってみます。

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?