Used to install a crash handler so a stack trace can be recorded in the event of an unhandled exception
File: dtsearch.h
Members |
Description |
---|---|
void * pData; |
An optional value to be passed to the pNotifyFn. |
void (* pNotifyFn)(void *pData, const char *logName); |
An optional callback function to be called when a crash occurs. |
char appName[40]; |
Information identifying the application, which will be written in the header of the log file. |
char appVersion[40]; |
Information identifying the application, which will be written in the header of the log file. |
char logName[256]; |
Deprecated: Use logName2 |
const char * logName2; |
The name of the log file to create with the stack trace. |
const char * miniDumpName; |
Name of Windows MiniDump file to create |
The functions to install and remove the crash handler are: void dtssInstallCrashDiagnostics(dtsCrashHandlerInfo& info) void dtssRemoveCrashDiagnostics()
The stack trace file will list each item on the stack as an address. A utility included with the dtSearch Engine, StackTrace.exe, can be used to convert these addresses to symbol names. To use StackTrace.exe, you will need a .map file for your program. For example, if your program is MySearch.exe, you will need a map file named MySearch.map. The Visual C++ linker does not generate map files by default so you will need to enable this option to get a map file. Also, the map file is only valid for the particular build for which it was generated. If you modify and rebuild the program, a new map file will be needed. Once you have a map file and the text file created by dtssInstallCrashDiagnostics, you can get the symbols as follows:
If your program includes multiple modules, you can list the map files for each module before the error file, like this: