2016-02-09 23:12:00 +00:00
|
|
|
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
|
2013-10-16 21:59:46 +00:00
|
|
|
// This source code is licensed under the BSD-style license found in the
|
|
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
2017-04-28 00:50:56 +00:00
|
|
|
// This source code is also licensed under the GPLv2 license found in the
|
|
|
|
// COPYING file in the root directory of this source tree.
|
2013-10-16 21:59:46 +00:00
|
|
|
//
|
2013-10-05 05:32:05 +00:00
|
|
|
#pragma once
|
2013-10-04 04:49:15 +00:00
|
|
|
namespace rocksdb {
|
2014-04-23 13:11:35 +00:00
|
|
|
namespace port {
|
2013-04-11 17:54:35 +00: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 01:11:09 +00:00
|
|
|
// Prints stack, skips skip_first_frames frames
|
|
|
|
void PrintStack(int first_frames_to_skip = 0);
|
|
|
|
|
2014-04-23 13:11:35 +00:00
|
|
|
} // namespace port
|
|
|
|
} // namespace rocksdb
|