Windows implementation for the crash logger. More...
Public Member Functions | |
char * | AppendDecodedStacktrace (char *buffer, const char *last) const |
CrashLogWindows (EXCEPTION_POINTERS *ep=NULL) | |
A crash log is always generated when it's generated. | |
Data Fields | |
char | crashlog [65536] |
Buffer for the generated crash log. | |
char | crashlog_filename [MAX_PATH] |
Buffer for the filename of the crash log. | |
char | crashdump_filename [MAX_PATH] |
Buffer for the filename of the crash dump. | |
char | screenshot_filename [MAX_PATH] |
Buffer for the filename of the crash screenshot. | |
Static Public Attributes | |
static CrashLogWindows * | current = NULL |
Points to the current crash log. | |
Private Member Functions | |
char * | LogOSVersion (char *buffer, const char *last) const |
Writes OS' version to the buffer. | |
char * | LogError (char *buffer, const char *last, const char *message) const |
Writes actually encountered error to the buffer. | |
char * | LogStacktrace (char *buffer, const char *last) const |
Writes the stack trace to the buffer, if there is information about it available. | |
char * | LogRegisters (char *buffer, const char *last) const |
Writes information about the data in the registers, if there is information about it available. | |
char * | LogModules (char *buffer, const char *last) const |
Writes the dynamically linked libaries/modules to the buffer, if there is information about it available. | |
Private Attributes | |
EXCEPTION_POINTERS * | ep |
Information about the encountered exception. |
Windows implementation for the crash logger.
Definition at line 45 of file crashlog_win.cpp.
CrashLogWindows::CrashLogWindows | ( | EXCEPTION_POINTERS * | ep = NULL |
) | [inline] |
A crash log is always generated when it's generated.
ep | the data related to the exception. |
Definition at line 75 of file crashlog_win.cpp.
References crashdump_filename, crashlog, crashlog_filename, and screenshot_filename.
char * CrashLogWindows::LogError | ( | char * | buffer, | |
const char * | last, | |||
const char * | message | |||
) | const [private, virtual] |
Writes actually encountered error to the buffer.
buffer | The begin where to write at. | |
last | The last position in the buffer to write to. | |
message | Message passed to use for possible errors. Can be NULL. |
'
' character after the buffer. Implements CrashLog.
Definition at line 110 of file crashlog_win.cpp.
References ep, and seprintf().
char * CrashLogWindows::LogModules | ( | char * | buffer, | |
const char * | last | |||
) | const [private, virtual] |
Writes the dynamically linked libaries/modules to the buffer, if there is information about it available.
buffer | The begin where to write at. | |
last | The last position in the buffer to write to. |
'
' character after the buffer. Reimplemented from CrashLog.
Definition at line 213 of file crashlog_win.cpp.
References AllocaM, lengthof, LoadLibraryList(), min(), and seprintf().
char * CrashLogWindows::LogOSVersion | ( | char * | buffer, | |
const char * | last | |||
) | const [private, virtual] |
Writes OS' version to the buffer.
buffer | The begin where to write at. | |
last | The last position in the buffer to write to. |
'
' character after the buffer. Implements CrashLog.
Definition at line 92 of file crashlog_win.cpp.
References seprintf().
char * CrashLogWindows::LogRegisters | ( | char * | buffer, | |
const char * | last | |||
) | const [private, virtual] |
Writes information about the data in the registers, if there is information about it available.
buffer | The begin where to write at. | |
last | The last position in the buffer to write to. |
'
' character after the buffer. Reimplemented from CrashLog.
Definition at line 241 of file crashlog_win.cpp.
References ep, and seprintf().
char * CrashLogWindows::LogStacktrace | ( | char * | buffer, | |
const char * | last | |||
) | const [private, virtual] |
Writes the stack trace to the buffer, if there is information about it available.
buffer | The begin where to write at. | |
last | The last position in the buffer to write to. |
'
' character after the buffer. Implements CrashLog.
Definition at line 305 of file crashlog_win.cpp.
References ep, and seprintf().