From ddb951a57ed0ac94c749e971f4c0556794110275 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sun, 18 Jan 2009 05:12:24 +0000 Subject: Implemented crash data reporting, though it's only some stubs on Windows and DOS. On UNIX with USE_UNIX_SIGNALS defined, when any crash causing signal happens it will dump to a file the current crawl_state, anything caught by the items and monsters scans, and level building info if the crash happened during level generation. Also, if crawl is linked against the GNU C library (and the exectuable is in ELF format) it will dump the stack trace. The code attempts to automatically detect the presence of glibc, but that might not work on all systems. This should work on OS X, since there's an OS X man page for the glibc functions that get the stack trace. Don't know if it would work with MinGW. Actually getting function names for the stack trace requires the use of the "-rdynamic" linker option, which increases the size of the stripped executable by 27% (yikes!), but still prints the function names even when stripped. All of the function names in the stack trace are mangled C++ ones, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8532 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/debug.h | 1 + 1 file changed, 1 insertion(+) (limited to 'crawl-ref/source/debug.h') diff --git a/crawl-ref/source/debug.h b/crawl-ref/source/debug.h index 22a62a0333..1e23f14eb9 100644 --- a/crawl-ref/source/debug.h +++ b/crawl-ref/source/debug.h @@ -144,4 +144,5 @@ bool get_item_by_name(item_def *item, char* specs, object_class_type class_wanted, bool create_for_real = false); +void do_crash_dump(); #endif -- cgit v1.2.3-54-g00ecf