# CrashLogUnix Class Reference

Unix implementation for the crash logger. More...

Inheritance diagram for CrashLogUnix:

## Public Member Functions

| CrashLogUnix (int signum)
| A crash log is always generated by signal.

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

## Private Attributes

int | signum
| Signal that has been thrown.

## Detailed Description

Unix implementation for the crash logger.

Definition at line 37 of file crashlog_unix.cpp.

## Constructor & Destructor Documentation

CrashLogUnix::CrashLogUnix | ( | int | signum | ) | `[inline]`

A crash log is always generated by signal.

Parameters:

  | signum | the signal that was caused by the crash.

Definition at line 137 of file crashlog_unix.cpp.

## Member Function Documentation

char* CrashLogUnix::LogError | ( | char * | buffer,
|  | const char * | last,
|  | const char * | message |
| ) |  |  | const`[inline, 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 61 of file crashlog_unix.cpp.

References seprintf(), and signum.

char* CrashLogUnix::LogOSVersion | ( | char * | buffer,
|  | const char * | last |
| ) |  |  | const`[inline, 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 41 of file crashlog_unix.cpp.

References seprintf().

char* CrashLogUnix::LogStacktrace | ( | char * | buffer,
|  | const char * | last |
| ) |  |  | const`[inline, 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 106 of file crashlog_unix.cpp.

References lengthof, and seprintf().

## Field Documentation

int CrashLogUnix::signum `[private]`

Signal that has been thrown.

Definition at line 39 of file crashlog_unix.cpp.

Referenced by LogError().

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

- src/os/unix/crashlog_unix.cpp