|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include <dttr_config.h>#include <dttr_crashdump.h>#include <dttr_errors.h>#include <dttr_loader.h>#include <dttr_log.h>#include <stdbool.h>#include <stdint.h>#include <string.h>#include <windows.h>Go to the source code of this file.
Typedefs | |
| typedef BOOL(* | is_wow64_process2_fn) (HANDLE, USHORT *, USHORT *) |
Enumerations | |
| enum | { WATCHDOG_TIMEOUT_MS = 30000 } |
Functions | |
| static void | detach_watchdog (DWORD process_id) |
| static bool | should_disable_watchdog () |
| static void | write_child_dump (HANDLE process, DWORD pid, DWORD tid, DWORD exception_code) |
| void | DTTR_Loader_WatchdogAttach (const PROCESS_INFORMATION *child_info) |
| void | DTTR_Loader_WatchdogDetach (const PROCESS_INFORMATION *child_info) |
| static bool | is_sentinel (HANDLE process, const OUTPUT_DEBUG_STRING_INFO *info) |
| bool | DTTR_Loader_WatchdogWait (const PROCESS_INFORMATION *child_info) |
Variables | |
| static const char | WATCHDOG_SENTINEL [] = "DTTR_SIDECAR_ENTRYPOINT" |
| static bool | watchdog_attached = false |
| typedef BOOL(* is_wow64_process2_fn) (HANDLE, USHORT *, USHORT *) |
Definition at line 14 of file watchdog.c.
| anonymous enum |
| Enumerator | |
|---|---|
| WATCHDOG_TIMEOUT_MS | |
Definition at line 11 of file watchdog.c.
Definition at line 18 of file watchdog.c.
References DTTR_LOG_DEBUG, DWORD, and watchdog_attached.
Referenced by DTTR_Loader_WatchdogDetach(), and DTTR_Loader_WatchdogWait().
| void DTTR_Loader_WatchdogAttach | ( | const PROCESS_INFORMATION * | child_info | ) |
Definition at line 115 of file watchdog.c.
References DTTR_LOG_DEBUG, DTTR_LOG_WARN, should_disable_watchdog(), and watchdog_attached.
Referenced by dttr_launcher_main().
| void DTTR_Loader_WatchdogDetach | ( | const PROCESS_INFORMATION * | child_info | ) |
Definition at line 137 of file watchdog.c.
References detach_watchdog().
Referenced by dttr_launcher_main().
| bool DTTR_Loader_WatchdogWait | ( | const PROCESS_INFORMATION * | child_info | ) |
Definition at line 163 of file watchdog.c.
References detach_watchdog(), DTTR_ERROR, DTTR_LOG_DEBUG, DTTR_LOG_INFO, DTTR_REPORT_SUFFIX, DWORD, is_sentinel(), watchdog_attached, WATCHDOG_TIMEOUT_MS, and write_child_dump().
Referenced by dttr_launcher_main().
|
static |
Definition at line 141 of file watchdog.c.
References WATCHDOG_SENTINEL.
Referenced by DTTR_Loader_WatchdogWait().
|
static |
Definition at line 28 of file watchdog.c.
References DTTR_LOG_DEBUG, and NULL.
Referenced by DTTR_Loader_WatchdogAttach().
Definition at line 61 of file watchdog.c.
References dttr_config, DTTR_CrashDump_AppendReportMessage(), DTTR_CrashDump_FormatStackTrace(), DTTR_CrashDump_LogAndTraceReport(), DTTR_CrashDump_Write(), DTTR_ERROR, DTTR_ERROR_TITLE, DTTR_Errors_ShowMessage(), DWORD, and FALSE.
Referenced by DTTR_Loader_WatchdogWait().
|
static |
Definition at line 16 of file watchdog.c.
Referenced by detach_watchdog(), DTTR_Loader_WatchdogAttach(), and DTTR_Loader_WatchdogWait().
|
static |
Definition at line 12 of file watchdog.c.
Referenced by is_sentinel().