aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-05-20 14:47:13 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-05-20 14:47:13 +0200
commit36cee502f345b8b64a08c57c1ac3237cb5c7d5e3 (patch)
tree7afc4ecc2e446df31ae6ed137913cc363e5cca78 /gcc/ada/init.c
parent8bfa6c2fa3ce03a2d76028f6c2cee96653bfc26a (diff)
downloadgcc-36cee502f345b8b64a08c57c1ac3237cb5c7d5e3.zip
gcc-36cee502f345b8b64a08c57c1ac3237cb5c7d5e3.tar.gz
gcc-36cee502f345b8b64a08c57c1ac3237cb5c7d5e3.tar.bz2
init.c: Enable stack probing on ppc-linux.
2008-05-20 Tristan Gingold <gingold@adacore.com> * init.c: Enable stack probing on ppc-linux. * tracebak.c: Add symbolic traceback for ppc-linux. * system-linux-ppc.ads: Enable stack probing on ppc-linux. From-SVN: r135630
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r--gcc/ada/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 5dd7815..24a6437 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -568,7 +568,7 @@ __gnat_install_handler (void)
/*********************/
#elif defined (linux) && (defined (i386) || defined (__x86_64__) \
- || defined (__ia64__))
+ || defined (__ia64__) || defined (__powerpc__))
#include <signal.h>
@@ -624,7 +624,9 @@ static void __gnat_error_handler (int, siginfo_t *siginfo, void *ucontext);
void
__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
{
+#ifndef __powerpc__
mcontext_t *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
+#endif
/* On the i386 and x86-64 architectures, stack checking is performed by
means of probes with moving stack pointer, that is to say the probed
@@ -657,6 +659,8 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
mcontext->gregs[REG_RIP]++;
#elif defined (__ia64__)
mcontext->sc_ip++;
+#elif defined (__powerpc__)
+ ((ucontext_t *) ucontext)->uc_mcontext.regs->nip++;
#endif
}