OpenTTD: CrashLogWindows Class Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

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.
Public Member Functions inherited from CrashLog
virtual | ~CrashLog ()
| Stub destructor to silence some compilers.
char * | FillCrashLog (char *buffer, const char *last) const
| Fill the crash log buffer with all data of a crash log.
bool | WriteCrashLog (const char *buffer, char *filename, const char *filename_last) const
| Write the crash log to a file.
virtual int | WriteCrashDump (char *filename, const char *filename_last) const
| Write the (crash) dump to a file.
bool | WriteSavegame (char *filename, const char *filename_last) const
| Write the (crash) savegame to a file.
bool | WriteScreenshot (char *filename, const char *filename_last) const
| Write the (crash) screenshot to a file.
bool | MakeCrashLog () const
| Makes the crash log, writes it to a file and then subsequently tries to make a crash dump and crash savegame.

## 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
char * | LogError (char *buffer, const char *last, const char *message) const
char * | LogStacktrace (char *buffer, const char *last) const
char * | LogRegisters (char *buffer, const char *last) const
char * | LogModules (char *buffer, const char *last) const

## Private Attributes
EXCEPTION_POINTERS * | ep
| Information about the encountered exception.

## Additional Inherited Members
Static Public Member Functions inherited from CrashLog
static void | InitialiseCrashLog ()
| Initialiser for crash logs; do the appropriate things so crashes are handled by our crash handler instead of returning straight to the OS.
static void | SetErrorMessage (const char *message)
| Sets a message for the error message handler.
static void | AfterCrashLogCleanup ()
| Try to close the sound/video stuff so it doesn't keep lingering around incorrect video states or so, e.g.
Protected Member Functions inherited from CrashLog
virtual char * | LogOSVersion (char *buffer, const char *last) const =0
| Writes OS' version to the buffer.
virtual char * | LogCompiler (char *buffer, const char *last) const
| Writes compiler (and its version, if available) to the buffer.
virtual char * | LogError (char *buffer, const char *last, const char *message) const =0
| Writes actually encountered error to the buffer.
virtual char * | LogStacktrace (char *buffer, const char *last) const =0
| Writes the stack trace to the buffer, if there is information about it available.
virtual char * | LogRegisters (char *buffer, const char *last) const
| Writes information about the data in the registers, if there is information about it available.
virtual char * | LogModules (char *buffer, const char *last) const
| Writes the dynamically linked libraries/modules to the buffer, if there is information about it available.
char * | LogOpenTTDVersion (char *buffer, const char *last) const
| Writes OpenTTD's version to the buffer.
char * | LogConfiguration (char *buffer, const char *last) const
| Writes the (important) configuration settings to the buffer.
char * | LogLibraries (char *buffer, const char *last) const
| Writes information (versions) of the used libraries.
char * | LogGamelog (char *buffer, const char *last) const
| Writes the gamelog data to the buffer.

## Detailed Description

Windows implementation for the crash logger.

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

References crashdump_filename, crashlog, crashlog_filename, and screenshot_filename.

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

- src/os/windows/crashlog_win.cpp