OpenTTD Source  1.11.0-beta2
crashlog_osx.cpp File Reference
#include "../../stdafx.h"
#include "../../crashlog.h"
#include "../../string_func.h"
#include "../../gamelog.h"
#include "../../saveload/saveload.h"
#include "../../video/video_driver.hpp"
#include "macos.h"
#include <errno.h>
#include <signal.h>
#include <mach-o/arch.h>
#include <dlfcn.h>
#include <cxxabi.h>
#include "../../safeguards.h"

Go to the source code of this file.

Data Structures

class  CrashLogOSX
 OSX implementation for the crash logger. More...
 

Macros

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

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

◆ HandleCrash()

void CDECL HandleCrash ( int  signum)

Entry point for the crash handler.

Note
Not static so it shows up in the backtrace.
Parameters
signumthe signal that caused us to crash.

Definition at line 223 of file crashlog_osx.cpp.

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

Referenced by CrashLog::InitialiseCrashLog().