github.com/searKing/golang/go@v1.2.117/runtime/cgosymbolizer/include/boost/winapi/stack_backtrace.hpp (about)

     1  /*
     2   * Copyright 2017 Andrey Semashev
     3   *
     4   * Distributed under the Boost Software License, Version 1.0.
     5   * See http://www.boost.org/LICENSE_1_0.txt
     6   */
     7  
     8  #ifndef BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
     9  #define BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
    10  
    11  #include <boost/winapi/basic_types.hpp>
    12  #include <boost/winapi/config.hpp>
    13  
    14  #ifdef BOOST_HAS_PRAGMA_ONCE
    15  #pragma once
    16  #endif
    17  
    18  // MinGW does not provide RtlCaptureStackBackTrace
    19  #if !defined( BOOST_WINAPI_IS_MINGW )
    20  
    21  // Note: RtlCaptureStackBackTrace is available in WinXP SP1 and later
    22  #if (BOOST_USE_NTDDI_VERSION > BOOST_WINAPI_NTDDI_WINXP)
    23  
    24  #if BOOST_WINAPI_PARTITION_APP_SYSTEM
    25  
    26  #include <boost/winapi/detail/header.hpp>
    27  
    28  // Windows SDK shipped with MSVC 7.1 and 8 does not declare RtlCaptureStackBackTrace in headers but allows to link with it
    29  #if !defined( BOOST_USE_WINDOWS_H ) || (defined(_MSC_VER) && (_MSC_VER+0) < 1500)
    30  extern "C" {
    31  
    32  BOOST_WINAPI_IMPORT boost::winapi::WORD_
    33  BOOST_WINAPI_NTAPI_CC RtlCaptureStackBackTrace(
    34      boost::winapi::DWORD_ FramesToSkip,
    35      boost::winapi::DWORD_ FramesToCapture,
    36      boost::winapi::PVOID_* BackTrace,
    37      boost::winapi::PDWORD_ BackTraceHash);
    38  
    39  } // extern "C"
    40  #endif
    41  
    42  namespace boost {
    43  namespace winapi {
    44  
    45  using ::RtlCaptureStackBackTrace;
    46  
    47  }
    48  }
    49  
    50  #include <boost/winapi/detail/footer.hpp>
    51  
    52  #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
    53  #endif // (BOOST_USE_NTDDI_VERSION > BOOST_WINAPI_NTDDI_WINXP)
    54  #endif // !defined( BOOST_WINAPI_IS_MINGW )
    55  #endif // BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_