public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Exceptions on Openserver, Egcs 1.1.2-pre2
@ 1999-02-27  9:14 Dag Nygren
       [not found] ` < 199902271849.aa05534@dag.newtech.fi >
  1999-02-28 22:53 ` Dag Nygren
  0 siblings, 2 replies; 18+ messages in thread
From: Dag Nygren @ 1999-02-27  9:14 UTC (permalink / raw)
  To: egcs; +Cc: dag

Short question:

Are C++ exceptions supposed to work on SCO Openserver 5.0.5
when compiled with Egcs 1.1.2-pre2 ?

BRGDS

Dag

-- 
Dag Nygren                               email: dag@newtech.fi
Oy NewTech Ab                            phone: +358 9 8024910
Trasktorpet 3                              fax: +358 9 8024916
02360 ESBO                                 NMT: 0400-426312
FINLAND


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
       [not found] ` < 199902271849.aa05534@dag.newtech.fi >
@ 1999-02-27 20:33   ` Robert Lipe
       [not found]     ` < 19990227223327.I15017@rjlhome.sco.com >
  1999-02-28 22:53     ` Robert Lipe
  0 siblings, 2 replies; 18+ messages in thread
From: Robert Lipe @ 1999-02-27 20:33 UTC (permalink / raw)
  To: Dag Nygren; +Cc: egcs

Dag Nygren wrote:

> Are C++ exceptions supposed to work on SCO Openserver 5.0.5
> when compiled with Egcs 1.1.2-pre2 ?

I haven't looked at pre2 yet, but I'd be really suprised if they
wree broken in anything resembling the general case.

The testsuite for EH on OSR5 says they work as well as they do on other
targets.  (At least it did as of pre1 as well as for the preceeding many
months.) If you know of cases where they don't, please submit a full
test case.  If you're testing the waters, I say "go for it".

The only thing I can think of that's sleazy on OpenServer regarding
exceptions is that sjlj-exceptions are the default for COFF and dwarf2
range decoding is the default for ELF.  The tools go to some effort
to insure that you don't mix COFF and ELF willy-nilly but nothing can
prevent a user from doing it.  If it linked at all, I wouldn't expect EH
to work in that case.

RJL

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
       [not found]     ` < 19990227223327.I15017@rjlhome.sco.com >
@ 1999-02-28  3:45       ` Dag Nygren
       [not found]         ` < 199902281332.aa27340@dag.newtech.fi >
  1999-02-28 22:53         ` Dag Nygren
  0 siblings, 2 replies; 18+ messages in thread
From: Dag Nygren @ 1999-02-28  3:45 UTC (permalink / raw)
  To: Robert Lipe; +Cc: Dag Nygren, egcs

> Dag Nygren wrote:
> 
> > Are C++ exceptions supposed to work on SCO Openserver 5.0.5
> > when compiled with Egcs 1.1.2-pre2 ?
> 
> I haven't looked at pre2 yet, but I'd be really suprised if they
> wree broken in anything resembling the general case.
> 
> The testsuite for EH on OSR5 says they work as well as they do on other
> targets.  (At least it did as of pre1 as well as for the preceeding many
> months.) If you know of cases where they don't, please submit a full
> test case.  If you're testing the waters, I say "go for it".

OK,

thanks. I am trying to compile the koffice suite here and has
ran into a lot of problems, as you can probably see from my postings
lately.
This question comes from the fact that I need the MICO library and
configure there gives me complaints about exceptions not working
with shared libraries....

As it seems like they should work I will now investigate a bit
further what is happening.

> 
> The only thing I can think of that's sleazy on OpenServer regarding
> exceptions is that sjlj-exceptions are the default for COFF and dwarf2
> range decoding is the default for ELF.  The tools go to some effort
> to insure that you don't mix COFF and ELF willy-nilly but nothing can
> prevent a user from doing it.  If it linked at all, I wouldn't expect EH
> to work in that case.

Good to know.

BTW. Is there a gdb available for egcs compiled code? 4.17 complains
with: warning: internal error: no C/C++ fundamental type 1
and is having problems showing the correct line of code
after a breakpoint. I also tried the latest snapshot from cygnus.
This seems to work better, but doesn't seem to understand breakpoints at 
all....
Sets them but never breaks.

Dag

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
       [not found]         ` < 199902281332.aa27340@dag.newtech.fi >
@ 1999-02-28 12:33           ` Robert Lipe
  1999-02-28 22:53             ` Robert Lipe
                               ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Robert Lipe @ 1999-02-28 12:33 UTC (permalink / raw)
  To: Dag Nygren; +Cc: egcs

> I need the MICO library and configure there gives me complaints about
> exceptions not working with shared libraries....

You'll just have to debug it.  Product a minimal test case (and
'minimal' means a tiny self-contained bag of bytes that shows what MICO
things is wrong, not an ftp site for it :-) and let us see what's going
on.

> BTW. Is there a gdb available for egcs compiled code? 4.17 complains
> with: warning: internal error: no C/C++ fundamental type 1 and is
> having problems showing the correct line of code after a breakpoint. I

That's probably better asked on the GDB lists (to which I do not
subscribe) The problem does sound familiar, but I don't know why, when,
or if it went away.

GDB used to pass the testsuite on OpenServer for both COFF and ELF.
(This would have probably been around 4.15 era along with the patches I
originally submitted to active OSR5 support.)  I think it suffers from
periodic bitrot becuase that OS isn't well represented on the lists.

RJL

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-02-27 20:33   ` Robert Lipe
       [not found]     ` < 19990227223327.I15017@rjlhome.sco.com >
@ 1999-02-28 22:53     ` Robert Lipe
  1 sibling, 0 replies; 18+ messages in thread
From: Robert Lipe @ 1999-02-28 22:53 UTC (permalink / raw)
  To: Dag Nygren; +Cc: egcs

Dag Nygren wrote:

> Are C++ exceptions supposed to work on SCO Openserver 5.0.5
> when compiled with Egcs 1.1.2-pre2 ?

I haven't looked at pre2 yet, but I'd be really suprised if they
wree broken in anything resembling the general case.

The testsuite for EH on OSR5 says they work as well as they do on other
targets.  (At least it did as of pre1 as well as for the preceeding many
months.) If you know of cases where they don't, please submit a full
test case.  If you're testing the waters, I say "go for it".

The only thing I can think of that's sleazy on OpenServer regarding
exceptions is that sjlj-exceptions are the default for COFF and dwarf2
range decoding is the default for ELF.  The tools go to some effort
to insure that you don't mix COFF and ELF willy-nilly but nothing can
prevent a user from doing it.  If it linked at all, I wouldn't expect EH
to work in that case.

RJL

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-02-28  3:45       ` Dag Nygren
       [not found]         ` < 199902281332.aa27340@dag.newtech.fi >
@ 1999-02-28 22:53         ` Dag Nygren
  1 sibling, 0 replies; 18+ messages in thread
From: Dag Nygren @ 1999-02-28 22:53 UTC (permalink / raw)
  To: Robert Lipe; +Cc: Dag Nygren, egcs

> Dag Nygren wrote:
> 
> > Are C++ exceptions supposed to work on SCO Openserver 5.0.5
> > when compiled with Egcs 1.1.2-pre2 ?
> 
> I haven't looked at pre2 yet, but I'd be really suprised if they
> wree broken in anything resembling the general case.
> 
> The testsuite for EH on OSR5 says they work as well as they do on other
> targets.  (At least it did as of pre1 as well as for the preceeding many
> months.) If you know of cases where they don't, please submit a full
> test case.  If you're testing the waters, I say "go for it".

OK,

thanks. I am trying to compile the koffice suite here and has
ran into a lot of problems, as you can probably see from my postings
lately.
This question comes from the fact that I need the MICO library and
configure there gives me complaints about exceptions not working
with shared libraries....

As it seems like they should work I will now investigate a bit
further what is happening.

> 
> The only thing I can think of that's sleazy on OpenServer regarding
> exceptions is that sjlj-exceptions are the default for COFF and dwarf2
> range decoding is the default for ELF.  The tools go to some effort
> to insure that you don't mix COFF and ELF willy-nilly but nothing can
> prevent a user from doing it.  If it linked at all, I wouldn't expect EH
> to work in that case.

Good to know.

BTW. Is there a gdb available for egcs compiled code? 4.17 complains
with: warning: internal error: no C/C++ fundamental type 1
and is having problems showing the correct line of code
after a breakpoint. I also tried the latest snapshot from cygnus.
This seems to work better, but doesn't seem to understand breakpoints at 
all....
Sets them but never breaks.

Dag


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-02-28 12:33           ` Robert Lipe
@ 1999-02-28 22:53             ` Robert Lipe
  1999-03-01  2:45             ` Dag Nygren
  1999-03-02  8:25             ` J. Kean Johnston
  2 siblings, 0 replies; 18+ messages in thread
From: Robert Lipe @ 1999-02-28 22:53 UTC (permalink / raw)
  To: Dag Nygren; +Cc: egcs

> I need the MICO library and configure there gives me complaints about
> exceptions not working with shared libraries....

You'll just have to debug it.  Product a minimal test case (and
'minimal' means a tiny self-contained bag of bytes that shows what MICO
things is wrong, not an ftp site for it :-) and let us see what's going
on.

> BTW. Is there a gdb available for egcs compiled code? 4.17 complains
> with: warning: internal error: no C/C++ fundamental type 1 and is
> having problems showing the correct line of code after a breakpoint. I

That's probably better asked on the GDB lists (to which I do not
subscribe) The problem does sound familiar, but I don't know why, when,
or if it went away.

GDB used to pass the testsuite on OpenServer for both COFF and ELF.
(This would have probably been around 4.15 era along with the patches I
originally submitted to active OSR5 support.)  I think it suffers from
periodic bitrot becuase that OS isn't well represented on the lists.

RJL

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-02-27  9:14 Exceptions on Openserver, Egcs 1.1.2-pre2 Dag Nygren
       [not found] ` < 199902271849.aa05534@dag.newtech.fi >
@ 1999-02-28 22:53 ` Dag Nygren
  1 sibling, 0 replies; 18+ messages in thread
From: Dag Nygren @ 1999-02-28 22:53 UTC (permalink / raw)
  To: egcs; +Cc: dag

Short question:

Are C++ exceptions supposed to work on SCO Openserver 5.0.5
when compiled with Egcs 1.1.2-pre2 ?

BRGDS

Dag

-- 
Dag Nygren                               email: dag@newtech.fi
Oy NewTech Ab                            phone: +358 9 8024910
Trasktorpet 3                              fax: +358 9 8024916
02360 ESBO                                 NMT: 0400-426312
FINLAND



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-02-28 12:33           ` Robert Lipe
  1999-02-28 22:53             ` Robert Lipe
@ 1999-03-01  2:45             ` Dag Nygren
       [not found]               ` < 199903011228.aa09607@dag.newtech.fi >
  1999-03-31 23:46               ` Dag Nygren
  1999-03-02  8:25             ` J. Kean Johnston
  2 siblings, 2 replies; 18+ messages in thread
From: Dag Nygren @ 1999-03-01  2:45 UTC (permalink / raw)
  To: Robert Lipe; +Cc: Dag Nygren, egcs

> > I need the MICO library and configure there gives me complaints about
> > exceptions not working with shared libraries....
> 
> You'll just have to debug it.  Product a minimal test case (and
> 'minimal' means a tiny self-contained bag of bytes that shows what MICO
> things is wrong, not an ftp site for it :-) and let us see what's going
> on.

OK, here we go. What is so wrong with this? (I am just learning C++,
but have some 15 years of C experience, so it is a real question, not
meant to provoke anyone.)

OS: Openserver 5.0.5 with /usr/ccs/bin/lef/ld "downgraded" to the original
  5.0.5, the rest is rs505a upgraded
Compiler: EGCS 1.1.2-prerelease2 (2.91.62), with A.Montes' patch to make global
  constructors work with shared libraries

Here are the files simplified from the MICO configure script :

===== lib.C =====
#include <iostream.h>

struct Global {
        Global () { cout << "Constructing Global\n"; }
};

Global gbl;

#ifdef HAVE_EXCEPTIONS
class Ex {};
void bar ()
{
        cout << "in bar\n";
        throw Ex();
}
#endif

===== exception.C ======
extern "C" void exit(int);

class Ex {};
extern void bar ();
int main ()
{
  try {
    bar();
  } catch (Ex &e) {
    return 0;
  } catch (...) {
    return 1;
  }
  return 1;
}

And here is the script I used to compile them:

g++ -g -DHAVE_EXCEPTIONS -fPIC -c lib.C
g++ -g -shared -o libshex.so lib.o
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
g++ -g -o exception -L. -lshex exception.C

And here is my output:

dag:Ctest <ena> 744 % ./exception 
Constructing Global
in bar
Abort

BRGDS

Dag

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
       [not found]               ` < 199903011228.aa09607@dag.newtech.fi >
@ 1999-03-01  3:46                 ` Dag Nygren
  1999-03-31 23:46                   ` Dag Nygren
  1999-03-04 10:06                 ` Robert Lipe
  1 sibling, 1 reply; 18+ messages in thread
From: Dag Nygren @ 1999-03-01  3:46 UTC (permalink / raw)
  To: Dag Nygren; +Cc: Robert Lipe, egcs

A bit more info on my prevoius post:

If I put everything into one file and don't try to link this
as a shared lib it seems to work as expected!

So still one more case of shlibs not working on Openserver....

BRGDS

Dag

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-02-28 12:33           ` Robert Lipe
  1999-02-28 22:53             ` Robert Lipe
  1999-03-01  2:45             ` Dag Nygren
@ 1999-03-02  8:25             ` J. Kean Johnston
  1999-03-31 23:46               ` J. Kean Johnston
  2 siblings, 1 reply; 18+ messages in thread
From: J. Kean Johnston @ 1999-03-02  8:25 UTC (permalink / raw)
  To: Robert Lipe, Dag Nygren; +Cc: egcs

On Sun, Feb 28, 1999 at 02:32:42PM -0600, Robert Lipe wrote:
> GDB used to pass the testsuite on OpenServer for both COFF and ELF.
> (This would have probably been around 4.15 era along with the patches I
> originally submitted to active OSR5 support.)  I think it suffers from
> periodic bitrot becuase that OS isn't well represented on the lists.
4.18 is coming up for release and I am trying to make sure it does the
Right Thing on both OpenServer and UW7. I have just finished adding
hardware watchpoints and breakpoints for UW7, so there is SOME movement :-)

-- 
J. Kean Johnston  |"A man with courage on the outside dares to die;
Engineer, SPG     | A man with courage on the inside dares to live" - Lao Tzu
Santa Cruz, CA    +----------------------------------------------------------
Tel: 831-427-7569    Fax: 831-429-1887    E-mail: jkj@sco.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
       [not found]               ` < 199903011228.aa09607@dag.newtech.fi >
  1999-03-01  3:46                 ` Dag Nygren
@ 1999-03-04 10:06                 ` Robert Lipe
  1999-03-31 23:46                   ` Robert Lipe
  1 sibling, 1 reply; 18+ messages in thread
From: Robert Lipe @ 1999-03-04 10:06 UTC (permalink / raw)
  To: Dag Nygren; +Cc: egcs

This example doesn't seem to work under Linux with the latest snapshots,
either.

(gdb) run
Starting program: /home/robertl/tmp/dag/./exception 
Constructing Global

Program received signal SIGSEGV, Segmentation fault.
0x40078836 in _IO_unbuffer_write () at genops.c:734
genops.c:734: No such file or directory.
Current language:  auto; currently c
(gdb) where
#0  0x40078836 in _IO_unbuffer_write () at genops.c:734
#1  0x40078869 in _IO_cleanup () at genops.c:749
#2  0x40043f29 in exit (status=0) at exit.c:62


I can't comment on the correctness of the program.

RJL



Dag Nygren wrote:
> > > I need the MICO library and configure there gives me complaints about
> > > exceptions not working with shared libraries....
> > 
> > You'll just have to debug it.  Product a minimal test case (and
> > 'minimal' means a tiny self-contained bag of bytes that shows what MICO
> > things is wrong, not an ftp site for it :-) and let us see what's going
> > on.
> 
> OK, here we go. What is so wrong with this? (I am just learning C++,
> but have some 15 years of C experience, so it is a real question, not
> meant to provoke anyone.)
> 
> OS: Openserver 5.0.5 with /usr/ccs/bin/lef/ld "downgraded" to the original
>   5.0.5, the rest is rs505a upgraded
> Compiler: EGCS 1.1.2-prerelease2 (2.91.62), with A.Montes' patch to make global
>   constructors work with shared libraries
> 
> Here are the files simplified from the MICO configure script :
> 
> ===== lib.C =====
> #include <iostream.h>
> 
> struct Global {
>         Global () { cout << "Constructing Global\n"; }
> };
> 
> Global gbl;
> 
> #ifdef HAVE_EXCEPTIONS
> class Ex {};
> void bar ()
> {
>         cout << "in bar\n";
>         throw Ex();
> }
> #endif
> 
> ===== exception.C ======
> extern "C" void exit(int);
> 
> class Ex {};
> extern void bar ();
> int main ()
> {
>   try {
>     bar();
>   } catch (Ex &e) {
>     return 0;
>   } catch (...) {
>     return 1;
>   }
>   return 1;
> }
> 
> And here is the script I used to compile them:
> 
> g++ -g -DHAVE_EXCEPTIONS -fPIC -c lib.C
> g++ -g -shared -o libshex.so lib.o
> export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
> g++ -g -o exception -L. -lshex exception.C
> 
> And here is my output:
> 
> dag:Ctest <ena> 744 % ./exception 
> Constructing Global
> in bar
> Abort
> 
> BRGDS
> 
> Dag

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-03-02  8:25             ` J. Kean Johnston
@ 1999-03-31 23:46               ` J. Kean Johnston
  0 siblings, 0 replies; 18+ messages in thread
From: J. Kean Johnston @ 1999-03-31 23:46 UTC (permalink / raw)
  To: Robert Lipe, Dag Nygren; +Cc: egcs

On Sun, Feb 28, 1999 at 02:32:42PM -0600, Robert Lipe wrote:
> GDB used to pass the testsuite on OpenServer for both COFF and ELF.
> (This would have probably been around 4.15 era along with the patches I
> originally submitted to active OSR5 support.)  I think it suffers from
> periodic bitrot becuase that OS isn't well represented on the lists.
4.18 is coming up for release and I am trying to make sure it does the
Right Thing on both OpenServer and UW7. I have just finished adding
hardware watchpoints and breakpoints for UW7, so there is SOME movement :-)

-- 
J. Kean Johnston  |"A man with courage on the outside dares to die;
Engineer, SPG     | A man with courage on the inside dares to live" - Lao Tzu
Santa Cruz, CA    +----------------------------------------------------------
Tel: 831-427-7569    Fax: 831-429-1887    E-mail: jkj@sco.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-03-01  2:45             ` Dag Nygren
       [not found]               ` < 199903011228.aa09607@dag.newtech.fi >
@ 1999-03-31 23:46               ` Dag Nygren
  1 sibling, 0 replies; 18+ messages in thread
From: Dag Nygren @ 1999-03-31 23:46 UTC (permalink / raw)
  To: Robert Lipe; +Cc: Dag Nygren, egcs

> > I need the MICO library and configure there gives me complaints about
> > exceptions not working with shared libraries....
> 
> You'll just have to debug it.  Product a minimal test case (and
> 'minimal' means a tiny self-contained bag of bytes that shows what MICO
> things is wrong, not an ftp site for it :-) and let us see what's going
> on.

OK, here we go. What is so wrong with this? (I am just learning C++,
but have some 15 years of C experience, so it is a real question, not
meant to provoke anyone.)

OS: Openserver 5.0.5 with /usr/ccs/bin/lef/ld "downgraded" to the original
  5.0.5, the rest is rs505a upgraded
Compiler: EGCS 1.1.2-prerelease2 (2.91.62), with A.Montes' patch to make global
  constructors work with shared libraries

Here are the files simplified from the MICO configure script :

===== lib.C =====
#include <iostream.h>

struct Global {
        Global () { cout << "Constructing Global\n"; }
};

Global gbl;

#ifdef HAVE_EXCEPTIONS
class Ex {};
void bar ()
{
        cout << "in bar\n";
        throw Ex();
}
#endif

===== exception.C ======
extern "C" void exit(int);

class Ex {};
extern void bar ();
int main ()
{
  try {
    bar();
  } catch (Ex &e) {
    return 0;
  } catch (...) {
    return 1;
  }
  return 1;
}

And here is the script I used to compile them:

g++ -g -DHAVE_EXCEPTIONS -fPIC -c lib.C
g++ -g -shared -o libshex.so lib.o
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
g++ -g -o exception -L. -lshex exception.C

And here is my output:

dag:Ctest <ena> 744 % ./exception 
Constructing Global
in bar
Abort

BRGDS

Dag


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-03-04 10:06                 ` Robert Lipe
@ 1999-03-31 23:46                   ` Robert Lipe
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Lipe @ 1999-03-31 23:46 UTC (permalink / raw)
  To: Dag Nygren; +Cc: egcs

This example doesn't seem to work under Linux with the latest snapshots,
either.

(gdb) run
Starting program: /home/robertl/tmp/dag/./exception 
Constructing Global

Program received signal SIGSEGV, Segmentation fault.
0x40078836 in _IO_unbuffer_write () at genops.c:734
genops.c:734: No such file or directory.
Current language:  auto; currently c
(gdb) where
#0  0x40078836 in _IO_unbuffer_write () at genops.c:734
#1  0x40078869 in _IO_cleanup () at genops.c:749
#2  0x40043f29 in exit (status=0) at exit.c:62


I can't comment on the correctness of the program.

RJL



Dag Nygren wrote:
> > > I need the MICO library and configure there gives me complaints about
> > > exceptions not working with shared libraries....
> > 
> > You'll just have to debug it.  Product a minimal test case (and
> > 'minimal' means a tiny self-contained bag of bytes that shows what MICO
> > things is wrong, not an ftp site for it :-) and let us see what's going
> > on.
> 
> OK, here we go. What is so wrong with this? (I am just learning C++,
> but have some 15 years of C experience, so it is a real question, not
> meant to provoke anyone.)
> 
> OS: Openserver 5.0.5 with /usr/ccs/bin/lef/ld "downgraded" to the original
>   5.0.5, the rest is rs505a upgraded
> Compiler: EGCS 1.1.2-prerelease2 (2.91.62), with A.Montes' patch to make global
>   constructors work with shared libraries
> 
> Here are the files simplified from the MICO configure script :
> 
> ===== lib.C =====
> #include <iostream.h>
> 
> struct Global {
>         Global () { cout << "Constructing Global\n"; }
> };
> 
> Global gbl;
> 
> #ifdef HAVE_EXCEPTIONS
> class Ex {};
> void bar ()
> {
>         cout << "in bar\n";
>         throw Ex();
> }
> #endif
> 
> ===== exception.C ======
> extern "C" void exit(int);
> 
> class Ex {};
> extern void bar ();
> int main ()
> {
>   try {
>     bar();
>   } catch (Ex &e) {
>     return 0;
>   } catch (...) {
>     return 1;
>   }
>   return 1;
> }
> 
> And here is the script I used to compile them:
> 
> g++ -g -DHAVE_EXCEPTIONS -fPIC -c lib.C
> g++ -g -shared -o libshex.so lib.o
> export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
> g++ -g -o exception -L. -lshex exception.C
> 
> And here is my output:
> 
> dag:Ctest <ena> 744 % ./exception 
> Constructing Global
> in bar
> Abort
> 
> BRGDS
> 
> Dag

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-03-01  3:46                 ` Dag Nygren
@ 1999-03-31 23:46                   ` Dag Nygren
  0 siblings, 0 replies; 18+ messages in thread
From: Dag Nygren @ 1999-03-31 23:46 UTC (permalink / raw)
  To: Dag Nygren; +Cc: Robert Lipe, egcs

A bit more info on my prevoius post:

If I put everything into one file and don't try to link this
as a shared lib it seems to work as expected!

So still one more case of shlibs not working on Openserver....

BRGDS

Dag


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
  1999-03-04 10:43 H.J. Lu
@ 1999-03-31 23:46 ` H.J. Lu
  0 siblings, 0 replies; 18+ messages in thread
From: H.J. Lu @ 1999-03-31 23:46 UTC (permalink / raw)
  To: robertlipe, dag, egcs

The example works fine for me on Linux/glibc2.1/x86 with the latest egcs

in CVS plus my patch to flow.c.

H.J.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Exceptions on Openserver, Egcs 1.1.2-pre2
@ 1999-03-04 10:43 H.J. Lu
  1999-03-31 23:46 ` H.J. Lu
  0 siblings, 1 reply; 18+ messages in thread
From: H.J. Lu @ 1999-03-04 10:43 UTC (permalink / raw)
  To: robertlipe, dag, egcs

The example works fine for me on Linux/glibc2.1/x86 with the latest egcs

in CVS plus my patch to flow.c.

H.J.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~1999-03-31 23:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-27  9:14 Exceptions on Openserver, Egcs 1.1.2-pre2 Dag Nygren
     [not found] ` < 199902271849.aa05534@dag.newtech.fi >
1999-02-27 20:33   ` Robert Lipe
     [not found]     ` < 19990227223327.I15017@rjlhome.sco.com >
1999-02-28  3:45       ` Dag Nygren
     [not found]         ` < 199902281332.aa27340@dag.newtech.fi >
1999-02-28 12:33           ` Robert Lipe
1999-02-28 22:53             ` Robert Lipe
1999-03-01  2:45             ` Dag Nygren
     [not found]               ` < 199903011228.aa09607@dag.newtech.fi >
1999-03-01  3:46                 ` Dag Nygren
1999-03-31 23:46                   ` Dag Nygren
1999-03-04 10:06                 ` Robert Lipe
1999-03-31 23:46                   ` Robert Lipe
1999-03-31 23:46               ` Dag Nygren
1999-03-02  8:25             ` J. Kean Johnston
1999-03-31 23:46               ` J. Kean Johnston
1999-02-28 22:53         ` Dag Nygren
1999-02-28 22:53     ` Robert Lipe
1999-02-28 22:53 ` Dag Nygren
1999-03-04 10:43 H.J. Lu
1999-03-31 23:46 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).