How to: Analyze crash information using a mapfile for a mixed-mode application
| Article ID | : | 954447 |
| Last Review | : | June 13, 2008 |
| Revision | : | 1.0 |
RAPID PUBLISHING
Action
You have a mixed mode application having a mapfile created using /MAP (http://msdn.microsoft.com/en-us/library/k7xkk3e2(VS.80).aspx) linker option.
Whenever your application crashes, you may want to analyze the crash information by mapping the fault offset address to the mapfile.
For instance, Faulting application Foo.exe, version 0.0.0.0, time stamp 0×48473500, faulting module Foo.exe, version 0.0.0.0, time stamp 0×48473500, exception code 0xc0000005, fault offset0×00001000, process id 0xb0, application start time 0x01c8c6a43aa76a7c.
You may want to map the fault offset 0×00001000to the mapfile.
Result
Attempts to find a correlation between the faulting offset and the mapfile may result in confusion or incorrect mapping.
Cause
A mixed-mode application is any application that combines native code (C++) with managed code (such as Visual Basic, Visual C#, or C++ that runs on the common language runtime). The managed code differs from a traditional native code in that many details of the application’s execution are left up to the runtime, such as how data structures are laid out and how native code is generated and used. When the application is run, the runtime makes decisions about data usage and code usage as the application is running, producing native code specific to the platform when desired. The process of generating native code from MSIL is called managing or just-in-time (JIT) compiling, or sometimes JITting. The component of the runtime that performs this translation step is called the JIT compiler. Once the JIT compiler has compiled the MSIL for a specific method, that method’s stub is replaced with the address of the compiled code. Whenever this method is called subsequently, the native code will execute and the JIT compiler will not have to be involved in the process. This compiled code address is generated at runtime and the fault offset will not be mapped with the mapfile information. However you may be to able map the fault offset address with the mapfile if the address is part of the native code that is not JITed.
Resolution
This is by design and there is no known workaround. As an alternative you can use Debugging Tools for Windows (http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx) to analyze the crash information from the crash dumps.
More Information
/MAP (Generate Mapfile) (http://msdn.microsoft.com/en-us/library/k7xkk3e2(VS.80).aspx)
DISCLAIMER
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
APPLIES TO
| • | Microsoft Visual Studio 2008 Academic Edition |
| • | Microsoft Visual Studio 2008 Professional Edition |
| • | Microsoft Visual Studio 2008 Standard Edition |
| • | Microsoft Visual Studio Team System 2008 Database Edition |
| • | Microsoft Visual Studio Team System 2008 Architecture Edition |
| • | Microsoft Visual Studio Team System 2008 Development Edition |
| • | Microsoft Visual Studio Team System 2008 Test Edition |
| • | Microsoft Visual Studio Team System 2008 Team Foundation Server |
| • | Microsoft Visual Studio Team System 2008 Team Suite |
Keywords:Â |
kbnomt kbrapidpub KB954447 |
Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Back to the top
Leave a Reply