OpenMW
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/param.h>
#include <sys/ucontext.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
#include <stdbool.h>
#include <sys/ptrace.h>
#include <string>
#include <SDL_messagebox.h>
Functions | |
static void | gdb_info (pid_t pid) |
static void | sys_info (void) |
static size_t | safe_write (int fd, const void *buf, size_t len) |
static void | crash_catcher (int signum, siginfo_t *siginfo, void *context) |
static void | crash_handler (const char *logfile) |
int | cc_install_handlers (int argc, char **argv, int num_signals, int *signals, const char *logfile, int(*user_info)(char *, char *)) |
bool | is_debugger_attached (void) |
Variables | |
static const char | crash_switch [] = "--cc-handle-crash" |
static const char | fatal_err [] = "\n\n*** Fatal Error ***\n" |
static const char | pipe_err [] = "!!! Failed to create pipe\n" |
static const char | fork_err [] = "!!! Failed to fork debug process\n" |
static const char | exec_err [] = "!!! Failed to exec debug process\n" |
static char | argv0 [PATH_MAX] |
static char | altstack [SIGSTKSZ] |
struct { | |
int signum | |
pid_t pid | |
int has_siginfo | |
siginfo_t siginfo | |
char buf [1024] | |
} | crash_info |
struct { | |
const char * name | |
int signum | |
} | signals [] |
struct { | |
int code | |
const char * name | |
} | sigill_codes [] |
struct { | |
int code | |
const char * name | |
} | sigfpe_codes [] |
struct { | |
int code | |
const char * name | |
} | sigsegv_codes [] |
struct { | |
int code | |
const char * name | |
} | sigbus_codes [] |
static int(* | cc_user_info )(char *, char *) |
int cc_install_handlers | ( | int | argc, |
char ** | argv, | ||
int | num_signals, | ||
int * | signals, | ||
const char * | logfile, | ||
int(*)(char *, char *) | user_info | ||
) |
static void crash_catcher | ( | int | signum, |
siginfo_t * | siginfo, | ||
void * | context | ||
) | [static] |
static void crash_handler | ( | const char * | logfile | ) | [static] |
static void gdb_info | ( | pid_t | pid | ) | [static] |
bool is_debugger_attached | ( | void | ) |
static size_t safe_write | ( | int | fd, |
const void * | buf, | ||
size_t | len | ||
) | [static] |
static void sys_info | ( | void | ) | [static] |
char altstack[SIGSTKSZ] [static] |
char argv0[PATH_MAX] [static] |
char buf[1024] |
int(* cc_user_info)(char *, char *) [static] |
int code |
struct { ... } crash_info [static] |
const char crash_switch[] = "--cc-handle-crash" [static] |
const char exec_err[] = "!!! Failed to exec debug process\n" [static] |
const char fatal_err[] = "\n\n*** Fatal Error ***\n" [static] |
const char fork_err[] = "!!! Failed to fork debug process\n" [static] |
int has_siginfo |
const char* name |
pid_t pid |
const char pipe_err[] = "!!! Failed to create pipe\n" [static] |
struct { ... } sigbus_codes[] [static] |
struct { ... } sigfpe_codes[] [static] |
struct { ... } sigill_codes[] [static] |
siginfo_t siginfo |
struct { ... } signals[] [static] |
int signum |
struct { ... } sigsegv_codes[] [static] |