Advertisement

04.11.2008 at 05:44AM PDT, ID: 23314840
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

How to get minidump of status when C++ exception was thrown in time when it is handled?

Asked by pepr in Windows Programming, C++ Programming Language

Tags: , , , ,

Hi experts,

This is probably not the yes/no question, nor "this is preferable solution". I consider it more difficult than for 500 points. Therefore, I am ready to follow your suggestions and fork this question to solve separate subproblems.

In my previous question http:Q_23310705.html I tried unsuccessfully to get minidump in the time when the C++ exception was handled but with the content valid in the time of throwing the exception. The main goal is to capture the call stack in that time -- off-line, at the customer site -- and to be able to find later (at the develope computer, post-mortem, human readable) what happened. The user has only Release version of the application, no .PDB file. The .PDB file is available for the application version only at the developer's desktop.

This is not difficult with SEH, because the call stack is still valid inside the __except filter. Minidump can be easily obtained. However, for C++ exceptions, insite the catch block the exception was already unwinded and the call stack content from the throw time was already lost. The application uses native code -- not CLR, no introspection.

The only working solution that gave me the wanted minidump from the throw time was based on idea to do minidump at the throw time. It was done via constructor of a base exception class (used later for my exceptions).

The problem is that the solution is too heavy weight. I believe I am not misusing exceptions too much. Still, some exceptions are handled the way when minidump is not needed (unwanted because of time penalty).


I need your opinion on the following possible direction:

0. This must have been done many times. Minidump need not to be the only solution.

1. The (windowing) application can be given a startup option like /debugNNN to switch the heavy minidumping only when needed. The problem is that the error conditions need not to be easily repeatable.

2. The info needed for minidump could be stored in throw time but the minidump be done only later. I guess it is not that easy if possible at all. Possibly the minidump to the disk file should be replaced by something more light-weight, like storing the stack into memory and writing only addresses to a log file to be translated to function names from .PDB using some special external tool.

Any other ideas?

Thanks,
   PetrStart Free Trial
 
 
[+][-]04.11.2008 at 06:31AM PDT, ID: 21334038

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Programming, C++ Programming Language
Tags: Visual C++ 8 or 9, minidump, exception, try/catch, post-mortem debug
Sign Up Now!
Solution Provided By: evilrix
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.13.2008 at 11:12PM PDT, ID: 21347819

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906