Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move dbghelp into Boost.Dll #7

Merged
merged 2 commits into from
Feb 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions include/boost/detail/winapi/dbghelp.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions include/boost/dll/detail/demangling/demangle_symbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <algorithm>

#if defined(BOOST_MSVC) || defined(BOOST_MSVC_FULL_VER)
#include <boost/detail/winapi/dbghelp.hpp>
#include <boost/dll/detail/windows/dbghelp.hpp>

namespace boost
{
Expand All @@ -27,7 +27,7 @@ inline std::string demangle_symbol(const char *mangled_name)
{
char unmangled_name[2048];

::boost::detail::winapi::
::boost::dll::detail::winapi::
UnDecorateSymbolName(mangled_name, unmangled_name, 2048, 0);

return std::string(unmangled_name);
Expand Down
81 changes: 81 additions & 0 deletions include/boost/dll/detail/windows/dbghelp.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// dbghelp.hpp --------------------------------------------------------------//

// Copyright 2015 Klemens Morgenstern

// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt

#ifndef BOOST_DLL_DETAIL_WINDOWS_DBGHELP_HPP_
#define BOOST_DLL_DETAIL_WINDOWS_DBGHELP_HPP_

#include <boost/detail/winapi/basic_types.hpp>

struct API_VERSION;

namespace boost
{
namespace dll
{
namespace detail
{
namespace winapi
{
extern "C"
{

BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI UnDecorateSymbolName
(const boost::detail::winapi::CHAR_ * DecoratedName,
boost::detail::winapi::CHAR_ *UnDecoratedName,
boost::detail::winapi::DWORD_ UndecoratedLength,
boost::detail::winapi::DWORD_ Flags);

BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI UnDecorateSymbolNameW
(const boost::detail::winapi::WCHAR_ * DecoratedName,
boost::detail::winapi::WCHAR_* UnDecoratedName,
boost::detail::winapi::DWORD_ UndecoratedLength,
boost::detail::winapi::DWORD_ Flags);

}

inline boost::detail::winapi::DWORD_ undecorate_symbol_name(const char* decorated_name,
char* undecorated_name,
boost::detail::winapi::DWORD_ undecorated_length,
boost::detail::winapi::DWORD_ flags)
{
return UnDecorateSymbolName(decorated_name, undecorated_name, undecorated_length, flags);
}

inline boost::detail::winapi::DWORD_ undecorate_symbol_name(const wchar_t* decorated_name,
wchar_t* undecorated_name,
boost::detail::winapi::DWORD_ undecorated_length,
boost::detail::winapi::DWORD_ flags)
{
return UnDecorateSymbolNameW(decorated_name, undecorated_name, undecorated_length, flags);
}


extern "C"
{
struct api_version {
unsigned short major_version;
unsigned short minor_version;
unsigned short revision;
unsigned short reserved;
};

BOOST_SYMBOL_IMPORT ::API_VERSION* WINAPI ImagehlpApiVersion();



}
inline api_version& image_api_version()
{
return *reinterpret_cast<api_version*>(ImagehlpApiVersion());
}

}}}}




#endif /* BOOST_DLL_DETAIL_WINDOWS_DBGHELP_HPP_ */