2016-02-10 00:12:00 +01:00
|
|
|
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
|
2017-07-16 01:03:42 +02:00
|
|
|
// This source code is licensed under both the GPLv2 (found in the
|
|
|
|
// COPYING file in the root directory) and Apache 2.0 License
|
|
|
|
// (found in the LICENSE.Apache file in the root directory).
|
2013-10-16 23:59:46 +02:00
|
|
|
//
|
2013-10-05 07:32:05 +02:00
|
|
|
#pragma once
|
2013-10-04 06:49:15 +02:00
|
|
|
namespace rocksdb {
|
2014-04-23 15:11:35 +02:00
|
|
|
namespace port {
|
2013-04-11 19:54:35 +02:00
|
|
|
|
|
|
|
// Install a signal handler to print callstack on the following signals:
|
|
|
|
// SIGILL SIGSEGV SIGBUS SIGABRT
|
|
|
|
// Currently supports linux only. No-op otherwise.
|
|
|
|
void InstallStackTraceHandler();
|
|
|
|
|
2013-12-07 02:11:09 +01:00
|
|
|
// Prints stack, skips skip_first_frames frames
|
|
|
|
void PrintStack(int first_frames_to_skip = 0);
|
|
|
|
|
2014-04-23 15:11:35 +02:00
|
|
|
} // namespace port
|
|
|
|
} // namespace rocksdb
|