gcc4: throwing exception from signal handler

2010-07-08 Thread Don Ward
I would like to be able to catch certain signals (SIGSEGV and SIGSYS) and throw a C++ exception (to be caught in a try/catch construct). As a simple example: #include #include #include #include void throw_signal( int signum ) { // fprintf(stderr,"throw_signal: before throw; signum=%d\n",

Re: gcc4: throwing exception from signal handler

2010-07-08 Thread Václav Haisman
On Thu, 8 Jul 2010 09:01:41 -0400, "Don Ward" wrote: > I would like to be able to catch certain signals (SIGSEGV and SIGSYS) and > throw a C++ exception (to be caught in a try/catch construct). As a > simple > example: >[...] > Am I misunderstanding how this should work or doing something wron

Re: gcc4: throwing exception from signal handler

2010-07-08 Thread Don Ward
Václav Haismam wrote: On Thu, 8 Jul 2010 09:01:41 -0400, "Don Ward" wrote: I would like to be able to catch certain signals (SIGSEGV and SIGSYS) and throw a C++ exception (to be caught in a try/catch construct). As a simple example: [...] Am I misunderstanding how this should work or doing s

Re: gcc4: throwing exception from signal handler

2010-07-08 Thread Dave Korn
On 08/07/2010 14:01, Don Ward wrote: > I would like to be able to catch certain signals (SIGSEGV and SIGSYS) > and throw a C++ exception (to be caught in a try/catch construct). As a > simple example: > Am I misunderstanding how this should work or doing something wrong? Or > is this a problem w

Re: gcc4: throwing exception from signal handler

2010-07-08 Thread Don Ward
Dave Korn wrote: On 08/07/2010 14:01, Don Ward wrote: I would like to be able to catch certain signals (SIGSEGV and SIGSYS) and throw a C++ exception (to be caught in a try/catch construct). As a simple example: Am I misunderstanding how this should work or doing something wrong? Or is thi

Re: gcc4: throwing exception from signal handler

2010-07-08 Thread Dave Korn
On 08/07/2010 18:02, Don Ward wrote: > I'm glad someone is (or will be) working on it. In the meanwhile, I can > make do with gcc 3.4.4. Yep, 3.4.4 uses old-style SJLJ exception handling, which can jump past anything without needing to understand it; you'll be good there, although it's not as

Re: gcc4: throwing exception from signal handler

2010-07-08 Thread Charles Wilson
On 7/8/2010 11:48 AM, Dave Korn wrote: I'll be back in the Cygwin/GCC world starting next week. YAY! We missed you, Dave. Welcome back! -- Chuck -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com

Re: gcc4: throwing exception from signal handler

2010-07-09 Thread Christopher Faylor
On Thu, Jul 08, 2010 at 01:02:28PM -0400, Don Ward wrote: >Dave Korn wrote: > >> On 08/07/2010 14:01, Don Ward wrote: >>> I would like to be able to catch certain signals (SIGSEGV and SIGSYS) >>> and throw a C++ exception (to be caught in a try/catch construct). As a >>> simple example: >> >>> Am

Re: gcc4: throwing exception from signal handler

2010-07-15 Thread Dave Korn
On 09/07/2010 17:51, Christopher Faylor wrote: > Someone may be looking into this but if this is adding complication to the > signal handler it is going to take some real convincing that it should go > into the DLL. :) Fortunately, it doesn't have to do that. All the magic takes place in libgc

Re: gcc4: throwing exception from signal handler

2010-07-15 Thread Charles Wilson
On 7/15/2010 11:42 AM, Dave Korn wrote: I guess the first thing I should do is get out a more vanilla-flavoured 4.5.0 release.) Err... 4.5.1? Does the ABI breakage between 4.5.0 and 4.5.1/4.6.0 mentioned wrt x86_64-mingw affect i386, or cygwin? -- Chuck -- Problem reports: http://cy