Commit 2ed5b748 by Arnaud Charlet

[multiple changes]

2012-07-12  Javier Miranda  <miranda@adacore.com>

	* exp_ch3.adb (Make_Neq_Body): Fix typo in comment.

2012-07-12  Eric Botcazou  <ebotcazou@adacore.com>

	* tb-gcc.c (trace_callback): On IA-64/HP-UX, use workaround only
	if USE_LIBUNWIND_EXCEPTIONS is defined.
	* init.c: Further tweaks for IA-64/HP-UX.

2012-07-12  Tristan Gingold  <gingold@adacore.com>

	* raise-gcc.c: Do not include unwind-dw2-fde.h. Adjust comments.
	(db_region_for): Second argument is ip.  Do not recompute ip.
	(action_kind): Remove typedef, add unhandler enum const.
	(action_descriptor): Adjust type of kind field.
	(db_action_for): Second argument is ip, do not recompute it.
	(get_call_site_action_for): First argument is call_site, do not
	recompute it.  Remove useless return.
	(is_handled_by): Now return enum action_kind.
	Handle GNAT_ALL_OTHERS first.
	Return unhandler for GNAT_UNHANDLED_OTHERS.
	(get_action_description_for): First argument is now ip, do not
	recompute it.  Adjust code for call to is_handled_by.
	(__gnat_notify_unhandled_exception): Add prototype.
	(PERSONALITY_FUNCTION): Call get_ip_from_context.  Adjust calls.
	Handle unhandler case.
	(__gnat_cleanupunwind_handler): Add comments, add
	ATTRIBUTE_UNUSED on arguments.
	(__gnat_Unwind_RaiseException, __gnat_Unwind_ForcedUnwind): Define
	only once.
	* raise.h: Makes struct Exception_Data opaque.

From-SVN: r189433
parent cd20e505
2012-07-12 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Make_Neq_Body): Fix typo in comment.
2012-07-12 Eric Botcazou <ebotcazou@adacore.com>
* tb-gcc.c (trace_callback): On IA-64/HP-UX, use workaround only
if USE_LIBUNWIND_EXCEPTIONS is defined.
* init.c: Further tweaks for IA-64/HP-UX.
2012-07-12 Tristan Gingold <gingold@adacore.com>
* raise-gcc.c: Do not include unwind-dw2-fde.h. Adjust comments.
(db_region_for): Second argument is ip. Do not recompute ip.
(action_kind): Remove typedef, add unhandler enum const.
(action_descriptor): Adjust type of kind field.
(db_action_for): Second argument is ip, do not recompute it.
(get_call_site_action_for): First argument is call_site, do not
recompute it. Remove useless return.
(is_handled_by): Now return enum action_kind.
Handle GNAT_ALL_OTHERS first.
Return unhandler for GNAT_UNHANDLED_OTHERS.
(get_action_description_for): First argument is now ip, do not
recompute it. Adjust code for call to is_handled_by.
(__gnat_notify_unhandled_exception): Add prototype.
(PERSONALITY_FUNCTION): Call get_ip_from_context. Adjust calls.
Handle unhandler case.
(__gnat_cleanupunwind_handler): Add comments, add
ATTRIBUTE_UNUSED on arguments.
(__gnat_Unwind_RaiseException, __gnat_Unwind_ForcedUnwind): Define
only once.
* raise.h: Makes struct Exception_Data opaque.
2012-07-12 Robert Dewar <dewar@adacore.com> 2012-07-12 Robert Dewar <dewar@adacore.com>
* make.adb, sem_ch9.adb, prj.adb, s-rident.ads, snames.ads-tmpl: Minor * make.adb, sem_ch9.adb, prj.adb, s-rident.ads, snames.ads-tmpl: Minor
......
...@@ -8204,7 +8204,7 @@ package body Exp_Ch3 is ...@@ -8204,7 +8204,7 @@ package body Exp_Ch3 is
-- otherwise, the inherited or predefined subprogram is called, see -- otherwise, the inherited or predefined subprogram is called, see
-- (RM 8.5.4(8)) -- (RM 8.5.4(8))
-- Stage 1: Search for a renaming of the unequality primitive and also -- Stage 1: Search for a renaming of the inequality primitive and also
-- search for an overriding of the equality primitive located before the -- search for an overriding of the equality primitive located before the
-- renaming declaration. -- renaming declaration.
......
...@@ -304,8 +304,10 @@ __gnat_install_handler (void) ...@@ -304,8 +304,10 @@ __gnat_install_handler (void)
#include <signal.h> #include <signal.h>
#include <sys/ucontext.h> #include <sys/ucontext.h>
#if defined(__ia64__) #if defined (IN_RTS) && defined (__ia64__)
#include <sys/uc_access.h> #include <sys/uc_access.h>
#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE #define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
void void
...@@ -318,7 +320,7 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext) ...@@ -318,7 +320,7 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
__uc_get_ip (uc, &ip); __uc_get_ip (uc, &ip);
__uc_set_ip (uc, ip + 1); __uc_set_ip (uc, ip + 1);
} }
#endif /* __ia64__ */ #endif /* IN_RTS && __ia64__ */
/* Tasking and Non-tasking signal handler. Map SIGnal to Ada exception /* Tasking and Non-tasking signal handler. Map SIGnal to Ada exception
propagation after the required low level adjustments. */ propagation after the required low level adjustments. */
...@@ -331,9 +333,7 @@ __gnat_error_handler (int sig, ...@@ -331,9 +333,7 @@ __gnat_error_handler (int sig,
struct Exception_Data *exception; struct Exception_Data *exception;
const char *msg; const char *msg;
#if defined(__ia64__)
__gnat_adjust_context_for_raise (sig, ucontext); __gnat_adjust_context_for_raise (sig, ucontext);
#endif
switch (sig) switch (sig)
{ {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Header File * * C Header File *
* * * *
* Copyright (C) 1992-2011, Free Software Foundation, Inc. * * Copyright (C) 1992-2012, Free Software Foundation, Inc. *
* * * *
* GNAT is free software; you can redistribute it and/or modify it under * * GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- * * terms of the GNU General Public License as published by the Free Soft- *
...@@ -37,16 +37,7 @@ extern "C" { ...@@ -37,16 +37,7 @@ extern "C" {
typedef unsigned Exception_Code; typedef unsigned Exception_Code;
struct Exception_Data struct Exception_Data;
{
char Not_Handled_By_Others;
char Lang;
int Name_Length;
char *Full_Name, *Htable_Ptr;
Exception_Code Import_Code;
void (*Raise_Hook)(void);
};
typedef struct Exception_Data *Exception_Id; typedef struct Exception_Data *Exception_Id;
extern void _gnat_builtin_longjmp (void *, int); extern void _gnat_builtin_longjmp (void *, int);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* Copyright (C) 2004-2011, Free Software Foundation, Inc. * * Copyright (C) 2004-2012, Free Software Foundation, Inc. *
* * * *
* GNAT is free software; you can redistribute it and/or modify it under * * GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- * * terms of the GNU General Public License as published by the Free Soft- *
...@@ -64,7 +64,7 @@ trace_callback (struct _Unwind_Context * uw_context, uw_data_t * uw_data) ...@@ -64,7 +64,7 @@ trace_callback (struct _Unwind_Context * uw_context, uw_data_t * uw_data)
{ {
char * pc; char * pc;
#if defined (__ia64__) && defined (__hpux__) #if defined (__ia64__) && defined (__hpux__) && defined (USE_LIBUNWIND_EXCEPTIONS)
/* Work around problem with _Unwind_GetIP on ia64 HP-UX. */ /* Work around problem with _Unwind_GetIP on ia64 HP-UX. */
uwx_get_reg ((struct uwx_env *) uw_context, UWX_REG_IP, (uint64_t *) &pc); uwx_get_reg ((struct uwx_env *) uw_context, UWX_REG_IP, (uint64_t *) &pc);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment