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,
Petr
Start Free Trial