Skip to content

Commit

Permalink
Symbolic trace
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Jul 24, 2015
1 parent 2824739 commit d4e91ab
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
15 changes: 1 addition & 14 deletions src/agpl-debug.adb
Expand Up @@ -4,23 +4,10 @@

with Agpl.Conversions;
with Agpl.Types.Ustrings; use Agpl.Types.Ustrings;
with GNAT.Exception_Traces;
with GNAT.Traceback;
with GNAT.Traceback.Symbolic;

package body Agpl.Debug is

use type Ustring;

--------------------------------
-- Enable_Symbolic_Tracebacks --
--------------------------------

procedure Enable_Symbolic_Tracebacks is
begin
GNAT.Exception_Traces.Trace_On (GNAT.Exception_Traces.Unhandled_Raise);
GNAT.Exception_Traces.Set_Trace_Decorator (GNAT.Traceback.Symbolic.Symbolic_Traceback'Access);
end Enable_Symbolic_Tracebacks;
use type Ustring;

------------------------------------------------------------------------
-- Report --
Expand Down
4 changes: 1 addition & 3 deletions src/agpl-debug.ads
Expand Up @@ -10,11 +10,9 @@ use Ada;

package Agpl.Debug is

-- pragma Preelaborate;
pragma Preelaborate;

-- Pool : Gnat.Debug_Pools.Debug_Pool;

procedure Enable_Symbolic_Tracebacks;

------------------------------------------------------------------------
-- Report --
Expand Down
14 changes: 14 additions & 0 deletions src/agpl-trace-utils.adb
@@ -1,6 +1,10 @@
with Agpl.Calendar.Format;
with Agpl.Strings;

with GNAT.Exception_Traces;
with GNAT.Traceback;
with GNAT.Traceback.Symbolic;

package body Agpl.Trace.Utils is

subtype Warn_Prefix is String (1 .. 4);
Expand All @@ -13,6 +17,16 @@ package body Agpl.Trace.Utils is
Warning => "<w> ",
Always => "!A! ");

--------------------------------
-- Enable_Symbolic_Tracebacks --
--------------------------------

procedure Enable_Symbolic_Tracebacks is
begin
GNAT.Exception_Traces.Trace_On (GNAT.Exception_Traces.Unhandled_Raise);
GNAT.Exception_Traces.Set_Trace_Decorator (GNAT.Traceback.Symbolic.Symbolic_Traceback'Access);
end Enable_Symbolic_Tracebacks;

-------------------
-- Prepend_Level --
-------------------
Expand Down
2 changes: 1 addition & 1 deletion src/agpl-trace-utils.ads
Expand Up @@ -6,9 +6,9 @@ package Agpl.Trace.Utils is

pragma Elaborate_Body;


Filer : aliased File.Object;

procedure Enable_Symbolic_Tracebacks;

-- Prependers:

Expand Down

0 comments on commit d4e91ab

Please sign in to comment.