diff options
-rw-r--r-- | crawl-ref/source/crash-u.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/crawl-ref/source/crash-u.cc b/crawl-ref/source/crash-u.cc index 8a1f3d000d..ab76768b25 100644 --- a/crawl-ref/source/crash-u.cc +++ b/crawl-ref/source/crash-u.cc @@ -13,7 +13,7 @@ REVISION("$Rev$"); #include <signal.h> #endif -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__APPLE__) #include <execinfo.h> #endif @@ -136,7 +136,7 @@ void dump_crash_info(FILE* file) name); } -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__APPLE__) // NOTE: This should work on OS X, according to // http://developer.apple.com/DOCUMENTATION/DARWIN/Reference/ManPages/man3/backtrace_symbols.3.html @@ -166,7 +166,7 @@ void write_stack_trace(FILE* file, int ignore_count) free(symbols); } -#else // ifdef __GLIBC__ +#else // if defined(__GLIBC__) || defined(__APPLE__) void write_stack_trace(FILE* file, int ignore_count) { const char* msg = "Unable to get stack trace on this platform." EOL; diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 45c7d406c0..6b3c1b91b8 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -5563,6 +5563,17 @@ void do_crash_dump() fprintf(file, "%s" EOL EOL, _assert_msg.c_str()); #endif + fprintf(file, "Revision: %d" EOL, svn_revision()); + fprintf(file, "Version: %s" EOL, CRAWL " " VERSION); +#if defined(UNIX) + fprintf(file, "Platform: unix" EOL); +#endif +#ifdef USE_TILE + fprintf(file, "Tiles: yes" EOL EOL); +#else + fprintf(file, "Tiles: no" EOL EOL); +#endif + // First get the immediate cause of the crash and the stack trace, // since that's most important and later attempts to get more information // might themselves cause crashes. |