Microsoft KB Archive/258205

{|
 * width="100%"|

HOWTO: Use Rebase to Extract Symbols for DrWtSn32.exe

 * }

Q258205

-

The information in this article applies to:


 * Microsoft Platform Software Development Kit (SDK), on platform(s):
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * Microsoft Windows 2000 Server

-

SUMMARY
When an application stops responding ("crashes"), you can use Dr. Watson (DrWtSn32.exe) to generate a crash dump and a log file that describes the crash. On Windows NT and Windows 2000, when Dr. Watson can locate the symbols for the binaries that are involved, it can provide more detailed information about the crash.

This article describes how to prepare and install the symbol (.dbg) files for an application. It does not describe how to install symbols for the operating system. For additional information on how to install Windows NT 4.0 symbols, click the article numbers below to view the articles in the Microsoft Knowledge Base:

"Q148659 How to Set Up Windows NT Debug Symbols" "Q141465 How to Install Symbols for Dr. Watson Error Debugging"

MORE INFORMATION
To prepare and install symbol files, first you must correctly build your application so that it contains debug information. To do this for Microsoft Visual C++ applications, see the instructions in the following Knowledge Base article:

"Q216356 INFO: Visual C++ Project Settings and .DBG File Creation"

After you use the Rebase.exe file to strip the symbol (.dbg) file out of the binary, place the .dbg file in a location where Dr. Watson can find it. Do not place the .dbg file in the same folder as the binary. Dr. Watson looks for the symbol files in the \Symbols folder, where  is the installation folder of Windows NT or Windows 2000. If this folder does not exist, you must manually create it.

IMPORTANT: The Rebase utility extracts the .dbg file. Consider the following two examples:


 * Rebase.exe -b 0x400000 -x C:\Temp MyApp.exe
 * Rebase.exe -b 0x400000 -x . MyApp

The first example uses a specific folder. The Rebase utility creates an EXE subfolder under C:\Temp because the extension of the target file is .exe. The Rebase utility then places the .dbg file in the C:\Temp\Exe folder. However, for Dr. Watson to locate the MyApp.dbg, you must copy this symbol file to \Symbols\Exe. You must create this folder if it does not already exist.

The second example uses a period to indicate that you should create the .dbg file in the same folder as the binary. In this case, you should copy the .dbg file directly to the \Symbols folder. Internally, MyApp.exe does not reference the EXE subfolder as it does in the first example.

NOTE: The same process applies for other file name extensions, but the subfolder changes accordingly.

The final step is to make sure that you have Dr. Watson on the computer and that it is registered as the debugger. To verify this on a computer that is running Windows NT or Windows 2000, follow these steps:


 * 1) From the Start menu, click Run.
 * 2) Type DrWtSn32 -i, and then click OK.