This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/20226] [4.0/4.1 Regression] Error in __gnat_install_SEH_handler breaks bootstrap
- From: "dannysmith at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2005 04:49:36 -0000
- Subject: [Bug ada/20226] [4.0/4.1 Regression] Error in __gnat_install_SEH_handler breaks bootstrap
- References: <20050227022604.20226.aaronavay62@aaronwl.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-03-01 04:49 -------
The problem appears to be that the file stage1/ada/b_gnatb.c built by the
bootstrap gnatbind doesn't define the ponter to the exception registration
structure (SEH). This :
int SEH [2];
and
__gnat_initialize ((void *)SEH);
should be generated (and is in stage2 ) by the new bindgen.adb but the old
gnatbind doesn't have that.
I was able to get bootstap to complete by this hack to ada/init.c
*** init.c.orig Fri Feb 25 19:57:42 2005
--- init.c Mon Feb 28 22:18:39 2005
*************** __gnat_initialize (void *eh ATTRIBUTE_UN
*** 836,842 ****
__gnat_plist_init();
/* Install the Structured Exception handler. */
! if (eh)
__gnat_install_SEH_handler (eh);
}
--- 836,842 ----
__gnat_plist_init();
/* Install the Structured Exception handler. */
! if (eh && eh != (void*)((DWORD)-1))
__gnat_install_SEH_handler (eh);
}
(gdb said that the ER was 0xffffffff. Setting *ER caused the segfault.
Must be a better way).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20226