#pragma once #include namespace NYT::NBacktrace { //////////////////////////////////////////////////////////////////////////////// using TBacktrace = TRange; using TBacktraceBuffer = TMutableRange; //! Obtains a backtrace via a given cursor. /*! * \param buffer is the buffer where the backtrace is written to * \param framesToSkip is the number of top frames to skip * \returns the portion of #buffer that has actually been filled */ template TBacktrace GetBacktrace( TCursor* cursor, TBacktraceBuffer buffer, int framesToSkip); //! Symbolizes a backtrace invoking a given callback for each frame. /*! * \param backtrace Backtrace to symbolize * \param frameCallback Callback to invoke per each frame */ void SymbolizeBacktrace( TBacktrace backtrace, const std::function& frameCallback); //! Symbolizes a backtrace to a string. /*! * \param backtrace Backtrace to symbolize */ TString SymbolizeBacktrace(TBacktrace backtrace); //////////////////////////////////////////////////////////////////////////////// } // namespace NYT::NBacktrace #define BACKTRACE_INL_H_ #include "backtrace-inl.h" #undef BACKTRACE_INL_H_