Building libsigsegv on Cygwin64
Mon Mar 3 15:02:00 GMT 2014
On Mar 2 12:20, Ken Brown wrote:
> On 2/21/2014 10:32 AM, Angelo Graziosi wrote:
> >Trying to build libsigsegv-2.10 on Cygwin64 (using the src tarball and
> >its .cygport file from x86 distribution), fails as follows
> >libtool: compile: gcc -DHAVE_CONFIG_H -I.
> >-I/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src -I.. -I.
> >-I/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src -ggdb -O2 -pipe
> >-c /works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler.c
> >-DDLL_EXPORT -DPIC -o .libs/handler.o
> >In file included from
> >/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler-win32.c: In
> >function 'main_exception_filter':
> >error: 'struct _CONTEXT' has no member named 'Esp'
> > ExceptionInfo->ContextRecord->Esp = new_safe_esp;
> > ^
> >error: 'struct _CONTEXT' has no member named 'Eip'
> > ExceptionInfo->ContextRecord->Eip = (unsigned
> > ^
> >Makefile:399: set di istruzioni per l'obiettivo "handler.lo" non riuscito
> >make: *** [handler.lo] Errore 1
> >make: uscita dalla directory "/works/tmp/libsigsegv-2.10-1/build/src"
> >Makefile:344: set di istruzioni per l'obiettivo "install-recursive" non
> >make: *** [install-recursive] Errore 1
> >Since my Cygwin64 is a fesh installation, I wonder if I missed to
> >installe some needed packages... or is that error to be expected on
> I found the problem (or at least I found *a* problem): There's a
> configure test "checking whether a fault handler according to POSIX
> works", which passes on 32-bit Cygwin but fails on 64-bit Cygwin.
> I'm attaching a file containing the configure test. Here's what
> happens in the 64-bit case:
> $ gcc -o fault fault.c
> $ ./fault.exe
> $ echo $?
> In the 32-bit case, the exit code is 0.
> I don't know if this indicates a Cygwin bug or something wrong with
> the test.
It indicates a Cygwin bug. Thanks for the report and the testcase.
The joke here is, the signal handler function gets called twice for the
same exception. Proof is that you can remove the second call to crasher
and still sigsegv_handler gets called twice.
I see why this happens, but I'm not quite sure yet how to fix it
completely. I can easily fix this for the normal case as well as for
the case a process gets started by the debugger. But I have trouble as
soon as a debugger gets attached to a process after the process already
Does anybody know if there's a way for a process to be getting notified
if a debugger attaches to or detaches from it?
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin