This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] sigsetjmp/siglongjmp on cygwin -- problem tracked down
> So, with the above buggy code, we'll eventually derefernce *catch_return[36]
> when we should be dereferencing (*catch_return)[36].
>
> I'll fix cygwin. How do we want to fix gdb?
>
> I could add a define in setjmp.h like this:
>
> #define WORKING_SETJMP 1
The BSD way of doing it was:
#include <sys/param.h>
#if BSD >= 199506
... was this from the last bsd release ever ...
#endf
While it leads to pretty obscure tests (like the above) it did make it
possible to test for anything constrained to a specific release.
It may be easier to just tweek GDB so that:
(NORETURN void) SIGLONGJMP (*catch_return, (int) reason);
is written more robustly as:
SIGLONGJMP ((*catch_return), ((int) reason));
If CYGWIN has this bug, chance has it that some other OS will as well.
Hmm, Macro's are (er never mind :-).
Andrew