aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Falis <falis@adacore.com>2009-04-10 15:18:04 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 17:18:04 +0200
commit2c880bdfe5fbf4222e17a39f4211de80a46136c8 (patch)
tree05fd380e3fc547f939e935ce82b6f54804bf487a
parentd8221f45584159193e29130db4628f7d0b2b42c7 (diff)
downloadgcc-2c880bdfe5fbf4222e17a39f4211de80a46136c8.zip
gcc-2c880bdfe5fbf4222e17a39f4211de80a46136c8.tar.gz
gcc-2c880bdfe5fbf4222e17a39f4211de80a46136c8.tar.bz2
init.c: Change VxWorks 6 stack overflow checking for kernel apps.
2009-04-10 Ed Falis <falis@adacore.com> * init.c: Change VxWorks 6 stack overflow checking for kernel apps. * system-vxworks-ppc.ads, system-vxworks-x86.ads: Update header. From-SVN: r145920
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/init.c25
-rw-r--r--gcc/ada/system-vxworks-ppc.ads2
-rw-r--r--gcc/ada/system-vxworks-x86.ads2
4 files changed, 27 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 395cf63..05f268a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-10 Ed Falis <falis@adacore.com>
+
+ * init.c: Change VxWorks 6 stack overflow checking for kernel apps.
+
+ * system-vxworks-ppc.ads, system-vxworks-x86.ads: Update header.
+
2009-04-10 Thomas Quinot <quinot@adacore.com>
* sem_ch6.ads (Check_Subtype_Conformant): Add ??? comment for
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index a1f46ed..78c55b8 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -1782,8 +1782,9 @@ getpid (void)
}
#endif
-/* VxWorks expects the field excCnt to be zeroed when a signal is handled.
- The VxWorks version of longjmp does this; GCC's builtin_longjmp doesn't. */
+/* VxWorks 653 vThreads expects the field excCnt to be zeroed when a signal is.
+ handled. The VxWorks version of longjmp does this; GCC's builtin_longjmp
+ doesn't. */
void
__gnat_clear_exception_count (void)
{
@@ -1822,19 +1823,31 @@ __gnat_map_signal (int sig)
msg = "SIGBUS: possible stack overflow";
break;
#else
-#ifdef __RTP__
- /* In RTP mode a SIGSEGV is most likely due to a stack overflow,
- since stack checking uses the probing mechanism. */
+#if (_WRS_VXWORKS_MAJOR = 6)
case SIGILL:
exception = &constraint_error;
msg = "SIGILL";
break;
+#ifdef __RTP__
+ /* In RTP mode a SIGSEGV is most likely due to a stack overflow,
+ since stack checking uses the probing mechanism. */
case SIGSEGV:
exception = &storage_error;
msg = "SIGSEGV: possible stack overflow";
break;
#else
- /* In kernel mode a SIGILL is most likely due to a stack overflow,
+ /* VxWorks 6 kernel mode with probing. SIGBUS for guard page hit */
+ case SIGSEGV:
+ exception = &program_error;
+ msg = "SIGSEGV";
+ break;
+ case SIGBUS:
+ exception = &storage_error;
+ msg = "SIGBUS: possible stack overflow";
+ break;
+#endif
+#else
+ /* VxWorks 5: a SIGILL is most likely due to a stack overflow,
since stack checking uses the stack limit mechanism. */
case SIGILL:
exception = &storage_error;
diff --git a/gcc/ada/system-vxworks-ppc.ads b/gcc/ada/system-vxworks-ppc.ads
index be2ca3c..8681e28 100644
--- a/gcc/ada/system-vxworks-ppc.ads
+++ b/gcc/ada/system-vxworks-ppc.ads
@@ -5,7 +5,7 @@
-- S Y S T E M --
-- --
-- S p e c --
--- (VxWorks Version PPC) --
+-- (VxWorks 5 Version PPC) --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
diff --git a/gcc/ada/system-vxworks-x86.ads b/gcc/ada/system-vxworks-x86.ads
index 6ee9d45..a16fde2 100644
--- a/gcc/ada/system-vxworks-x86.ads
+++ b/gcc/ada/system-vxworks-x86.ads
@@ -5,7 +5,7 @@
-- S Y S T E M --
-- --
-- S p e c --
--- (VxWorks Version x86) --
+-- (VxWorks 5 Version x86) --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --