Public Member Functions | Data Fields | Static Public Attributes | Private Member Functions | Private Attributes

# CrashLogWindows Class Reference

Windows implementation for the crash logger. More...

Inheritance diagram for CrashLogWindows:

## 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 libraries/modules to the buffer, if there is information about it available.
## Private Attributes
EXCEPTION_POINTERS * | ep
| Information about the encountered exception.

## Detailed Description

Windows implementation for the crash logger.

Definition at line 40 of file crashlog_win.cpp.

## Constructor & Destructor Documentation

CrashLogWindows::CrashLogWindows | ( | EXCEPTION_POINTERS * | ep = `NULL` | ) | `[inline]`

A crash log is always generated when it's generated.

Parameters:

  | ep | the data related to the exception.

Definition at line 70 of file crashlog_win.cpp.

References crashdump_filename, crashlog, crashlog_filename, and screenshot_filename.

## Member Function Documentation

char * CrashLogWindows::LogError | ( | char * | buffer,
|  | const char * | last,
|  | const char * | message |
| ) |  |  | const`[private, virtual]`

Writes actually encountered error to the buffer.

Parameters:

  | 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.

Returns:
  the position of the `'` ' character after the buffer.

Implements CrashLog.

Definition at line 105 of file crashlog_win.cpp.

References ep, and seprintf().

char * CrashLogWindows::LogModules | ( | char * | buffer,
|  | const char * | last |
| ) |  |  | const`[private, virtual]`

Writes the dynamically linked libraries/modules to the buffer, if there is information about it available.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.

Returns:
  the position of the `'` ' character after the buffer.

Reimplemented from CrashLog.

Definition at line 208 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.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.

Returns:
  the position of the `'` ' character after the buffer.

Implements CrashLog.

Definition at line 87 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.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.

Returns:
  the position of the `'` ' character after the buffer.

Reimplemented from CrashLog.

Definition at line 236 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.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.

Returns:
  the position of the `'` ' character after the buffer.

Implements CrashLog.

Definition at line 300 of file crashlog_win.cpp.

References ep, and seprintf().

The documentation for this class was generated from the following file:

- src/os/windows/crashlog_win.cpp