Public Member Functions | |
CrashLogOSX (int signum) | |
A crash log is always generated by signal. | |
bool | MakeCrashLog () |
Generate the crash log. | |
void | DisplayCrashDialog () const |
Show a dialog with the crash information. | |
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. | |
char | filename_log [MAX_PATH] |
Path of crash.log. | |
char | filename_save [MAX_PATH] |
Path of crash.sav. | |
char | filename_screenshot [MAX_PATH] |
Path of crash.(png|bmp|pcx). |
Definition at line 45 of file crashlog_osx.cpp.
CrashLogOSX::CrashLogOSX | ( | int | signum | ) | [inline] |
A crash log is always generated by signal.
signum | the signal that was caused by the crash. |
Definition at line 156 of file crashlog_osx.cpp.
References filename_log, filename_save, and filename_screenshot.
char* CrashLogOSX::LogOSVersion | ( | char * | buffer, | |
const char * | last | |||
) | const [inline, 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 53 of file crashlog_osx.cpp.
References seprintf().
char* CrashLogOSX::LogError | ( | char * | buffer, | |
const char * | last, | |||
const char * | message | |||
) | const [inline, 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 72 of file crashlog_osx.cpp.
References seprintf(), and signum.
char* CrashLogOSX::LogStacktrace | ( | char * | buffer, | |
const char * | last | |||
) | const [inline, 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 84 of file crashlog_osx.cpp.
References seprintf().
bool CrashLogOSX::MakeCrashLog | ( | ) | [inline] |
Generate the crash log.
Definition at line 164 of file crashlog_osx.cpp.
References filename_log, filename_save, filename_screenshot, CrashLog::FillCrashLog(), lastof, CrashLog::WriteCrashLog(), CrashLog::WriteSavegame(), and CrashLog::WriteScreenshot().
Referenced by HandleCrash().
void CrashLogOSX::DisplayCrashDialog | ( | ) | const [inline] |
Show a dialog with the crash information.
Definition at line 196 of file crashlog_osx.cpp.
References filename_log, filename_save, filename_screenshot, lastof, CrashLog::message, seprintf(), and ShowMacDialog().
Referenced by HandleCrash().
int CrashLogOSX::signum [private] |
Signal that has been thrown.
Definition at line 47 of file crashlog_osx.cpp.
Referenced by LogError().