Posted on 2004年7月5日 13:16
A Few Simple Bugslaying Rules
- Always build both your debug and release binaries with full program database(PDB) debug symbols(/Zi for cl.exe & /DEBUG /PDB:<pdb filename> for link.exe)
- (Tips)With MS compilers, debug symbols can be created no matter how much optization performed
- Save in as safe place exact copies of the binaries that you send to testers or others(all associated PDB files){ant note: synchronize the builds & the PDB}
- Always rebase your DLLs and OCXs so that they load at unique addresses in your address space{ant note: using a address mapping dump tool is also ok}
- (Tips)Using rebase.exe or specify /BASE option to link.exe
- Maximize the information about a crash(Writing crash handlers or Ask user for the Dr.Watson logs for your crash)
- (Tips)Run drwtsn32 -i to set the debugger for Dr.Watson
- For different versions of IMAGEHLP.DLL:
- The original Windows NT 4.0 version
- The November Platfrom SDK version
- The WinDBG update version
- The Windows NT 5.0 version
Read article: Apr98Bugslayer
Download tool: CrashFinder 2.1
Done.
[Update.2004/07/05 13:44]
See Using the Rebase utility in project makefile FMI about rebase.
[Update.2004/07/05 14:50]
Ref:
[MSDN]
Rebasing Win32 DLLs: The Whole Story
Platform SDK: Tools: Rebase