OpenTTD Source
20241121-master-g67a0fccfad
|
Implementation of a crashlogger for Windows. More...
#include "../../stdafx.h"
#include "../../crashlog.h"
#include "win32.h"
#include "../../core/math_func.hpp"
#include "../../string_func.h"
#include "../../fileio_func.h"
#include "../../strings_func.h"
#include "../../gamelog.h"
#include "../../saveload/saveload.h"
#include "../../video/video_driver.hpp"
#include "../../library_loader.h"
#include <windows.h>
#include <mmsystem.h>
#include <signal.h>
#include <psapi.h>
#include <setjmp.h>
#include "../../safeguards.h"
Go to the source code of this file.
Data Structures | |
class | CrashLogWindows |
Windows implementation for the crash logger. More... | |
Functions | |
static void | ImmediateExitProcess (uint exit_code) |
Forcefully try to terminate the application. More... | |
bool | CloseConsoleLogIfActive () |
static void | ShowCrashlogWindow () |
static LONG WINAPI | ExceptionHandler (EXCEPTION_POINTERS *ep) |
static LONG WINAPI | VectoredExceptionHandler (EXCEPTION_POINTERS *ep) |
static void CDECL | CustomAbort (int) |
static void | SetWndSize (HWND wnd, int mode) |
static INT_PTR CALLBACK | CrashDialogFunc (HWND wnd, UINT msg, WPARAM wParam, LPARAM) |
Variables | |
static constexpr DWORD | CUSTOM_ABORT_EXCEPTION = 0xE1212012 |
Exception code used for custom abort. | |
static const std::map< DWORD, std::string > | exception_code_to_name |
A map between exception code and its name. More... | |
thread_local void * | _safe_esp = nullptr |
Stack pointer for use when 'starting' the crash handler. More... | |
static bool | _expanded |
static const wchar_t | _crash_desc [] |
static const wchar_t *const | _expand_texts [] = {L"S&how report >>", L"&Hide report <<" } |
Implementation of a crashlogger for Windows.
Definition in file crashlog_win.cpp.
|
static |
Forcefully try to terminate the application.
exit_code | The exit code to return. |
Definition at line 74 of file crashlog_win.cpp.
|
static |
Definition at line 438 of file crashlog_win.cpp.
thread_local void* _safe_esp = nullptr |
Stack pointer for use when 'starting' the crash handler.
Not static as gcc's inline assembly needs it that way.
Definition at line 307 of file crashlog_win.cpp.
|
static |
A map between exception code and its name.
Definition at line 43 of file crashlog_win.cpp.
Referenced by CrashLogWindows::SurveyCrash().