なんか突然、ディープな内容で申し訳ないですm(__)m
http://d.hatena.ne.jp/dai_optimistic/20051028
ブログにも書いてある通り、GetThreadContextが正常に働かず、デバッガが対象スレッドのレジスタ情報を取得できない状況におかれています。状況は下記の通り。
・デバッガはBasicCompiler.exeが提供している。Win32アプリである。
・デバッガはWOW64の機構を利用して稼動している
・デバッグ対象のプログラムはネイティブな64ビットアプリである。
・デバッガはGetThreadContextというAPI関数を呼び出して対象スレッドのレジスタ情報を取得する
久々に一日中、同じ問題で頭を抱えてみました。大きな壁ですな。片っ端から情報を読み漁りましたが、この手法が無理であるとはどこにも書いておりませんでした。
まぁ、しいて言えば、MSのサイト上にあったどこだかのプレゼン資料だけです。
http://download.microsoft.com/download/ ... ec2004.ppt
ここには、こう記してあります。
引用:
WoW64 Debugging
GetThreadContext() and SetThreadContext() works if the target process of the same type
Use user-mode 32-bit debugger to debug WoW64 applications
Debug as if you are running on a native 32-bit Windows OS
Visual C++ 6.0
User mode debuggers (e.g. ntsd.exe)
Or any other 32-bit debugger package
View only 32-bit loaded modules
Can not be used to debug native 64-bit applications
Use user-mode 64-bit debugger to debug inside WoW64’s 64-bit code
WoW64 debugger extensions – comes with Microsoft debugging tools
Allows to switch between 32-bit and 64-bit modes using !sw command
View all loaded modules (32-bit and 64-bit)
Can debug WoW64 as well as native 64-bit applications
なんか、直訳するとWin32デバッガからはWin64アプリの情報をGetThreadContextできないぞみたいなことが書いてあるようにとれます。
英語が得意な方、この文章の翻訳を、わかりやすくお願いしたいです。
また、この件に関する情報、どんな些細なことでもかまいませんので、アドバイスをいただけると助かります。
たぶん、「できない」のであれば、新しくネイティブ64なデバッガを作ることになりますので(こうなると、スケジュール的にかなり厳しいのですが…)