mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
23 lines
367 B
C++
23 lines
367 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#define STACK_TRACE_MAX_DEPTH 32
|
|
|
|
|
|
/// Lets you get a stacktrace
|
|
class StackTrace
|
|
{
|
|
public:
|
|
/// The stacktrace is captured when the object is created
|
|
StackTrace();
|
|
|
|
/// Print to string
|
|
std::string toString() const;
|
|
|
|
private:
|
|
using Frame = void*;
|
|
Frame frames[STACK_TRACE_MAX_DEPTH];
|
|
size_t frames_size;
|
|
};
|