LinuxでWine(Eudora)を使用してWindowsアプリケーションをデバッグしておりWINEDEBUGGER=+relay
、API呼び出しの(かなり大量の)ログを作成するために使用しています。問題がどこにあるかを見つけたので、同じアプリケーションをネイティブウィンドウ(実際にはVirtualBox)で実行したいので、その動作を確認し、違い(ある場合)を比較します。
API呼び出しをトレースできるWindowsツールがいくつかあることは知っていますが、wineと同じ種類のログを生成できるツールが必要なので、同じワークフローを使用できます。
特定の機能リストを除外するようにロガー/トレーサーを構成します(たとえば、
KERNEL32.SetLastError; KERNEL32.GetLastError; KERNEL32.FlsGetValue; ntdll.RtlEnterCriticalSection; ntdll.RtlLeaveCriticalSection
Wineのレジストリエントリに相当します。これは、30MBのログファイルと1.3GBのDebug\RelayExclude
ログファイルの違いであるため重要です。library / module / dll / whateverに関係なく、他のすべての呼び出しをトレースする必要があります。呼び出しが行われる順序は私にとって非常に重要であるため、モジュールごとに並べ替えたりフィルタリングしたりしないでください(バックトラックして迷子にならないようにするため)
トレーサーを簡単に起動できます
tracer c:\ProgramFiles\Eudora\Eudora.exe 2> hugelogfile.txt
Eudoraを起動し、アクションを実行して、Eudoraを閉じます。
Eudoraが終了すると、トレーサーは停止します。ログは私が遊ぶ準備ができています。
役立つ場合は、Wineログのスニペットを次に示します(同様の形式が望ましい)。
0009:Call advapi32.RegQueryValueW(80000000,0033b5dc L".txt",0033b9a0,0033bbac) ret=7e9a6c7a
0009:Ret advapi32.RegQueryValueW() retval=00000000 ret=7e9a6c7a
0009:Call advapi32.RegOpenKeyExW(80000000,0033b9a0 L"txtfile",00000000,02000000,0033a528) ret=7e9a3b66
0009:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=7e9a3b66
0009:Call advapi32.RegCloseKey(000000d4) ret=7e9a3bbc
0009:Ret advapi32.RegCloseKey() retval=00000000 ret=7e9a3bbc
0009:Call advapi32.RegQueryValueW(80000000,0033b9a0 L"txtfile\\shell\\\\command",0033ada0,0033a52c) ret=7e9a3c04
0009:Ret advapi32.RegQueryValueW() retval=00000002 ret=7e9a3c04
0009:Call shlwapi.PathIsDirectoryW(0033e464 L"D:\\Arquivos\\Email\\attach\\carro.txt") ret=7e9a8a26
0009:Call KERNEL32.GetFileAttributesW(0033e464 L"D:\\Arquivos\\Email\\attach\\carro.txt") ret=7eb47738
0009:Ret KERNEL32.GetFileAttributesW() retval=00000020 ret=7eb47738
0009:Ret shlwapi.PathIsDirectoryW() retval=00000000 ret=7e9a8a26
0009:Call shlwapi.PathIsURLW(0033e464 L"D:\\Arquivos\\Email\\attach\\carro.txt") ret=7e9a8e68
0009:Ret shlwapi.PathIsURLW() retval=00000000 ret=7e9a8e68
0009:Call user32.LoadStringW(7e950000,000000a4,0033abb0,00000800) ret=7e9a3ac2
0009:Ret user32.LoadStringW() retval=00000041 ret=7e9a3ac2
0009:Call user32.MessageBoxW(000100c4,0033abb0 L"There is no Windows program configured to open this type of file.",00000000,00000010) ret=7e9a3a84
それを実行できる無料の簡単にダウンロードできるソフトウェアと、最も重要なこととして、このワークフローを実現するための正確な手順を提案してください。
ありがとう!