diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a1e505..137f584 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -348,6 +348,9 @@ if(CPPTRACE_UNWIND_WITH_WINAPI) endif() if(CPPTRACE_UNWIND_WITH_DBGHELP) + if(NOT HAS_STACKWALK) + message(WARNING "Cpptrace: CPPTRACE_UNWIND_WITH_DBGHELP specified but dbghelp stackwalk64 doesn't seem to be available.") + endif() target_compile_definitions(cpptrace PUBLIC CPPTRACE_UNWIND_WITH_DBGHELP) target_link_libraries(cpptrace PRIVATE dbghelp) endif() diff --git a/src/unwind/unwind_with_dbghelp.cpp b/src/unwind/unwind_with_dbghelp.cpp index 83f5fc0..f1005af 100644 --- a/src/unwind/unwind_with_dbghelp.cpp +++ b/src/unwind/unwind_with_dbghelp.cpp @@ -50,7 +50,7 @@ namespace detail { "label:\n\t" "mov{l %%ebp, %[cEbp] | %[cEbp], ebp};\n\t" "mov{l %%esp, %[cEsp] | %[cEsp], esp};\n\t" - "mov{l $label, %%eax | eax, label};\n\t" + "mov{l $label, %%eax | eax, OFFSET label};\n\t" "mov{l %%eax, %[cEip] | %[cEip], eax};\n\t" : [cEbp] "=r" (context.Ebp), [cEsp] "=r" (context.Esp),