Fixed compilability on MSYS2+MINGW64 platform with CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE=On option.

This commit is contained in:
Pavol Gono 2024-09-03 19:40:04 +00:00
parent c7ff8cbf79
commit e32eec224e
2 changed files with 3 additions and 3 deletions

View File

@ -82,13 +82,13 @@ endif()
if(NOT WIN32)
check_support(HAS_UNWIND has_unwind.cpp "" "" "")
check_support(HAS_EXECINFO has_execinfo.cpp "" "" "")
check_support(HAS_BACKTRACE has_backtrace.cpp "" "backtrace" "${CPPTRACE_BACKTRACE_PATH_DEFINITION}")
set(STACKTRACE_LINK_LIB "stdc++_libbacktrace")
else()
check_support(HAS_STACKWALK has_stackwalk.cpp "" "dbghelp" "")
endif()
if(NOT WIN32 OR MINGW)
check_support(HAS_BACKTRACE has_backtrace.cpp "" "backtrace" "${CPPTRACE_BACKTRACE_PATH_DEFINITION}")
set(STACKTRACE_LINK_LIB "stdc++_libbacktrace")
check_support(HAS_CXX_EXCEPTION_TYPE has_cxx_exception_type.cpp "" "" "")
endif()

View File

@ -54,7 +54,7 @@ namespace libbacktrace {
static backtrace_state* state = nullptr;
static bool called = false;
if(!called) {
state = backtrace_create_state(program_name(), true, error_callback, nullptr);
state = backtrace_create_state(program_name().c_str(), true, error_callback, nullptr);
called = true;
}
return state;