aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 14:52:35 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 14:52:35 +0100
commitc5ff22e7b3ffc1e45b043e1bd35bb3b0bad90817 (patch)
treeb7abf5afcd58c6232f9fa433485530fc11d00ab7 /gcc/ada/init.c
parent226e989e7e81f44758f112c719f16d93ccf8be19 (diff)
downloadgcc-c5ff22e7b3ffc1e45b043e1bd35bb3b0bad90817.zip
gcc-c5ff22e7b3ffc1e45b043e1bd35bb3b0bad90817.tar.gz
gcc-c5ff22e7b3ffc1e45b043e1bd35bb3b0bad90817.tar.bz2
[multiple changes]
2009-11-30 Thomas Quinot <quinot@adacore.com> * put_scos.adb (Put_SCOs): Do not generate a SCO unit header for a unit that has no SCOs. * scos.ads: Minor reformatting 2009-11-30 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb: Second unanalyzed parameter of Annotate is optional. 2009-11-30 Eric Botcazou <ebotcazou@adacore.com> * init.c (__gnat_adjust_context_for_raise, Linux version): Add guard for null PC saved in the context. 2009-11-30 Hristian Kirtchev <kirtchev@adacore.com> * a-calend.adb (Day_Of_Week): Rewritten. The routine determines the number of days from the Ada Epoch to the input date while ensuring that both dates are in the same time zone. From-SVN: r154801
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r--gcc/ada/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index a8be23d..5e5d1c6 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -601,14 +601,14 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
time this happens. */
#if defined (i386)
- unsigned long pattern = *(unsigned long *)mcontext->gregs[REG_EIP];
+ unsigned long *pc = (unsigned long *)mcontext->gregs[REG_EIP];
/* The pattern is "orl $0x0,(%esp)" for a probe in 32-bit mode. */
- if (signo == SIGSEGV && pattern == 0x00240c83)
+ if (signo == SIGSEGV && pc && *pc == 0x00240c83)
mcontext->gregs[REG_ESP] += 4096 + 4 * sizeof (unsigned long);
#elif defined (__x86_64__)
- unsigned long pattern = *(unsigned long *)mcontext->gregs[REG_RIP];
+ unsigned long *pc = (unsigned long *)mcontext->gregs[REG_RIP];
/* The pattern is "orq $0x0,(%rsp)" for a probe in 64-bit mode. */
- if (signo == SIGSEGV && (pattern & 0xffffffffff) == 0x00240c8348)
+ if (signo == SIGSEGV && pc && (*pc & 0xffffffffff) == 0x00240c8348)
mcontext->gregs[REG_RSP] += 4096 + 4 * sizeof (unsigned long);
#elif defined (__ia64__)
/* ??? The IA-64 unwinder doesn't compensate for signals. */