Print stack trace on exceptions

if libunwind is found.

Useful for debugging logs.
This commit is contained in:
moneromooo-monero 2016-03-28 19:00:18 +01:00
parent ef4ff4252a
commit e409e59d29
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 188 additions and 2 deletions

View file

@ -31,6 +31,7 @@
#include "common/command_line.h"
#include "common/scoped_message_writer.h"
#include "common/util.h"
#include "common/stack_trace.h"
#include "cryptonote_core/cryptonote_core.h"
#include "cryptonote_core/miner.h"
#include "daemon/command_server.h"
@ -258,6 +259,7 @@ int main(int argc, char const * argv[])
, log_file_path.filename().string().c_str()
, log_file_path.parent_path().string().c_str()
);
tools::set_stack_trace_log(log_file_path.filename().string());
}
_note_c("dbg/main", "Moving from main() into the daemonize now.");