*NIX build fix.

This commit is contained in:
Gunnar Beutner 2013-03-07 15:16:01 +01:00
parent fa3f01667f
commit e54604c0e3
2 changed files with 4 additions and 3 deletions

View File

@ -317,7 +317,8 @@ void Application::SigAbrtHandler(int signum)
std::cerr << "Caught SIGABRT." << std::endl; std::cerr << "Caught SIGABRT." << std::endl;
Utility::PrintStacktrace(std::cerr, 1); StackTrace trace;
trace.Print(std::cerr, 1);
DisplayBugMessage(); DisplayBugMessage();
} }

View File

@ -88,8 +88,10 @@ StackTrace::StackTrace(PEXCEPTION_POINTERS exi)
void StackTrace::Initialize(void) void StackTrace::Initialize(void)
{ {
#ifdef _WIN32
(void) SymSetOptions(SYMOPT_UNDNAME | SYMOPT_LOAD_LINES); (void) SymSetOptions(SYMOPT_UNDNAME | SYMOPT_LOAD_LINES);
(void) SymInitialize(GetCurrentProcess(), NULL, TRUE); (void) SymInitialize(GetCurrentProcess(), NULL, TRUE);
#endif /* _WIN32 */
} }
/** /**
@ -133,8 +135,6 @@ void StackTrace::Print(ostream& fp, int ignoreFrames)
free(messages); free(messages);
fp << std::endl; fp << std::endl;
return true;
# else /* HAVE_BACKTRACE_SYMBOLS */ # else /* HAVE_BACKTRACE_SYMBOLS */
fp << "(not available)" << std::endl; fp << "(not available)" << std::endl;
# endif /* HAVE_BACKTRACE_SYMBOLS */ # endif /* HAVE_BACKTRACE_SYMBOLS */