From df1ef68cd8e8582724ce1192bfc202e0b9aeaf0c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 28 Sep 2021 19:24:31 +0300 Subject: Get rid of C++ modules related code and rename *.mxx files to *.hxx --- libbutl/backtrace.hxx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libbutl/backtrace.hxx (limited to 'libbutl/backtrace.hxx') diff --git a/libbutl/backtrace.hxx b/libbutl/backtrace.hxx new file mode 100644 index 0000000..6afb6ea --- /dev/null +++ b/libbutl/backtrace.hxx @@ -0,0 +1,27 @@ +// file : libbutl/backtrace.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#pragma once + +#include + +#include + +namespace butl +{ + // Return the calling thread's backtrace or empty string if this + // functionality is not supported or an error has occurred. The exact + // backtrace format is implementation-defined; it normally contains a line + // with the binary name, address in that binary, and, if available, the + // function name for each stack frame. + // + // Currently this functionality is only available on Linux (with glibc), + // FreeBSD/NetBSD, and Mac OS. On the first two platforms the address + // can be mapped to the function name and, if built with debug info, to + // source location using the addr2line(1) utility: + // + // $ addr2line -f -C -e + // + LIBBUTL_SYMEXPORT std::string + backtrace () noexcept; +} -- cgit v1.1