boostorg / stacktrace

C++ library for storing and printing backtraces.
https://boost.org/libs/stacktrace
424 stars 71 forks source link

RtlCaptureStackBackTrace is available in MinGW #52

Closed volo-zyko closed 6 years ago

volo-zyko commented 6 years ago

At least in my case (GCC 6.3.0, sjlj exception handling, Window 8.1 Pro 64-bit, build targeting 32-bit environment) it compiles and works fine. On the contrary _Unwind_Backtrace in the same environment compiles but does not work.

It would be good if this were at least configurable if there are still cases when RtlCaptureStackBackTrace is not available.

https://github.com/boostorg/stacktrace/blob/e4e2d4c3c130c74f369655c1da204a64fce9937a/include/boost/stacktrace/safe_dump_to.hpp#L214

volo-zyko commented 6 years ago

Sorry, I was wrong. I use MinGW-w64 targeting 32-bit environment, hence the confusion. And I work with boost 1.65.1 which had in this line !defined(BOOST_GCC). Changing this code to !defined(BOOST_WINAPI_IS_MINGW) fixed my issue.

This one can be closed as invalid.

apolukhin commented 6 years ago

Anyway, thanks for the second comment! It saved me from debugging :)