diff options
Diffstat (limited to 'src/crashlog.cpp')
-rw-r--r-- | src/crashlog.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 60dbb480e..8649f396d 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -35,6 +35,30 @@ /* static */ char *CrashLog::gamelog_buffer = NULL; /* static */ const char *CrashLog::gamelog_last = NULL; +char *CrashLog::LogCompiler(char *buffer, const char *last) const +{ + buffer += seprintf(buffer, last, " Compiler: " +#if defined(_MSC_VER) + "MSVC %d", _MSC_VER +#elif defined(__ICC) && defined(__GNUC__) + "ICC %d (GCC %d.%d.%d mode)", __ICC, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ +#elif defined(__ICC) + "ICC %d", __ICC +#elif defined(__GNUC__) + "GCC %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ +#elif defined(__WATCOMC__) + "WatcomC %d", __WATCOMC__ +#else + "<unknown>" +#endif + ); +#if defined(__VERSION__) + return buffer + seprintf(buffer, last, " \"" __VERSION__ "\"\n\n"); +#else + return buffer + seprintf(buffer, last, "\n\n"); +#endif +} + /* virtual */ char *CrashLog::LogRegisters(char *buffer, const char *last) const { /* Stub implementation; not all OSes support this. */ @@ -233,6 +257,7 @@ char *CrashLog::FillCrashLog(char *buffer, const char *last) const buffer = this->LogRegisters(buffer, last); buffer = this->LogStacktrace(buffer, last); buffer = this->LogOSVersion(buffer, last); + buffer = this->LogCompiler(buffer, last); buffer = this->LogConfiguration(buffer, last); buffer = this->LogLibraries(buffer, last); buffer = this->LogModules(buffer, last); |