1 parent
3851aeb703
commit
053ee5b296
23 files changed
+845
-93
No files matched your search
@@ -2,6 +2,8 @@ void_add_module(Net
|
||||
INTERNAL_DEPS Functional Text
|
||||
EXTERNAL_DEPS
|
||||
Boost::headers
|
||||
Boost::beast
|
||||
Boost::asio
|
||||
Boost::url
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
|
||||
+14
-19
@@ -78,6 +78,19 @@ namespace Void::Plugin
|
||||
return m_pin->info;
|
||||
}
|
||||
|
||||
void* PluginHandle::raw_symbol(const char* symbol) const noexcept
|
||||
{
|
||||
#ifdef VOID_HAS_DLOPEN
|
||||
if (!m_pin || m_pin->handle == nullptr || symbol == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
return dlsym(m_pin->handle, symbol);
|
||||
#else
|
||||
(void)symbol;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ── loading helpers ───────────────────────────────────────────────────
|
||||
|
||||
namespace
|
||||
@@ -589,25 +602,7 @@ namespace Void::Plugin
|
||||
void* PluginManager::raw_symbol(std::string_view name,
|
||||
const char* symbol) const
|
||||
{
|
||||
#ifdef VOID_HAS_DLOPEN
|
||||
std::shared_ptr<detail::Instance> inst;
|
||||
{
|
||||
std::lock_guard lock(m_mutex);
|
||||
auto* entry = find(name);
|
||||
if (entry == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
inst = entry->current.load(std::memory_order_acquire);
|
||||
}
|
||||
if (!inst || inst->handle == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
return dlsym(inst->handle, symbol);
|
||||
#else
|
||||
(void)name;
|
||||
(void)symbol;
|
||||
return nullptr;
|
||||
#endif
|
||||
return acquire(name).raw_symbol(symbol);
|
||||
}
|
||||
|
||||
} // namespace Void::Plugin
|
||||
@@ -0,0 +1,3 @@
|
||||
void_add_module(ShortUrl
|
||||
INTERNAL_DEPS Service
|
||||
)
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
#define BOOST_STACKTRACE_USE_BACKTRACE
|
||||
#include <boost/core/demangle.hpp>
|
||||
#include <boost/stacktrace.hpp>
|
||||
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
if(WIN32 AND NOT CYGWIN)
|
||||
set(_void_stacktrace_target Boost::stacktrace_windbg)
|
||||
else()
|
||||
set(_void_stacktrace_target Boost::stacktrace_addr2line)
|
||||
endif()
|
||||
|
||||
void_add_module(Stacktrace
|
||||
INTERNAL_DEPS Functional
|
||||
EXTERNAL_DEPS Boost::stacktrace_backtrace
|
||||
DEPS_WIN32 dbghelp
|
||||
EXTERNAL_DEPS ${_void_stacktrace_target}
|
||||
DEPS_UNIX dl
|
||||
OPTIONS_UNIX -g -fno-omit-frame-pointer
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(Void_Stacktrace
|
||||
PRIVATE BOOST_STACKTRACE_DYN_LINK)
|
||||
endif()
|
||||
Reference in new issue
Block a user