# crashlog_osx.cpp File Reference

OS X crash log handler. More...

`#include "../../stdafx.h"`
`#include "../../crashlog.h"`
`#include "../../string_func.h"`
`#include "../../gamelog.h"`
`#include "../../saveload/saveload.h"`
`#include "macos.h"`
`#include <errno.h>`
`#include <signal.h>`
`#include <mach-o/arch.h>`
`#include <dlfcn.h>`
`#include <cxxabi.h>`

Go to the source code of this file.

## Data Structures
class | CrashLogOSX
| OSX implementation for the crash logger. More...
## Defines
#define | IS_ALIGNED(addr) (((uintptr_t)(addr) & 0xf) == 0)
#define | PRINTF_PTR "0x%08lx"
#define | MAX_STACK_FRAMES 64
## Functions
void CDECL | HandleCrash (int signum)
| Entry point for the crash handler.
## Variables
static const int | _signals_to_handle [] = { SIGSEGV, SIGABRT, SIGFPE, SIGBUS, SIGILL, SIGSYS }
| The signals we want our crash handler to handle.

## Detailed Description

OS X crash log handler.

Definition in file crashlog_osx.cpp.

## Function Documentation

void CDECL HandleCrash | ( | int | signum | ) |

Entry point for the crash handler.

Note:
  Not static so it shows up in the backtrace.

Parameters:

  | signum | the signal that caused us to crash.

Definition at line 220 of file crashlog_osx.cpp.

References _signals_to_handle, CrashLog::AfterCrashLogCleanup(), CrashLogOSX::DisplayCrashDialog(), endof, GamelogTestEmergency(), CrashLogOSX::MakeCrashLog(), SaveloadCrashWithMissingNewGRFs(), and ShowMacDialog().

Referenced by CrashLog::InitialiseCrashLog().

## Variable Documentation

const int _signals_to_handle[] = { SIGSEGV, SIGABRT, SIGFPE, SIGBUS, SIGILL, SIGSYS }`[static]`

The signals we want our crash handler to handle.

Definition at line 213 of file crashlog_osx.cpp.

Referenced by HandleCrash(), and CrashLog::InitialiseCrashLog().