Small fixes

This commit is contained in:
Jeremy 2023-10-04 18:23:19 -04:00
parent 79fc0df281
commit 435b3cd001
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
2 changed files with 4 additions and 1 deletions

View File

@ -348,6 +348,9 @@ if(CPPTRACE_UNWIND_WITH_WINAPI)
endif() endif()
if(CPPTRACE_UNWIND_WITH_DBGHELP) 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_compile_definitions(cpptrace PUBLIC CPPTRACE_UNWIND_WITH_DBGHELP)
target_link_libraries(cpptrace PRIVATE dbghelp) target_link_libraries(cpptrace PRIVATE dbghelp)
endif() endif()

View File

@ -50,7 +50,7 @@ namespace detail {
"label:\n\t" "label:\n\t"
"mov{l %%ebp, %[cEbp] | %[cEbp], ebp};\n\t" "mov{l %%ebp, %[cEbp] | %[cEbp], ebp};\n\t"
"mov{l %%esp, %[cEsp] | %[cEsp], esp};\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" "mov{l %%eax, %[cEip] | %[cEip], eax};\n\t"
: [cEbp] "=r" (context.Ebp), : [cEbp] "=r" (context.Ebp),
[cEsp] "=r" (context.Esp), [cEsp] "=r" (context.Esp),