mirror of https://github.com/Icinga/icinga2.git
*NIX build fix.
This commit is contained in:
parent
fa3f01667f
commit
e54604c0e3
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue