Chapter 8 -- Finding Source and Line Information with Just a Crash Address

[Previous] [Next]

Chapter 8

Your program has crashed. You have the crash address because the operating system is nice enough to give it to you when your application dies. Now what do you do? My friend Chris Sells calls this scenario the "my program went on vacation and all I got was this lousy address" problem. Although having the address is better than nothing, having the source file and the line number of the crash would be much more convenient. I suppose you could always give the source code to your users and have them debug it for you, but I just don't see that happening any time soon.

That crash address is generally all you're going to get. Even if you have access to a full Dr. Watson log, you still have only the address of the problem. (Refer to Appendix A for detailed information about Dr. Watson logs and how to interpret them.) Obviously, you need a way to convert that address to the source file and line number in your application. In this chapter, I'll explain how to accomplish that. I'll concentrate on the two main ways of converting the address: using MAP files and using CrashFinder, a utility included on the book's companion CD.

To maximize the techniques in this chapter, you need to have your program compilation set up as I described in Chapter 2. You need to be building your release builds with full debugging symbols and generating MAP files for them. Additionally, you must fix any dynamic-link library (DLL) load address conflicts. If you don't take these steps, the techniques I present in this chapter won't completely work and the only way you'll be able to figure out the source file and line number for a crash address is through pure guessing.



Debugging Applications
Debugging Applications for MicrosoftВ® .NET and Microsoft WindowsВ® (Pro-Developer)
ISBN: 0735615365
EAN: 2147483647
Year: 2000
Pages: 122
Authors: John Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net