How to: Analyze crash information using a mapfile for a mixed-mode application

How to: Analyze crash information using a mapfile for a mixed-mode application
Article ID : 954447
Last Review : June 13, 2008
Revision : 1.0
Source: Microsoft Support

Back to the top

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Back to the top

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.

Back to the top

Result

Attempts to find a correlation between the faulting offset and the mapfile may result in confusion or incorrect mapping.

Back to the top

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.

Back to the top

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.

Back to the top

More Information

Compiling MSIL to Native Code (http://msdn.microsoft.com/en-us/library/ht8ecch6(VS.71).aspx)
/MAP (Generate Mapfile) (http://msdn.microsoft.com/en-us/library/k7xkk3e2(VS.80).aspx)

Back to the top

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

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.

Back to the top



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

Back to the top

Keywords: 
kbnomt kbrapidpub KB954447

Back to the top

 

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.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image