Files
stacktrace/modules/boost_stacktrace_dump.cppm
T
Fedor Osetrov f966b6a1e6 feat boost.stacktrace: C++20 modules support (#230)
- Introduce `boost.stacktrace_dump` module for safe_dump interface
- Introduce `boost.stacktrace_<backend>` module for each unwind/collect implementation method
- Introduce `boost.stacktrace` module exposing best available backend implementation

Also many tests was added for checking all available backend build and also header only library version
Moreover, there are some checks for `Boost::stacktrace_<backend>` and  `Boost::stacktrace_from_exception` compatibility

---------

Co-authored-by: Fedor Osetrov <fdr400@Fedors-MacBook-Pro.local>
2026-05-05 20:29:10 +03:00

46 lines
1.1 KiB
C++

// Copyright Antony Polukhin, 2025-2026.
// Copyright Fedor Osetrov, 2025-2026.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
module;
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <boost/config.hpp>
#include <boost/predef.h>
#include <fcntl.h>
#include <unwind.h>
#include <stdio.h>
#include <sys/stat.h>
#define BOOST_STACKTRACE_INTERFACE_UNIT
#define BOOST_STACKTRACE_LINK
export module boost.stacktrace.dump;
#ifdef __clang__
# pragma clang diagnostic ignored "-Winclude-angled-in-module-purview"
#endif
#include <boost/stacktrace/safe_dump_to.hpp>
module :private;
#define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS
#if defined(BOOST_WINDOWS)
# include <boost/stacktrace/detail/safe_dump_win.ipp>
#else
# include <boost/stacktrace/detail/safe_dump_posix.ipp>
#endif
#if defined(BOOST_WINDOWS) && !defined(BOOST_WINAPI_IS_MINGW) // MinGW does not provide RtlCaptureStackBackTrace. MinGW-w64 does.
# include <boost/stacktrace/detail/collect_msvc.ipp>
#else
# include <boost/stacktrace/detail/collect_unwind.ipp>
#endif