56 lines
1.6 KiB
C++
56 lines
1.6 KiB
C++
/*
|
|
* Copyright 2017 Andrey Semashev
|
|
*
|
|
* Distributed under the Boost Software License, Version 1.0.
|
|
* See http://www.boost.org/LICENSE_1_0.txt
|
|
*/
|
|
|
|
#ifndef ACTIV_BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
|
|
#define ACTIV_BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
|
|
|
|
#include <ActivBoost/winapi/basic_types.hpp>
|
|
#include <ActivBoost/winapi/config.hpp>
|
|
|
|
#ifdef ACTIV_BOOST_HAS_PRAGMA_ONCE
|
|
#pragma once
|
|
#endif
|
|
|
|
// MinGW does not provide RtlCaptureStackBackTrace
|
|
#if !defined( ACTIV_BOOST_WINAPI_IS_MINGW )
|
|
|
|
// Note: RtlCaptureStackBackTrace is available in WinXP SP1 and later
|
|
#if (ACTIV_BOOST_USE_NTDDI_VERSION > ACTIV_BOOST_WINAPI_NTDDI_WINXP)
|
|
|
|
#if ACTIV_BOOST_WINAPI_PARTITION_APP_SYSTEM
|
|
|
|
#include <ActivBoost/winapi/detail/header.hpp>
|
|
|
|
// Windows SDK shipped with MSVC 7.1 and 8 does not declare RtlCaptureStackBackTrace in headers but allows to link with it
|
|
#if !defined( ACTIV_BOOST_USE_WINDOWS_H ) || (defined(_MSC_VER) && (_MSC_VER+0) < 1500)
|
|
extern "C" {
|
|
|
|
ACTIV_BOOST_WINAPI_IMPORT Boost::winapi::WORD_
|
|
ACTIV_BOOST_WINAPI_NTAPI_CC RtlCaptureStackBackTrace(
|
|
Boost::winapi::DWORD_ FramesToSkip,
|
|
Boost::winapi::DWORD_ FramesToCapture,
|
|
Boost::winapi::PVOID_* BackTrace,
|
|
Boost::winapi::PDWORD_ BackTraceHash);
|
|
|
|
} // extern "C"
|
|
#endif
|
|
|
|
namespace Boost {
|
|
namespace winapi {
|
|
|
|
using ::RtlCaptureStackBackTrace;
|
|
|
|
}
|
|
}
|
|
|
|
#include <ActivBoost/winapi/detail/footer.hpp>
|
|
|
|
#endif // ACTIV_BOOST_WINAPI_PARTITION_APP_SYSTEM
|
|
#endif // (ACTIV_BOOST_USE_NTDDI_VERSION > ACTIV_BOOST_WINAPI_NTDDI_WINXP)
|
|
#endif // !defined( ACTIV_BOOST_WINAPI_IS_MINGW )
|
|
#endif // ACTIV_BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
|