[llvm-dev] Supporting libunwind on Windows 10 (32bit; 64bit) for MSVC and Clang
Ian Lance Taylor via llvm-dev
llvm-dev at lists.llvm.org
Sat Aug 15 20:26:57 PDT 2020
Ivan Serdyuk <local.tourist.kiev at gmail.com> writes:
>> For libbacktrace, I guess the _Unwind_Backtrace function in libunwind
>> might work and be useful, even if the rest of libunwind doesn't make sense
>> in such a context.
> please share your vision/propose some plan.
Currently libbacktrace relies on _Unwind_Backtrace, which as you know
calls a callback function for each stack frame. The current callback
functions call either_Unwind_GetIPInfo or _Unwind_GetIP, but that is a
detail. If there is some alternative function that can be called on
Windows, I'm happy to have libbacktrace call that when _Unwind_Backtrace
is not available. It's look like we might be able to use
RtlVirtualUnwind in a loop to do the job.
Of course, most of libbacktrace is parsing DWARF, so to be really
effective on Windows we would need to add some code to parse the Windows
More information about the llvm-dev