* [RFC] sigsetjmp/siglongjmp on cygwin
@ 2001-08-01 14:01 Keith Seitz
[not found] ` <s3iae1jjso2.fsf@soliton.wins.uva.nl>
2001-08-10 0:27 ` Andrew Cagney
0 siblings, 2 replies; 33+ messages in thread
From: Keith Seitz @ 2001-08-01 14:01 UTC (permalink / raw)
To: gdb-patches
Hi,
I would like to discuss what to do about siglongjmp/sigsetjmp. These
functions were recently added to configure.in:
2001-07-12 Mark Kettenis <kettenis@gnu.org>
* configure.in: Add check for sigsetjmp.
To make a long story short, I spent a lot of time trying to track this
down. The crux of it is that sigsetjmp/siglongjmp _do_ exist on cygwin,
but they are not reliable. I don't know why, but they are not.
Until the above change, cygwin used setjmp/longjmp, and this patch will
force gdb to use them again.
I'm open to better ways of dealing with this.
Keith
Possible ChangeLog
2001-08-01 Keith Seitz <keiths@redhat.com>
* configure.in: Don't use sigsetjmp/siglongjmp on
cygwin, even if it is available: it doesn't work.
* configure: Regenerate.
Possible Patch
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.66
diff -u -p -r1.66 configure.in
--- configure.in 2001/07/12 13:48:45 1.66
+++ configure.in 2001/08/01 21:01:29
@@ -137,11 +137,16 @@ AC_FUNC_ALLOCA
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
+# Cygwin has sigsetjmp/siglongjmp, but it doesn't seem to work...
AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp,
[AC_TRY_COMPILE([
#include <setjmp.h>
], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
-gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)])
+[case "${host}" in
+ *cygwin*) gdb_cv_func_sigsetjmp=no ;;
+ *) gdb_cv_func_sigsetjmp=yes ;;
+esac
+], gdb_cv_func_sigsetjmp=no)])
if test $gdb_cv_func_sigsetjmp = yes; then
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
fi
^ permalink raw reply [flat|nested] 33+ messages in thread[parent not found: <s3iae1jjso2.fsf@soliton.wins.uva.nl>]
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
[not found] ` <s3iae1jjso2.fsf@soliton.wins.uva.nl>
@ 2001-08-01 16:03 ` Keith Seitz
2001-08-01 23:57 ` Eli Zaretskii
2001-08-01 16:16 ` Andrew Cagney
1 sibling, 1 reply; 33+ messages in thread
From: Keith Seitz @ 2001-08-01 16:03 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
On 2 Aug 2001, Mark Kettenis wrote:
> Keith Seitz <keiths@cygnus.com> writes:
>
> > To make a long story short, I spent a lot of time trying to track this
> > down. The crux of it is that sigsetjmp/siglongjmp _do_ exist on cygwin,
> > but they are not reliable. I don't know why, but they are not.
>
> Damn! Any chance of fixing cygwin?
I dunno, but I'm not sure we can just go around telling people to update
cygwin -- or can we?
> > I'm open to better ways of dealing with this.
>
> Can't say I like your patch.
Me either. That's why this is an RFC and not an RFA... :-)
> [...] An alternative would be to #undef
> HAVE_SIGSETJMP in the cygwin xm.h file. That isolates this bogosity
> nicely in a platform-specific file.
Hmmm.. This might be a better approach. I hate touching configure.in: it
makes everyone recompile all of gdb.
What say others?
Keith
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-01 16:03 ` Keith Seitz
@ 2001-08-01 23:57 ` Eli Zaretskii
2001-08-02 10:25 ` Andrew Cagney
0 siblings, 1 reply; 33+ messages in thread
From: Eli Zaretskii @ 2001-08-01 23:57 UTC (permalink / raw)
To: Keith Seitz; +Cc: Mark Kettenis, gdb-patches
On Wed, 1 Aug 2001, Keith Seitz wrote:
> > [...] An alternative would be to #undef
> > HAVE_SIGSETJMP in the cygwin xm.h file. That isolates this bogosity
> > nicely in a platform-specific file.
>
> Hmmm.. This might be a better approach. I hate touching configure.in: it
> makes everyone recompile all of gdb.
Or maybe #define sigsetjmp setjmp etc., again in a Cygwin-specific
header. You can even make that define be version specific, assuming
that some future version of Cygwin solves the problem.
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-01 23:57 ` Eli Zaretskii
@ 2001-08-02 10:25 ` Andrew Cagney
2001-08-02 13:15 ` Mark Kettenis
2001-08-03 1:33 ` Eli Zaretskii
0 siblings, 2 replies; 33+ messages in thread
From: Andrew Cagney @ 2001-08-02 10:25 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Keith Seitz, Mark Kettenis, gdb-patches
> On Wed, 1 Aug 2001, Keith Seitz wrote:
>
>
>> > [...] An alternative would be to #undef
>> > HAVE_SIGSETJMP in the cygwin xm.h file. That isolates this bogosity
>> > nicely in a platform-specific file.
>
>>
>> Hmmm.. This might be a better approach. I hate touching configure.in: it
>> makes everyone recompile all of gdb.
>
>
> Or maybe #define sigsetjmp setjmp etc., again in a Cygwin-specific
> header. You can even make that define be version specific, assuming
> that some future version of Cygwin solves the problem.
Again, I'm not too warm on this.
Remember, the idea is for autoconf to perform a feature based test: is
feature XYZ supported? In the case of the above, the feature question
is: does the system have a useable sigsetjmp()? Unfortunatly, the test
currently asks: does the system have anything looking like sigsetjmp(),
working or not? :-) I think Keith's original patch is the correct fix.
It refines the test so that, for cygwin, it reports back ``no
sigsetjmp()'' is not there (or is broken).
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-02 10:25 ` Andrew Cagney
@ 2001-08-02 13:15 ` Mark Kettenis
2001-08-13 14:46 ` Jim Blandy
2001-08-03 1:33 ` Eli Zaretskii
1 sibling, 1 reply; 33+ messages in thread
From: Mark Kettenis @ 2001-08-02 13:15 UTC (permalink / raw)
To: ac131313; +Cc: eliz, keiths, gdb-patches
Date: Thu, 02 Aug 2001 13:25:01 -0400
From: Andrew Cagney <ac131313@cygnus.com>
> Or maybe #define sigsetjmp setjmp etc., again in a Cygwin-specific
> header. You can even make that define be version specific, assuming
> that some future version of Cygwin solves the problem.
Again, I'm not too warm on this.
Remember, the idea is for autoconf to perform a feature based test: is
feature XYZ supported? In the case of the above, the feature question
is: does the system have a useable sigsetjmp()? Unfortunatly, the test
currently asks: does the system have anything looking like sigsetjmp(),
working or not? :-) I think Keith's original patch is the correct fix.
Not quite...
It is very un-autoconf-like to use the host-triple to decide whether
things are broken or not. If there is an easy way to check for the
broken sigsetjmp behaviour on cygwin, we really should do that instead
of relying on the host-triple. However, I don't think we can :-(.
It refines the test so that, for cygwin, it reports back ``no
sigsetjmp()'' is not there (or is broken).
Then it would be really great if configure reports back that sigsetjmp
is broken for cygwin. Keith, I think you should set
gdb_cv_func_sigsetjmp to "broken" instead of "no" for cygwin. With
that change your origional patch can go in.
Mark
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-02 13:15 ` Mark Kettenis
@ 2001-08-13 14:46 ` Jim Blandy
2001-08-13 15:12 ` Keith Seitz
0 siblings, 1 reply; 33+ messages in thread
From: Jim Blandy @ 2001-08-13 14:46 UTC (permalink / raw)
To: gdb-patches
Mark Kettenis <kettenis@wins.uva.nl> writes:
> It is very un-autoconf-like to use the host-triple to decide whether
> things are broken or not. If there is an easy way to check for the
> broken sigsetjmp behaviour on cygwin, we really should do that instead
> of relying on the host-triple. However, I don't think we can :-(.
I'd like to weigh in on Mark's side here.
I did the conversion of GNU Emacs from old-style configuration, with a
header file describing each host, to autoconf-style configuration.
The difference is pretty dramatic. Updating and fixing header files
used to be a pretty constant background activity; after switching to
autoconf, it just wasn't a big deal any more.
I would always recommend adding a "does this work?" test to
configure.in over statically associating an answer with a particular
host, whether via a per-host header file, or via a case statement
switching on the host triple. They're really not that hard to write.
Keith Seitz writes:
> I hate touching configure.in: it makes everyone recompile all of
> gdb.
My heart bleeds. :) The world can handle another coffee break.
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 14:46 ` Jim Blandy
@ 2001-08-13 15:12 ` Keith Seitz
2001-08-13 15:37 ` Andrew Cagney
0 siblings, 1 reply; 33+ messages in thread
From: Keith Seitz @ 2001-08-13 15:12 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
On 13 Aug 2001, Jim Blandy wrote:
> I would always recommend adding a "does this work?" test to
> configure.in over statically associating an answer with a particular
> host, whether via a per-host header file, or via a case statement
> switching on the host triple. They're really not that hard to write.
Would love to do this, but, unfortunately, writing a simple test to do
this is not so easy. The problem is that sigsetjmp/siglongjmp are, for
lack of a better phrase, "flakey". Ever simple testcase I come up with
works just fine, but I can get gdb to crash instantly...
:-(
Keith
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 15:12 ` Keith Seitz
@ 2001-08-13 15:37 ` Andrew Cagney
2001-08-13 15:43 ` Keith Seitz
0 siblings, 1 reply; 33+ messages in thread
From: Andrew Cagney @ 2001-08-13 15:37 UTC (permalink / raw)
To: Keith Seitz; +Cc: Jim Blandy, gdb-patches
> Would love to do this, but, unfortunately, writing a simple test to do
> this is not so easy. The problem is that sigsetjmp/siglongjmp are, for
> lack of a better phrase, "flakey". Ever simple testcase I come up with
> works just fine, but I can get gdb to crash instantly...
Yes, I think that is what every one is stumped on. Making it more
difficult, a compile time rather than a runtime test is probably needed
- otherwize it won't be possible to canadian cross GDB.
Perhaphs the real problem is GDB corrupting its stack? Can you explain
the test case or is it just ``normal use''?
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 15:37 ` Andrew Cagney
@ 2001-08-13 15:43 ` Keith Seitz
2001-08-13 15:52 ` Andrew Cagney
0 siblings, 1 reply; 33+ messages in thread
From: Keith Seitz @ 2001-08-13 15:43 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Jim Blandy, gdb-patches
On Mon, 13 Aug 2001, Andrew Cagney wrote:
> > Would love to do this, but, unfortunately, writing a simple test to do
> > this is not so easy. The problem is that sigsetjmp/siglongjmp are, for
> > lack of a better phrase, "flakey". Ever simple testcase I come up with
> > works just fine, but I can get gdb to crash instantly...
>
>
> Yes, I think that is what every one is stumped on. Making it more
> difficult, a compile time rather than a runtime test is probably needed
> - otherwize it won't be possible to canadian cross GDB.
>
> Perhaphs the real problem is GDB corrupting its stack? Can you explain
> the test case or is it just ``normal use''?
It's easy to reproduce once you have gdb built with sigsetjmp/siglongjmp.
Just boot Win98 and run gdb. Do something, ANYTHING to call
return_to_top_level. I did "info func" on gdb. When the pager was done
outputting the first page of functions, I asked it to "quit" instead of
continuing the listing. Boom! It died immediately.
Of course, the bigger problem for me is that Insight causes gdb to call
return_to_top_level all the darn time, so Insight crashes immediately. :-(
Keith
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 15:43 ` Keith Seitz
@ 2001-08-13 15:52 ` Andrew Cagney
2001-08-13 16:27 ` Keith Seitz
0 siblings, 1 reply; 33+ messages in thread
From: Andrew Cagney @ 2001-08-13 15:52 UTC (permalink / raw)
To: Keith Seitz; +Cc: Jim Blandy, gdb-patches
> Yes, I think that is what every one is stumped on. Making it more
>> difficult, a compile time rather than a runtime test is probably needed
>> - otherwize it won't be possible to canadian cross GDB.
>>
>> Perhaphs the real problem is GDB corrupting its stack? Can you explain
>> the test case or is it just ``normal use''?
>
>
> It's easy to reproduce once you have gdb built with sigsetjmp/siglongjmp.
> Just boot Win98 and run gdb. Do something, ANYTHING to call
> return_to_top_level. I did "info func" on gdb. When the pager was done
> outputting the first page of functions, I asked it to "quit" instead of
> continuing the listing. Boom! It died immediately.
What about:
(gdb) maint internal-error
/home/scratch/GDB/src/gdb/maint.c:119: gdb-internal-error: internal
maintenance
An internal GDB error was detected. This may make further
debugging unreliable. Continue this debugging session? (y or n) y
Create a core file containing the current state of GDB? (y or n) n
(gdb)
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 15:52 ` Andrew Cagney
@ 2001-08-13 16:27 ` Keith Seitz
2001-08-13 16:32 ` Christopher Faylor
2001-08-13 17:11 ` [RFC] sigsetjmp/siglongjmp on cygwin Andrew Cagney
0 siblings, 2 replies; 33+ messages in thread
From: Keith Seitz @ 2001-08-13 16:27 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Jim Blandy, gdb-patches
On Mon, 13 Aug 2001, Andrew Cagney wrote:
> What about:
>
> (gdb) maint internal-error
> /home/scratch/GDB/src/gdb/maint.c:119: gdb-internal-error: internal
> maintenance
> An internal GDB error was detected. This may make further
> debugging unreliable. Continue this debugging session? (y or n) y
>
> Create a core file containing the current state of GDB? (y or n) n
> (gdb)
(gdb) maint internal-error
/keiths/ref/src/gdb/maint.c:119: gdb-internal-error: internal maintenance
An internal GDB error was detected. This may make further
debugging unreliable. Continue this debugging session? (y or n) y
Create a core file containing the current state of gdb? (y or n) n
Program received signal SIGSEGV, Segmentation fault.
0x402acf in return_to_top_level (reason=RETURN_ERROR)
at /keiths/ref/src/gdb/top.c:347
374 (NORETURN void) SIGLONGJMP (*catch_return, (int) reason);
(top-gdb)
In a previous debugging session (using insight to reproduce this), I
verified that the contents of catch_return are exactly as sigsetjmp left
them...
Keith
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 16:27 ` Keith Seitz
@ 2001-08-13 16:32 ` Christopher Faylor
[not found] ` <20010813222037.A20589@redhat.com>
2001-08-13 17:11 ` [RFC] sigsetjmp/siglongjmp on cygwin Andrew Cagney
1 sibling, 1 reply; 33+ messages in thread
From: Christopher Faylor @ 2001-08-13 16:32 UTC (permalink / raw)
To: gdb-patches
On Mon, Aug 13, 2001 at 04:27:53PM -0700, Keith Seitz wrote:
>On Mon, 13 Aug 2001, Andrew Cagney wrote:
>
>> What about:
>>
>> (gdb) maint internal-error
>> /home/scratch/GDB/src/gdb/maint.c:119: gdb-internal-error: internal
>> maintenance
>> An internal GDB error was detected. This may make further
>> debugging unreliable. Continue this debugging session? (y or n) y
>>
>> Create a core file containing the current state of GDB? (y or n) n
>> (gdb)
>
>(gdb) maint internal-error
>/keiths/ref/src/gdb/maint.c:119: gdb-internal-error: internal maintenance
>An internal GDB error was detected. This may make further
>debugging unreliable. Continue this debugging session? (y or n) y
>
>Create a core file containing the current state of gdb? (y or n) n
>
>Program received signal SIGSEGV, Segmentation fault.
>0x402acf in return_to_top_level (reason=RETURN_ERROR)
> at /keiths/ref/src/gdb/top.c:347
>374 (NORETURN void) SIGLONGJMP (*catch_return, (int) reason);
>(top-gdb)
>
>In a previous debugging session (using insight to reproduce this), I
>verified that the contents of catch_return are exactly as sigsetjmp left
>them...
On inspection of cygwin's code, I don't understand how this could be a cygwin
bug. I've been meaning to investigate this.
I'll do it right now.
In the meantime, I think that configury changes are premature.
cgf
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 16:27 ` Keith Seitz
2001-08-13 16:32 ` Christopher Faylor
@ 2001-08-13 17:11 ` Andrew Cagney
2001-08-13 17:23 ` Keith Seitz
1 sibling, 1 reply; 33+ messages in thread
From: Andrew Cagney @ 2001-08-13 17:11 UTC (permalink / raw)
To: Keith Seitz, Christopher Faylor; +Cc: gdb-patches
> Program received signal SIGSEGV, Segmentation fault.
> 0x402acf in return_to_top_level (reason=RETURN_ERROR)
> at /keiths/ref/src/gdb/top.c:347
> 374 (NORETURN void) SIGLONGJMP (*catch_return, (int) reason);
> (top-gdb)
>
> In a previous debugging session (using insight to reproduce this), I
> verified that the contents of catch_return are exactly as sigsetjmp left
> them...
So hopefully you're seeing:
PASS: gdb.base/maint.exp: maint internal-error
fail. If not, I've got a testsuite bug.
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 17:11 ` [RFC] sigsetjmp/siglongjmp on cygwin Andrew Cagney
@ 2001-08-13 17:23 ` Keith Seitz
0 siblings, 0 replies; 33+ messages in thread
From: Keith Seitz @ 2001-08-13 17:23 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Christopher Faylor, gdb-patches
On Mon, 13 Aug 2001, Andrew Cagney wrote:
> So hopefully you're seeing:
>
> PASS: gdb.base/maint.exp: maint internal-error
Yeah, we see that and a few others, too, of course. Doesn't something like
"maint print psymbols" call error ()? We crash there. All the rest of the
tests in this file timeout.
Either we've got a mem corruption or sigsetjmp/siglongjmp don't work
reliably on cygwin (on Win98).
Keith
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-02 10:25 ` Andrew Cagney
2001-08-02 13:15 ` Mark Kettenis
@ 2001-08-03 1:33 ` Eli Zaretskii
2001-08-10 0:16 ` Andrew Cagney
1 sibling, 1 reply; 33+ messages in thread
From: Eli Zaretskii @ 2001-08-03 1:33 UTC (permalink / raw)
To: ac131313; +Cc: keiths, kettenis, gdb-patches
> Date: Thu, 02 Aug 2001 13:25:01 -0400
> From: Andrew Cagney <ac131313@cygnus.com>
>
> Remember, the idea is for autoconf to perform a feature based test: is
> feature XYZ supported? In the case of the above, the feature question
> is: does the system have a useable sigsetjmp()? Unfortunatly, the test
> currently asks: does the system have anything looking like sigsetjmp(),
> working or not? :-) I think Keith's original patch is the correct fix.
> It refines the test so that, for cygwin, it reports back ``no
> sigsetjmp()'' is not there (or is broken).
Intentionally failing an Autoconf test is not my idea of using
Autoconf correctly ;-) If all Cygwin wants is to fail that test
unconditionally, they could simply supply a config.site file which
sets the appropriate Autoconf variable (ac_cv_func_sigsetjmp, IIRC),
and not bother the GDB distribution at all. After all, the same bug
will bite Cygwin in any other package, right?
Moreover, this problem will most probably be fixed in some future
version of Cygwin, at which point someone will have to make that test
know about specific Cygwin versions etc. IMHO, if we must have such
an ugliness, it should go into a system-specific header.
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-03 1:33 ` Eli Zaretskii
@ 2001-08-10 0:16 ` Andrew Cagney
0 siblings, 0 replies; 33+ messages in thread
From: Andrew Cagney @ 2001-08-10 0:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: keiths, kettenis, gdb-patches
>
> Intentionally failing an Autoconf test is not my idea of using
> Autoconf correctly [;-)] If all Cygwin wants is to fail that test
> unconditionally, they could simply supply a config.site file which
> sets the appropriate Autoconf variable (ac_cv_func_sigsetjmp, IIRC),
> and not bother the GDB distribution at all. After all, the same bug
> will bite Cygwin in any other package, right?
>
> Moreover, this problem will most probably be fixed in some future
> version of Cygwin, at which point someone will have to make that test
> know about specific Cygwin versions etc. IMHO, if we must have such
> an ugliness, it should go into a system-specific header.
Ah, you're trying to hide the ugliness (xm-*.h) while I'm trying to
localize it (a single configure.in sigsetjmp test that contains all the
details).
I'm going to consult an expert on this one.
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
[not found] ` <s3iae1jjso2.fsf@soliton.wins.uva.nl>
2001-08-01 16:03 ` Keith Seitz
@ 2001-08-01 16:16 ` Andrew Cagney
2001-08-02 13:51 ` Christopher Faylor
1 sibling, 1 reply; 33+ messages in thread
From: Andrew Cagney @ 2001-08-01 16:16 UTC (permalink / raw)
To: Mark Kettenis; +Cc: Keith Seitz, gdb-patches
> Can't say I like your patch. An alternative would be to #undef
> HAVE_SIGSETJMP in the cygwin xm.h file. That isolates this bogosity
> nicely in a platform-specific file. Perhaps some other folks have an
> opinion on this. If you don't hear anything, feel free to choose a
> hack.
I'm not so warm on the idea of putting something in an xm.h file. I
think the *SETJMP test, hacks, warts, and all should be localized.
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-01 16:16 ` Andrew Cagney
@ 2001-08-02 13:51 ` Christopher Faylor
0 siblings, 0 replies; 33+ messages in thread
From: Christopher Faylor @ 2001-08-02 13:51 UTC (permalink / raw)
To: gdb-patches
On Wed, Aug 01, 2001 at 07:16:43PM -0400, Andrew Cagney wrote:
>
>> Can't say I like your patch. An alternative would be to #undef
>> HAVE_SIGSETJMP in the cygwin xm.h file. That isolates this bogosity
>> nicely in a platform-specific file. Perhaps some other folks have an
>> opinion on this. If you don't hear anything, feel free to choose a
>> hack.
>
>
>I'm not so warm on the idea of putting something in an xm.h file. I
>think the *SETJMP test, hacks, warts, and all should be localized.
How can we test for sigsetjmp working or not working in a cross-build
environment, though.
I have changed opinions on whether sigsetjmp should work in cygwin about
five times today. After spending some time looking at the code, I have
to confess that it seems like it should work ok to me. That's my
current opinion, anyway.
I'd like to understand the kind of problems that Keith is seeing. Maybe
there is something that can be done to the sigsetjmp/siglongjmp macros
to fix this problem in gdb so that we don't have to say "upgrade cygwin".
I'm very interested in fixing cygwin, though, of course.
cgf
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-01 14:01 [RFC] sigsetjmp/siglongjmp on cygwin Keith Seitz
[not found] ` <s3iae1jjso2.fsf@soliton.wins.uva.nl>
@ 2001-08-10 0:27 ` Andrew Cagney
2001-08-12 15:49 ` Ben Elliston
1 sibling, 1 reply; 33+ messages in thread
From: Andrew Cagney @ 2001-08-10 0:27 UTC (permalink / raw)
To: bje; +Cc: Keith Seitz, Eli Zaretskii, Mark Kettenis, gdb-patches
Ben,
Since you know a thing or two about autoconf
( http://sources.redhat.com/autobook/ ;-) would you mind giving an
opinion on the below.
The full thread is at:
http://sources.redhat.com/ml/gdb-patches/2001-08/msg00012.html
Andrew
> Hi,
>
> I would like to discuss what to do about siglongjmp/sigsetjmp. These
> functions were recently added to configure.in:
>
> 2001-07-12 Mark Kettenis <kettenis@gnu.org>
>
> * configure.in: Add check for sigsetjmp.
>
> To make a long story short, I spent a lot of time trying to track this
> down. The crux of it is that sigsetjmp/siglongjmp _do_ exist on cygwin,
> but they are not reliable. I don't know why, but they are not.
>
> Until the above change, cygwin used setjmp/longjmp, and this patch will
> force gdb to use them again.
>
> I'm open to better ways of dealing with this.
> Keith
>
> Possible ChangeLog
> 2001-08-01 Keith Seitz <keiths@redhat.com>
>
> * configure.in: Don't use sigsetjmp/siglongjmp on
> cygwin, even if it is available: it doesn't work.
> * configure: Regenerate.
>
> Possible Patch
> Index: configure.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/configure.in,v
> retrieving revision 1.66
> diff -u -p -r1.66 configure.in
> --- configure.in 2001/07/12 13:48:45 1.66
> +++ configure.in 2001/08/01 21:01:29
> @@ -137,11 +137,16 @@ AC_FUNC_ALLOCA
>
> # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
> # since sigsetjmp might only be defined as a macro.
> +# Cygwin has sigsetjmp/siglongjmp, but it doesn't seem to work...
> AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp,
> [AC_TRY_COMPILE([
> #include <setjmp.h>
> ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
> -gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)])
> +[case "${host}" in
> + *cygwin*) gdb_cv_func_sigsetjmp=no ;;
> + *) gdb_cv_func_sigsetjmp=yes ;;
> +esac
> +], gdb_cv_func_sigsetjmp=no)])
> if test $gdb_cv_func_sigsetjmp = yes; then
> AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
> fi
>
>
>
>
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-10 0:27 ` Andrew Cagney
@ 2001-08-12 15:49 ` Ben Elliston
2001-08-13 2:03 ` Eli Zaretskii
0 siblings, 1 reply; 33+ messages in thread
From: Ben Elliston @ 2001-08-12 15:49 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Keith Seitz, Eli Zaretskii, Mark Kettenis, gdb-patches
>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
Andrew> Since you know a thing or two about autoconf
Andrew> ( http://sources.redhat.com/autobook/ ;-) would you mind giving an
Andrew> opinion on the below.
Andrew> The full thread is at:
Andrew> http://sources.redhat.com/ml/gdb-patches/2001-08/msg00012.html
I can see the arguments from both sides -- localise the warts to
configure.in or push them out into the platform-specific file.
One must keep in mind the traditional approach used by Autoconf for
situations like this: write a test that *detects* whether
sig{set,long}jmp are broken.
The current proposals suffer the problem that GDB and Cygwin versions
will have to follow in lock-step because GDB's configury will assume
that sig{set,long}jmp is either present or absent for Cygwin hosts.
This will not be true once (if?) Cygwin is fixed and there are two
"strains" :-) out there -- those that are fixed and those that are
not.
Ben
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-12 15:49 ` Ben Elliston
@ 2001-08-13 2:03 ` Eli Zaretskii
2001-08-13 15:42 ` Andrew Cagney
0 siblings, 1 reply; 33+ messages in thread
From: Eli Zaretskii @ 2001-08-13 2:03 UTC (permalink / raw)
To: bje; +Cc: ac131313, keiths, kettenis, gdb-patches
> From: Ben Elliston <bje@redhat.com>
> Date: Mon, 13 Aug 2001 08:47:41 +1000 (EST)
>
> The current proposals suffer the problem that GDB and Cygwin versions
> will have to follow in lock-step because GDB's configury will assume
> that sig{set,long}jmp is either present or absent for Cygwin hosts.
> This will not be true once (if?) Cygwin is fixed and there are two
> "strains" :-) out there -- those that are fixed and those that are
> not.
I suggested to put the work-around into config.site, precisely to
solve this. Assuming such a config.site is made part of the core
Cygwin distribution, whenever sigsetjmp starts working, config.site
should be updated. So a user which upgrades to a newer version of
Cygwin has this issue magically taken care of during the upgrade.
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [RFC] sigsetjmp/siglongjmp on cygwin
2001-08-13 2:03 ` Eli Zaretskii
@ 2001-08-13 15:42 ` Andrew Cagney
0 siblings, 0 replies; 33+ messages in thread
From: Andrew Cagney @ 2001-08-13 15:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: bje, keiths, kettenis, gdb-patches
>
> I suggested to put the work-around into config.site, precisely to
> solve this. Assuming such a config.site is made part of the core
> Cygwin distribution, whenever sigsetjmp starts working, config.site
> should be updated. So a user which upgrades to a newer version of
> Cygwin has this issue magically taken care of during the upgrade.
Eli, can you expand a little. I'm not sure what would happen if a
current GDB was configured/built on an old cygwin which didn't have the
config.site file.
Andrew
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2001-08-14 23:52 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-01 14:01 [RFC] sigsetjmp/siglongjmp on cygwin Keith Seitz
[not found] ` <s3iae1jjso2.fsf@soliton.wins.uva.nl>
2001-08-01 16:03 ` Keith Seitz
2001-08-01 23:57 ` Eli Zaretskii
2001-08-02 10:25 ` Andrew Cagney
2001-08-02 13:15 ` Mark Kettenis
2001-08-13 14:46 ` Jim Blandy
2001-08-13 15:12 ` Keith Seitz
2001-08-13 15:37 ` Andrew Cagney
2001-08-13 15:43 ` Keith Seitz
2001-08-13 15:52 ` Andrew Cagney
2001-08-13 16:27 ` Keith Seitz
2001-08-13 16:32 ` Christopher Faylor
[not found] ` <20010813222037.A20589@redhat.com>
2001-08-13 19:40 ` [RFC] sigsetjmp/siglongjmp on cygwin -- problem tracked down Andrew Cagney
2001-08-13 19:55 ` Christopher Faylor
2001-08-13 20:10 ` Daniel Jacobowitz
2001-08-13 20:18 ` [RFA] work around sigsetjmp/siglongjmp macro problems Christopher Faylor
2001-08-14 0:06 ` Eli Zaretskii
2001-08-14 7:40 ` Christopher Faylor
2001-08-14 9:34 ` Keith Seitz
2001-08-14 13:01 ` Elena Zannoni
2001-08-14 13:08 ` Christopher Faylor
2001-08-14 23:52 ` Eli Zaretskii
2001-08-14 23:49 ` Eli Zaretskii
2001-08-13 17:11 ` [RFC] sigsetjmp/siglongjmp on cygwin Andrew Cagney
2001-08-13 17:23 ` Keith Seitz
2001-08-03 1:33 ` Eli Zaretskii
2001-08-10 0:16 ` Andrew Cagney
2001-08-01 16:16 ` Andrew Cagney
2001-08-02 13:51 ` Christopher Faylor
2001-08-10 0:27 ` Andrew Cagney
2001-08-12 15:49 ` Ben Elliston
2001-08-13 2:03 ` Eli Zaretskii
2001-08-13 15:42 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox