debug/crash: temporarily disable backtrace reporting
We're using breakpad for a few projects. It has much better functionality.
This commit is contained in:
parent
a020f1d429
commit
ffb7fde46f
@ -46,7 +46,8 @@ backtrace::backtrace (void)
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
std::ostream&
|
std::ostream&
|
||||||
debug::operator <<(std::ostream &os, ::cruft::backtrace const &rhs) {
|
debug::operator <<(std::ostream &os, ::cruft::backtrace const &rhs)
|
||||||
|
{
|
||||||
static auto process = GetCurrentProcess ();
|
static auto process = GetCurrentProcess ();
|
||||||
CHECK (ready);
|
CHECK (ready);
|
||||||
|
|
||||||
|
@ -53,6 +53,9 @@ void dumping_handler (int sig, siginfo_t *info, void *ucontext)
|
|||||||
void
|
void
|
||||||
cruft::debug::init_crash_handler ()
|
cruft::debug::init_crash_handler ()
|
||||||
{
|
{
|
||||||
|
// Keep this disabled for the time being as most projects we're using
|
||||||
|
// employ breakpad which has better functionality.
|
||||||
|
#if 0
|
||||||
struct sigaction new_handler {};
|
struct sigaction new_handler {};
|
||||||
memset (&new_handler, 0, sizeof (new_handler));
|
memset (&new_handler, 0, sizeof (new_handler));
|
||||||
new_handler.sa_flags = SA_SIGINFO;
|
new_handler.sa_flags = SA_SIGINFO;
|
||||||
@ -67,4 +70,5 @@ cruft::debug::init_crash_handler ()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,37 @@
|
|||||||
|
|
||||||
#include "crash.hpp"
|
#include "crash.hpp"
|
||||||
|
|
||||||
|
#include "assert.hpp"
|
||||||
|
|
||||||
|
#include "../backtrace.hpp"
|
||||||
|
#include "../win32/windows.hpp"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
static LPTOP_LEVEL_EXCEPTION_FILTER previous_handler;
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
static LONG __stdcall
|
||||||
|
backtrace_handler (EXCEPTION_POINTERS *data)
|
||||||
|
{
|
||||||
|
std::clog << cruft::backtrace () << '\n';
|
||||||
|
|
||||||
|
if (previous_handler)
|
||||||
|
return previous_handler (data);
|
||||||
|
else
|
||||||
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
void
|
void
|
||||||
cruft::debug::init_crash_handler (void)
|
cruft::debug::init_crash_handler (void)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
CHECK (!previous_handler);
|
||||||
|
previous_handler = SetUnhandledExceptionFilter (backtrace_handler);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user