On 08/12/17 07:21 AM, Vincent Torri wrote: > Hello > > i am planning to work a bit on porting libunwind on Windows. Note that > i don't know the internal of libunwind so my questions in that thread > could be naive.
Are you planning on writing full SEH support? For reference, libgcc's unwind support for windows is here: https://github.com/gcc-mirror/gcc/blob/master/libgcc/unwind-seh.c vs. the equivalent dwarf that libunwind currently supports: https://github.com/gcc-mirror/gcc/blob/master/libgcc/unwind-dw2-fde.c > Running make, the first error is the ucontext.h header file which is > not found. Normal. > > After some grep, it appears that you call only getcontext() function. > On Windows, the equivalent of ucontext_t type is the CONTEXT type and > getcontext() equivalent is GetThreadContext() on the current thread. As far as I know, we only use the ucontext_t, so that we can be comatible with the system getcontext() and setcontext(), the system versions aren't actually called, and most platforms implement their own, see the getcontext.S, etc. > I can add a typedef for unw_tdep_context_t in libunwind-x86_64.h and > port getcontext() somewhere to change at least as possible the current > code. > > question: In which file should I put this getcontext() port ? Os-specific stuff goes in src/os-windows.c or arch & os specific in src/arch/Gos-windows.c (either of which you'd have to create). Good luck! _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
