diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 13:07:49 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 13:07:49 +0000 |
commit | 2a82929413ade6657b461f3342a5e9b198027bb9 (patch) | |
tree | ecbe2dead819e7af1e373e6b8a742174d0e44087 /gcc/ada/raise-gcc.c | |
parent | 962f9261e0cab281bcdaaa9974a2ea33d1cb39eb (diff) | |
download | gcc-2a82929413ade6657b461f3342a5e9b198027bb9.tar.gz |
2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
Finalize_Address of the access type's finalization master.
(Expand_N_Allocator): Add code to set attribute Finalize_Address of the
access type's finalization master. Add a guard to prevent
Associated_Storage_Pool from being set on .NET/JVM.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
attribute Finalize_Address of the access type's finalization master.
* exp_ch7.adb (Make_Finalize_Address_Call): New routine.
* exp_ch7.ads (Make_Finalize_Address_Call): New routine.
* rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
RE_Unit_Table.
* s-finmas.adb: Add with clause for System.Address_Image. Add with and
use clause for System.IO
(Detach): Relax the assertion, to be reinstated later.
(Finalize): Rewrite the iteration loop to avoid pointer comparison.
Relax the assertion on Finalize_Address, to be reinstated later.
(Is_Empty_List): New routine.
(pm): New debug routine.
(Set_Finalize_Address): New routine.
* s-finmas.ads (pm): New debug routine.
(Set_Finalize_Address): New routine.
* s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
Remove convention C.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
(Initialize_TCB): Remove Exc_Stack_Ptr initialization.
(Finalize_TCB): Remove its finalization.
(Initialize): Remove assignment of GET_Exc_Stack_Addr
* s-soflin.adb (NT_Exc_Stack): Remove
(Get_Exc_Stack_Addr_NT): Likewise.
(Get_Exc_Stack_Addr_Soft): Likewise.
* s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
(Get_Exc_Stack_Addr): Likewise.
(Get_Exc_Stack_Addr_Soft): Likewise
* s-taspri-vms.ads (Exc_Stack_T): Remove.
(Exc_Stack_Ptr_T): Likewise.
(Private_Data): Remove Exc_Stack_Ptr component.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* raise-gcc.c (get_ip_from_context): New function. Factorize code.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2011-08-29 Geert Bosch <bosch@adacore.com>
* s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
L2_Norm, Swap_Column): New generic subprograms
* s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
L2_Norm, Swap_Column): Implement new subprograms in order to
eliminate dependency on BLAS and LAPACK libraries in
Ada.Numerics.Generic_Real_Arrays and eventually also the complex
version. Forward_Eliminate/Back_Substitute can be used to put a
matrix in row echelon or reduced row echelon form using partial
pivoting.
* a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
Swap_Column): Instantiate from System.Generic_Array_Operations.
("*", "abs"): Implement by instantiation from Generic_Array_Operations.
(Sqrt): Local function for simple computation of square root without
adding dependencies on Generic_Elementary_Functions.
(Swap): New subprogram to exchange floating point numbers.
(Inverse): Reimplement using Jordan-Gauss elimination.
(Jacobi): New procedure implementing Jacobi's method for computation
of eigensystems, based on Rutishauser's implementation.
(L2_Norm): Implement directly using the inner product.
(Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
decreasing eigenvalue as required by the Ada RM.
(Swap_Column): New helper procedure for Sort_Eigensystem.
Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
Sort_Eigensystems.
2011-08-29 Thomas Quinot <quinot@adacore.com>
* put_scos.adb (Put_SCOs): Do not emit a newline for an empty
statements line.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178220 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r-- | gcc/ada/raise-gcc.c | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index 6dff0dee205..af4a5e5091d 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -130,7 +130,7 @@ extern void __gnat_setup_current_excep (_Unwind_Exception *); typedef struct { _Unwind_Action phase; - char * description; + const char * description; } phase_descriptor; static const phase_descriptor phase_descriptors[] @@ -511,8 +511,11 @@ typedef struct } region_descriptor; -static void -db_region_for (region_descriptor *region, _Unwind_Context *uw_context) +/* Extract and adjust the IP (instruction pointer) from an exception + context. */ + +static _Unwind_Ptr +get_ip_from_context (_Unwind_Context *uw_context) { int ip_before_insn = 0; #ifdef HAVE_GETIPINFO @@ -520,12 +523,26 @@ db_region_for (region_descriptor *region, _Unwind_Context *uw_context) #else _Unwind_Ptr ip = _Unwind_GetIP (uw_context); #endif + /* Subtract 1 if necessary because GetIPInfo yields a call return address + in this case, while we are interested in information for the call point. + This does not always yield the exact call instruction address but always + brings the IP back within the corresponding region. */ if (!ip_before_insn) ip--; + return ip; +} + +static void +db_region_for (region_descriptor *region, _Unwind_Context *uw_context) +{ + _Unwind_Ptr ip; + if (! (db_accepted_codes () & DB_REGIONS)) return; + ip = get_ip_from_context (uw_context); + db (DB_REGIONS, "For ip @ 0x%08x => ", ip); if (region->lsda) @@ -651,14 +668,7 @@ typedef struct static void db_action_for (action_descriptor *action, _Unwind_Context *uw_context) { - int ip_before_insn = 0; -#ifdef HAVE_GETIPINFO - _Unwind_Ptr ip = _Unwind_GetIPInfo (uw_context, &ip_before_insn); -#else - _Unwind_Ptr ip = _Unwind_GetIP (uw_context); -#endif - if (!ip_before_insn) - ip--; + _Unwind_Ptr ip = get_ip_from_context (uw_context); db (DB_ACTIONS, "For ip @ 0x%08x => ", ip); @@ -706,16 +716,7 @@ get_call_site_action_for (_Unwind_Context *uw_context, region_descriptor *region, action_descriptor *action) { - int ip_before_insn = 0; -#ifdef HAVE_GETIPINFO - _Unwind_Ptr call_site = _Unwind_GetIPInfo (uw_context, &ip_before_insn); -#else - _Unwind_Ptr call_site = _Unwind_GetIP (uw_context); -#endif - /* Subtract 1 if necessary because GetIPInfo returns the actual call site - value + 1 in this case. */ - if (!ip_before_insn) - call_site--; + _Unwind_Ptr call_site = get_ip_from_context (uw_context); /* call_site is a direct index into the call-site table, with two special values : -1 for no-action and 0 for "terminate". The latter should never @@ -772,18 +773,7 @@ get_call_site_action_for (_Unwind_Context *uw_context, action_descriptor *action) { const unsigned char *p = region->call_site_table; - int ip_before_insn = 0; -#ifdef HAVE_GETIPINFO - _Unwind_Ptr ip = _Unwind_GetIPInfo (uw_context, &ip_before_insn); -#else - _Unwind_Ptr ip = _Unwind_GetIP (uw_context); -#endif - /* Subtract 1 if necessary because GetIPInfo yields a call return address - in this case, while we are interested in information for the call point. - This does not always yield the exact call instruction address but always - brings the IP back within the corresponding region. */ - if (!ip_before_insn) - ip--; + _Unwind_Ptr ip = get_ip_from_context (uw_context); /* Unless we are able to determine otherwise... */ action->kind = nothing; |