选择 32 位或 64 位调试工具Choosing the 32-Bit or 64-Bit Debugging Tools

安装的 Windows 调试工具,可以获取两个 32 位套工具和 64 位一系列工具。When you install Debugging Tools for Windows, you get both a 32-bit set of tools and a 64-bit set of tools. 如果你使用 Microsoft Visual Studio调试环境,无需担心是否使用 32 位或 64 位设置,因为 Visual Studio 会自动选择正确的调试工具。If you use the Microsoft Visual Studio debugging environment, you don't have to be concerned about whether to use the 32- or 64-bit set because Visual Studio automatically chooses the correct debugging tools.

如果使用其他调试环境 (WinDbg、 KD、 CDB 或 NTSD),您必须自己做出的选择。If you are using one of the other debugging environments (WinDbg, KD, CDB, or NTSD), you have to make the choice yourself. 若要确定要使用的调试工具集,您需要知道的主机计算机和主机计算机是否运行 Windows 的 32 位或 64 位版本运行的处理器的类型。To determine which set of debugging tools to use, you need to know the type of processor that is running on your host computer and whether the host computer is running a 32- or 64-bit version of Windows.

运行调试器的计算机称为主机计算机,和正在调试的计算机称为目标计算机The computer that runs the debugger is called the host computer, and the computer being debugged is called the target computer.

运行 Windows 的 32 位版本的主机计算机Host computer running a 32-bit version of Windows

如果在主计算机正在运行 Windows 的 32 位版本,使用 32 位调试工具。If your host computer is running a 32-bit version of Windows, use the 32-bit debugging tools. (这种情况下适用于基于 x86 和基于 x64 的目标。)(This situation applies to both x86-based and x64-based targets.)

基于 x64 的主机计算机运行 Windows 的 64 位版本x64-based host computer running a 64-bit version of Windows

如果主机计算机使用的基于 x64 的处理器和正在运行 Windows 的 64 位版本,适用以下规则:If your host computer uses an x64-based processor and is running a 64-bit version of Windows, the following rules apply:

  • 如果您正在分析转储文件,可以使用的调试工具会 32 位或 64 位调试工具。If you are analyzing a dump file, you can use either the 32-bit debugging tools or the 64-bit debugging tools. (它并不重要转储文件是否为用户模式转储文件或内核模式转储文件,并将它并不重要的转储文件是否生成了基于 x86 或基于 x64 的平台上。)(It is not important whether the dump file is a user-mode dump file or a kernel-mode dump file, and it is not important whether the dump file was made on an x86-based or an x64-based platform.)

  • 如果您正在执行实时内核模式调试,可以使用 32 位调试工具或进行 x64 调试工具。If you are performing live kernel-mode debugging, you can use either the 32-bit debugging tools or the x64 debugging tools. (这种情况下适用于基于 x86 和基于 x64 的目标。)(This situation applies to both x86-based and x64-based targets.)

  • 如果调试在调试器所在的计算机运行的实时用户模式代码时,使用 64 位工具调试 64 位代码和在 WOW64 上运行的 32 位代码。If you are debugging live user-mode code that is running on the same computer as the debugger, use the 64-bit tools for debugging 64-bit code and 32-bit code running on WOW64. 若要为 32 位或 64 位模式对调试器进行设置,请使用 .effmach 命令。To set the debugger for 32-bit or 64-bit mode, use the .effmach command.

  • 如果你正在调试的单独的目标计算机运行的实时的 32 位用户模式代码,使用 32 位调试工具。If you are debugging live 32-bit user-mode code that is running on a separate target computer, use the 32-bit debugging tools.

相关主题Related topics

Windows 调试Windows Debugging