My application crashes occasionally at customer machine after running for 3-4 days. Is it possible to attach the application to a debugger like ADplus automatically when the application starts? This is for generating the dump file whenever the application crashes.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
You may want to look at the
SetUnhandledExceptionFilter
function.Since you want to use ADPlus I assume a windows only solution will do it.
In this case you could install a post mortem debugger. It will pop up as soon as your app crashes. I usually use windbg.
IMO you wouldn't have to attach to the debugger when the process starts. Windows would look for a debugger when the process terminates and the location is set AeDebug RegistryKey
On x86 computer it is
\\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug
CDB
can be set as Postmortem debuggerI would have something like
cdb -iaec ".dump /ma /u crashedapp.dmp;q"
to get a memory dump when the process terminates.And if the OS is Vista SP1+ then registry can be configured to get a full memory dump using WER http://msdn.microsoft.com/en-us/library/bb787181(VS.85).aspx