Game Development Reference
In-Depth Information
There are a few ways to install debug symbols. You can install them from the Visual
Studio CD-ROM, or you can download them from MSDN. Search for
System
Debug Symbols,
re sure to find them. Once you have the right symbols
installed for your OS, the debugger will happily report the loaded symbols when
you begin a debug session:
and you
'
'
TeapotWars.exe
'
: Loaded
'
C:\WINDOWS\system32\ntdll.dll
'
, Symbols loaded.
'
TeapotWars.exe
'
: Loaded
'
C:\WINDOWS\system32\kernel32.dll
'
, Symbols loaded.
'
TeapotWars.exe
'
: Loaded
'
C:\WINDOWS\system32\gdi32.dll
'
, Symbols loaded.
Etc., etc.
The problem with this solution is that the symbols you install will eventually become
stale since they won
'
t reflect any changes in your operating system as you update it
with service packs. You can find out why symbols aren ' t loading for any EXE or DLL
with the help of DUMPBIN.EXE , a utility included with Visual Studio. Use the
/PDBPATH:VERBOSE switch as shown here:
Microsoft (R) COFF/PE Dumper Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file c:\windows\system32\user32.dll
File Type: DLL
PDB file
'
c:\windows\system32\user32.pdb
'
checked. (File not found)
PDB file
'
user32.pdb
'
checked. (File not found)
PDB file
'
C:\WINDOWS\symbols\dll\user32.pdb
'
checked. (PDB signature mismatch)
PDB file
'
C:\WINDOWS\dll\user32.pdb
'
checked. (File not found)
PDB file
'
C:\WINDOWS\user32.pdb
'
checked. (File not found)
Summary
2000 .data
4000 .reloc
2B000 .rsrc
54000 .text
Do you see the
PDB signature mismatch
line about halfway down this output?
That
s what happens when the user32.pdb file is out of sync with the user32.dll
image on your computer. It turns out this is easy to fix, mainly because Microsoft
engineers had this problem multiplied by about 100,000. They have thousands of
applications out there with sometimes hundreds of different builds. How could they
ever hope to get the debug symbols straight for all these things? They came up with a
neat solution called the Microsoft Symbol Server. It turns out you can use this server,
too. Here
'
s how to do it.
First, install the Microsoft Debugging Tools, which can be found at www.microsoft.
com/ddk/debugging. Use the SYMCHK utility to pull the latest symbol information
'
 
Search WWH ::




Custom Search