diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2014-10-09 15:33:41 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-05-12 23:24:14 +0100 |
commit | 4627fab9b924306d9fd5f65dd63de9e795298df4 (patch) | |
tree | 65d50288231d7790bad4e3ccd81a54b2098d672d /hw | |
parent | ec2ae4c44571dcb82ece5480f0b95c84d2b4642f (diff) |
Add crash reporting
xorg_backtrace() is called in a few places to generate a backtrace for the log,
when the condition is not fatal (mi queue overflow, vpnprintf unrecognized
format), where we don't want to run the crash reporter
So add a separate, explicit invocation of the crash reporter, which is invoked
on a fatal signal only
v2:
Rather than invoking an external script to do crashreporting, load an optional
DLL which contains the crashreporter.
Use new interfaces in Cygwin 2.0.0 to extract EXCEPTION_POINTERS from the signal
information, and pass those to the crashreporter.
v3:
Downgrade crashreporter not loaded message to debug
v4:
Fix building on non-Windows
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwin/InitOutput.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 6b58ad6ce..1eebdc6c7 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -158,6 +158,8 @@ main(int argc, char *argv[], char *envp[]) { int iReturn; + xorg_crashreport_init(NULL); + /* Create & acquire the termination mutex */ iReturn = pthread_mutex_init(&g_pmTerminating, NULL); if (iReturn != 0) { @@ -657,6 +659,8 @@ OsVendorInit(void) g_fLogInited = TRUE; g_pszLogFile = LogInit(g_pszLogFile, ".old"); + /* Tell crashreporter logfile name */ + xorg_crashreport_init(g_pszLogFile); } LogSetParameter(XLOG_FLUSH, 1); LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose); |