summaryrefslogtreecommitdiffstats
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 13:52:35 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 13:52:35 +0000
commitd270e8369c2a6eaac79dd1be3895f0b85edc509c (patch)
treeb7abf5afcd58c6232f9fa433485530fc11d00ab7 /gcc/ada/init.c
parentf718be113fd9b1448ffe516d16a70523c06f312e (diff)
downloadppe42-gcc-d270e8369c2a6eaac79dd1be3895f0b85edc509c.tar.gz
ppe42-gcc-d270e8369c2a6eaac79dd1be3895f0b85edc509c.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154801 138bc75d-0d04-0410-961f-82ee72b054a4
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 a8be23dbb5f..5e5d1c60b44 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. */
OpenPOWER on IntegriCloud