diff --git a/include/boost/stacktrace/detail/collect_unwind.ipp b/include/boost/stacktrace/detail/collect_unwind.ipp index 1adbba0..3ee4e8f 100644 --- a/include/boost/stacktrace/detail/collect_unwind.ipp +++ b/include/boost/stacktrace/detail/collect_unwind.ipp @@ -26,14 +26,16 @@ struct unwind_state { }; inline _Unwind_Reason_Code unwind_callback(::_Unwind_Context* context, void* arg) { + // Note: do not write `::_Unwind_GetIP` because it is a macro on some platforms. + // Use `_Unwind_GetIP` instead! unwind_state* const state = static_cast(arg); if (state->frames_to_skip) { --state->frames_to_skip; - return ::_Unwind_GetIP(context) ? ::_URC_NO_REASON : ::_URC_END_OF_STACK; + return _Unwind_GetIP(context) ? ::_URC_NO_REASON : ::_URC_END_OF_STACK; } *state->current = reinterpret_cast( - ::_Unwind_GetIP(context) + _Unwind_GetIP(context) ); ++state->current;