

Now we will look up where the crash occurred. \Release\MAPFILE.obj(F:\MAPFILE\MAPFILE.cpp) segment.

After this, you will get the export information if your project contains exported functions and you included /MAPINFO:EXPORTS in the link tab. The public function part is followed by the line information (you got this if you used the /MAPINFO:LINES in the Link tab and selected the "Line numbers" in the C/C++ tab). Fortunately, the line numbers will still reflect the static functions. If you have static-declared C functions, they won't show up in the MAP file. Timestamp is 3df6394d (Tue Dec 10 19:58:21 2002)Īfter the section information, you get the public function information. I did this by adding these two lines at the end of the InitInstance() function:
Open map file how to#
Reading the MAP FileĪfter all this dull work, now comes the neat part: how to read the MAP file. map file in your intermediate directory (together with your EXE). Now, you're ready to compile and link your project. Also, type the switches /MAPINFO:LINES and /MAPINFO:EXPORTS in the Project Options edit box. Here, you need to select the "Generate mapfile" option. This will not affect your release in any way. Many people forget this, but you'll need this option if you want a good MAP file. In the C/C++ tab, select "Line Numbers Only" for Debug Info. Once created, we need to adjust the project settings for the release version. I create a new project using the Win32 Application option in VC++ 6.0, selecting the 'typical " Hello World!" application' to keep the size of the MAP file reasonable for explanation. You can do the same, or adjust your own project. For this, I will create a new project ( MAPFILE). So first, I'll show you how to create a good MAP file. If you don't have one, it will be nearly impossible to find where your application crashed using the crash address. Well first of all, you'll need a MAP file. But how can you determine what went wrong, using this crash address? Creating a MAP File

This will go a long way in solving the problem. If you're lucky enough, the user will have a crash address.
Open map file software#
But when a user informs you your software has crashed, you know it's best to fix this before adding other features. Programming neat applications is one thing.
