This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

G++ w/ C++ Exceptions


I really like the gnu-win32 tools. I'm amazed how easily I am compiling
Unix programs. They aren't perfect, but they're pretty damn good for
beta software. I'm having problem with exceptions, though, and would be
grateful if a more experienced user would tell me whether these usually
work or not. I'm having trouble compiling, and getting a crash in the
C++ startup code (register_exceptions) before any of my code runs.

Has anyone else had these problems? :

When I compile certain C++ objects with -fexceptions, G++ goes berserk,
even though the objects have no exception handling stuff in them (no
try, catch, etc.). Here's what happens:

(e:\gcc\i386\lib\gcc-lib\i386\cygnus-2.7.2-961023\cc1plus.exe 1007) In
cygwin_except_handler
(e:\gcc\i386\lib\gcc-lib\i386\cygnus-2.7.2-961023\cc1plus.exe 1007) In
cygwin_except_handler
(e:\gcc\i386\lib\gcc-lib\i386\cygnus-2.7.2-961023\cc1plus.exe 1007) In
cygwin_except_handler
...

And it goes on forever, until I hit Ctrl-C which may or may not cause
Windows 95 to crash or Windows NT to launch Dr. Watson. (I presume
that's a known bug too).

I only had this problem with two files, so I compiled them without
exception handling turned on, thinking that the code that triggers
exceptions should never be called from the code that handles exceptions,
or vice versa, so maybe they won't interfere with each other. When I try
to run (under win95), I get a crash, though. Here's all of the
information I have on it, in case it is useful to anyone:

E:\src\jade\jade>gdb jade
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-cygwin32"...
(gdb) run
Starting program: /jade/jade/jade.exe
bff30000:/c/WINDOWS/SYSTEM/GDI32.DLL
bff60000:/c/WINDOWS/SYSTEM/USER32.DLL
7e2e0000:/c/WINDOWS/SYSTEM/WSOCK32.DLL
bfed0000:/c/WINDOWS/SYSTEM/ADVAPI32.DLL
bff70000:/c/WINDOWS/SYSTEM/KERNEL32.DLL
10000000:/c/BIN/CYGWIN.DLL

[failed reading symbols from DLL]
"/c/WINDOWS/SYSTEM/SHLWAPI.DLL": error reading line numbers

7fe00000:/c/WINDOWS/SYSTEM/SHELL32.DLL

[failed reading symbols from DLL]
"/c/WINDOWS/SYSTEM/COMCTL32.DLL": error reading line numbers

63280000:/c/WINDOWS/SYSTEM/URL.DLL

Program received signal SIGSEGV, Segmentation fault.
0x5a520b in __register_exceptions (table=0xc7a0ac)
Current language:  auto; currently c
#0  0x5a520b in __register_exceptions (table=0xc7a0ac)
#1  0x5a4d59 in global constructors keyed to exception::exception ()
#2  0x5a5346 in __do_global_ctors ()
#3  0x5a537b in __main ()
#4  0x40109f in main (argc=1, argv=0x2daf9c4) at jade.cxx:41
#5  0x10011beb in dll_crt0_1 (uptr=0x5aadc0)
    at /pizza/mushroom/noer/beta17/src/winsup/dcrt0.cc:545
#6  0x10011bff in dll_crt0 (uptr=0x5aadc0)
    at /pizza/mushroom/noer/beta17/src/winsup/dcrt0.cc:557
#7  0x5a6474 in cygwin_crt0 ()
    at /pizza/mushroom/noer/beta17/src/winsup/libccrt0.cc:94

Thanks for any information.

 Paul Prescod

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]