summaryrefslogtreecommitdiff
path: root/gcc/ada/s-exctra.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-31 09:37:12 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-31 09:37:12 +0000
commitd1a2e31b1e4d8bf331b794ca0f9ec2c08b726eec (patch)
tree1ba101c6fc76662edeaaf29a4db8af79dec2ade7 /gcc/ada/s-exctra.adb
parentaba11c1259d176b737a357e86febb834961843da (diff)
downloadgcc-d1a2e31b1e4d8bf331b794ca0f9ec2c08b726eec.tar.gz
2014-07-31 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb, sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb, exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213325 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-exctra.adb')
-rw-r--r--gcc/ada/s-exctra.adb17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ada/s-exctra.adb b/gcc/ada/s-exctra.adb
index 234b726ac5c..509f61be993 100644
--- a/gcc/ada/s-exctra.adb
+++ b/gcc/ada/s-exctra.adb
@@ -29,6 +29,8 @@
-- --
------------------------------------------------------------------------------
+with Ada.Unchecked_Conversion;
+
with System.Standard_Library; use System.Standard_Library;
with System.Soft_Links; use System.Soft_Links;
@@ -67,16 +69,19 @@ package body System.Exception_Traces is
(Traceback : System.Address;
Len : Natural) return String
is
- Decorator_Traceback : Traceback_Entries.Tracebacks_Array (1 .. Len);
- for Decorator_Traceback'Address use Traceback;
+ -- Note: do not use an address clause, which is not supported under .NET
+
+ subtype Trace_Array is Traceback_Entries.Tracebacks_Array (1 .. Len);
+ type Trace_Array_Access is access all Trace_Array;
- -- Handle the "transition" from the array stored in the exception
- -- occurrence to the array expected by the decorator.
+ function To_Trace_Array is new
+ Ada.Unchecked_Conversion (Address, Trace_Array_Access);
- pragma Import (Ada, Decorator_Traceback);
+ Decorator_Traceback : constant Trace_Array_Access :=
+ To_Trace_Array (Traceback);
begin
- return Current_Decorator.all (Decorator_Traceback);
+ return Current_Decorator.all (Decorator_Traceback.all);
end Decorator_Wrapper;
-------------------------