# CrashLogWindows Class Reference

Windows implementation for the crash logger. More...

Inheritance diagram for CrashLogWindows:

## Public Member Functions

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

## Detailed Description

Windows implementation for the crash logger.

Definition at line 28 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 55 of file crashlog_win.cpp.

References crashdump_filename, crashlog, crashlog_filename, and screenshot_filename.

## Member Function Documentation

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 72 of file crashlog_win.cpp.

References seprintf().

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 96 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 290 of file crashlog_win.cpp.

References ep, and 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 226 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.

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 198 of file crashlog_win.cpp.

References AllocaM, lengthof, LoadLibraryList(), min(), and seprintf().

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

- src/os/windows/crashlog_win.cpp