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/utsname.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>
Macros | |
#define | UNUSED(x) (void)(x) |
#define | PATH_MAX 256 |
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 *) |
#define PATH_MAX 256 |
#define UNUSED | ( | x | ) | (void)(x) |
int cc_install_handlers | ( | int | argc, |
char ** | argv, | ||
int | num_signals, | ||
int * | signals, | ||
const char * | logfile, | ||
int(*)(char *, char *) | user_info | ||
) |
|
static |
|
static |
|
static |
bool is_debugger_attached | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
char buf[1024] |
|
static |
int code |
struct { ... } crash_info |
|
static |
|
static |
|
static |
|
static |
int has_siginfo |
const char* name |
pid_t pid |
|
static |
const { ... } sigbus_codes[] |
const { ... } sigfpe_codes[] |
const { ... } sigill_codes[] |
siginfo_t siginfo |
const { ... } signals[] |
int signum |
const { ... } sigsegv_codes[] |