AdaCL.Trace

More...

Entities

Simple types

Destination

Record types

Parameter

Tagged types

Object

Subprograms

Disable_Trace
Disable_Verbose
Disable_Write_Line_Number
Disable_Write_Prefix
Enable_Trace
Enable_Verbose
Enable_Write_Line_Number
Enable_Write_Prefix
Entering
Entering
Entering
Entering
Exiting
Exiting
Exiting
Exiting
Initialize
Is_Trace_Enabled
Is_Verbose_Enabled
Is_Write_Line_Number_Enabled
Is_Write_Prefix_Enabled
Raise_Exception_With_Entity
Raise_Exception_With_Entity
Raise_Exception_With_File
Raise_Exception_With_File
Report_Assertion
Report_Assertion
Trace_Destination
Write
Write
Write
Write
Write
Write
Write
Write_Commandline_Help
Write_Dump
Write_Dump
Write_Error
Write_Error
Write_Error
Write_Error
Write_Error
Write_Error
Write_Info
Write_Info
Write_Info
Write_Info
Write_To_File
Write_To_File
Write_To_Queue
Write_To_Standard_Error
Write_To_Standard_Output
Write_Wide
Write_Wide_Wide

Dispatching subprograms

Adjust
Finalize
Function_Trace
Function_Trace

Generic instantiations

Parameter_Vectors (generic instantiation)

Description

Destination [source]

55 type Destination is
56 (Queue,
57 Standard_Error,
58 Standard_Output,
59 File);

Trace Destination

Queue

Trace to system queue

Standard_Error

Trace to standart error

Standard_Output

Trace to standart output

File

Trace to file

Parameter [source]

40 Parameter : Parameter_Vectors.Vector renames Parameter_Vectors.Empty_Vector;

Object [source]

46 type Object (Name_Length : Positive) is new Base.Object with private;

Keep internal data for function traces

Inherits Object

Name_Length of type Positive

Length of trace String

Disable_Trace [source]

292 procedure Disable_Trace with
293 Inline;

Enable Trace

Disable_Verbose [source]

310 procedure Disable_Verbose with
311 Inline;

Disable Verbose Output

Disable_Write_Line_Number [source]

274 procedure Disable_Write_Line_Number with
275 Inline;

Don't Write Line numbers

Disable_Write_Prefix [source]

363 procedure Disable_Write_Prefix with
364 Inline;

Disable_ the write prefix

Enable_Trace [source]

286 procedure Enable_Trace with
287 Inline;

Enable Trace

Enable_Verbose [source]

304 procedure Enable_Verbose with
305 Inline;

Enable Verbose Output

Enable_Write_Line_Number [source]

268 procedure Enable_Write_Line_Number with
269 Inline;

Write Line numbers

Enable_Write_Prefix [source]

357 procedure Enable_Write_Prefix with
358 Inline;

Enable the write prefix

Entering [source]

106 procedure Entering (Name : in String) with
107 Inline;
Name of type String

Name of the function calls to be traced.

Entering [source]

114 procedure Entering
115 (Entity : in String := GNAT.Source_Info.Enclosing_Entity;
116 Source : in String := GNAT.Source_Info.Source_Location);
Entity of type String

Name of the function calls to be traced.

Source of type String

Source Line to be traced

Entering [source]

123 procedure Entering
124 (In_Parameter : in String;
125 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
126 Source : in String := GNAT.Source_Info.Source_Location);
In_Parameter of type String
Entity of type String

Name of the function calls to be traced.

Source of type String

Source Line to be traced

Entering [source]

133 procedure Entering
134 (In_Parameters : in Parameter_Vectors.Vector;
135 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
136 Source : in String := GNAT.Source_Info.Source_Location);
In_Parameters of type Vector
Entity of type String

Name of the function calls to be traced.

Source of type String

Source Line to be traced

Exiting [source]

142 procedure Exiting (Name : in String) with
143 Inline;
Name of type String

Name of the function calls to be traced.

Exiting [source]

150 procedure Exiting
151 (Entity : in String := GNAT.Source_Info.Enclosing_Entity;
152 Source : in String := GNAT.Source_Info.Source_Location);
Entity of type String

Name of the function calls to be traced.

Source of type String

Source Line to be traced

Exiting [source]

160 procedure Exiting
161 (Out_Parameter : in String;
162 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
163 Source : in String := GNAT.Source_Info.Source_Location);
Out_Parameter of type String

return value of function as string.

Entity of type String

name of the function calls to be traced.

Source of type String

source line to be traced

Exiting [source]

171 procedure Exiting
172 (Out_Parameters : in Parameter_Vectors.Vector;
173 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
174 Source : in String := GNAT.Source_Info.Source_Location);
Out_Parameters of type Vector

return value of function as string.

Entity of type String

name of the function calls to be traced.

Source of type String

source line to be traced

Initialize [source]

64 procedure Initialize;

Initialize trace from environment variable and commandline

Is_Trace_Enabled [source]

298 function Is_Trace_Enabled return Boolean with
299 Inline;

check is trace is Enabled

Return value

Is_Verbose_Enabled [source]

316 function Is_Verbose_Enabled return Boolean with
317 Inline;

check is trace is Enabled

Return value

Is_Write_Line_Number_Enabled [source]

280 function Is_Write_Line_Number_Enabled return Boolean with
281 Inline;

check if Line numbers are written

Return value

Is_Write_Prefix_Enabled [source]

369 function Is_Write_Prefix_Enabled return Boolean with
370 Inline;

Check the write prefix flag

Return value

Raise_Exception_With_Entity [source]

183 procedure Raise_Exception_With_Entity
184 (Raising : in Ada.Exceptions.Exception_Id := Ada.Assertions.Assertion_Error'Identity;
185 Message : in String := "No Message given";
186 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
187 Source : in String := GNAT.Source_Info.Source_Location) with
188 No_Return;

Trace the given exeption details and then raise the exception.

Raising of type Exception_Id

Exeption which is raised Message : Free form Message

Message of type String

Message to print to trace

Entity of type String

Location destriptor.

Source of type String

Location destriptor.

Raise_Exception_With_Entity [source]

211 procedure Raise_Exception_With_Entity
212 (Raising : in Ada.Exceptions.Exception_Id := Ada.Assertions.Assertion_Error'Identity;
213 Message : in Wide_Wide_String := "No Message given";
214 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
215 Source : in String := GNAT.Source_Info.Source_Location) with
216 No_Return;

Trace the given exeption details and then raise the exception.

Raising of type Exception_Id

Exeption which is raised Message : Free form Message

Message of type Wide_Wide_String

Message to print to trace

Entity of type String

Location destriptor.

Source of type String

Location destriptor.

Raise_Exception_With_File [source]

197 procedure Raise_Exception_With_File
198 (Raising : in Ada.Exceptions.Exception_Id := Ada.Assertions.Assertion_Error'Identity;
199 Message : in String := "No Message given";
200 Source : in String := GNAT.Source_Info.File;
201 Line : in Natural := GNAT.Source_Info.Line) with
202 No_Return;

Trace the given exeption details and then raise the exception.

Raising of type Exception_Id

Exeption which is raised Message : Free form Message

Message of type String

Message to print to trace

Source of type String

Filename.

Line of type Natural

Line number.

Raise_Exception_With_File [source]

225 procedure Raise_Exception_With_File
226 (Raising : in Ada.Exceptions.Exception_Id := Ada.Assertions.Assertion_Error'Identity;
227 Message : in Wide_Wide_String := "No Message given";
228 Source : in String := GNAT.Source_Info.File;
229 Line : in Natural := GNAT.Source_Info.Line) with
230 No_Return;

Trace the given exeption details and then raise the exception.

Raising of type Exception_Id

Exeption which is raised Message : Free form Message

Message of type Wide_Wide_String

Message to print to trace

Source of type String

Filename.

Line of type Natural

Line number.

Report_Assertion [source]

241 procedure Report_Assertion
242 (Condition : in Boolean;
243 Raising : in Ada.Exceptions.Exception_Id := Ada.Assertions.Assertion_Error'Identity;
244 Message : in String := "No Message given.";
245 Entity : in String := GNAT.Source_Info.Enclosing_Entity;
246 Source : in String := GNAT.Source_Info.Source_Location) with
247 Inline;

Report an assert condition. If the condition is not true create a trace entry describing the assertion and then raise an exception.

Condition of type Boolean

Condition which should be true

Raising of type Exception_Id

Exeption which is raised

Message of type String

Free form Message

Entity of type String

Location destriptor.

Source of type String

Location destriptor.

Report_Assertion [source]

259 procedure Report_Assertion
260 (Condition : Boolean;
261 Message : String;
262 Source : String := GNAT.Source_Info.File;
263 Line : Natural := GNAT.Source_Info.Line);

Report an assert condition. If the condition is not true create a trace entry describing the assertion and then raise an exception. This version used parameter which are compatible with AUnit

Condition of type Boolean

Condition which should be true

Message of type String

Free form Message

Source of type String

Filename of source code

Line of type Natural

Line number in source code.

Trace_Destination [source]

351 function Trace_Destination return Destination with
352 Inline;

Check the Trace Destination

Return value

Write [source]

376 procedure Write (Text : in String);

Write an String using writeFormattedString after adding the appropriate padding for indentation.

Text of type String

String to be written

Write [source]

394 procedure Write (Text : in Ada.Strings.Unbounded.Unbounded_String);

Write an String using writeFormattedString after adding the appropriate padding for indentation.

Text of type Unbounded_String

String to be written

Write [source]

400 procedure Write (Text : in Ada.Strings.Wide_Unbounded.Unbounded_Wide_String);

Write an String using writeFormattedString after adding the appropriate padding for indentation.

Text of type Unbounded_Wide_String

String to be written

Write [source]

406 procedure Write (Text : in Ada.Strings.Wide_Wide_Unbounded.Unbounded_Wide_Wide_String);

Write an String using writeFormattedString after adding the appropriate padding for indentation.

Text of type Unbounded_Wide_Wide_String

String to be written

Write [source]

412 procedure Write (Text : in String; An_Address : in System.Address);

Write an Address.

Text of type String

String to be written

An_Address of type Address

Write [source]

418 procedure Write (An_Exception : in Ada.Exceptions.Exception_Occurrence);

Write an Exception to the Trace

An_Exception of type Exception_Occurrence

String to be written

Write [source]

426 procedure Write
427 (An_Exception : in Ada.Exceptions.Exception_Occurrence;
428 Entity : in String;
429 Source : in String);

Write an Exception to the Trace

An_Exception of type Exception_Occurrence

Exception to be written

Entity of type String

Procedure in which the exception was caught

Source of type String

Source File in which Entity is located.

Write_Commandline_Help [source]

516 procedure Write_Commandline_Help;

Write Help for Commandline Options parsed from Trace

Write_Dump [source]

436 procedure Write_Dump (An_Address : in System.Address; Size_In_Byte : in System.Storage_Elements.Storage_Count);

Create a memory dump, S

An_Address of type Address

String to be written

Size_In_Byte of type Storage_Count

Size in Storage_Elements.

Write_Dump [source]

443 procedure Write_Dump (An_Address : in System.Address; Size_In_Bits : in Integer);

Create a memory dump. This Dump takes size in bits.

An_Address of type Address

String to be written

Size_In_Bits of type Integer

Size in Bits - i.E. for 'Size.

Write_Error [source]

449 procedure Write_Error (Text : in String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation.

Text of type String

String to be written

Write_Error [source]

455 procedure Write_Error (Text : in Wide_String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation.

Text of type Wide_String

String to be written

Write_Error [source]

461 procedure Write_Error (Text : in Wide_Wide_String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation.

Text of type Wide_Wide_String

String to be written

Write_Error [source]

467 procedure Write_Error (Text : in Ada.Strings.Wide_Wide_Unbounded.Unbounded_Wide_Wide_String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation.

Text of type Unbounded_Wide_Wide_String

String to be written

Write_Error [source]

473 procedure Write_Error (An_Exception : in Ada.Exceptions.Exception_Occurrence);

Write an Exception to the Trace

An_Exception of type Exception_Occurrence

String to be written

Write_Error [source]

481 procedure Write_Error
482 (An_Exception : in Ada.Exceptions.Exception_Occurrence;
483 Entity : in String;
484 Source : in String);

Write an Exception to the Trace

An_Exception of type Exception_Occurrence

String to be written

Entity of type String

Procedure in which the exception was caught

Source of type String

Source File in which Entity is located.

Write_Info [source]

489 procedure Write_Info;

When verbose is aktivated then an empty line is written to Standart_Output

Write_Info [source]

497 procedure Write_Info (Text : in String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation. When verbose is aktivated then the string is written to Standart_Output as well.

Text of type String

String to be written

Write_Info [source]

503 procedure Write_Info (Text : in Character);

When verbose is aktivated then the character is written to Standart_Output.

Text of type Character

character to be written

Write_Info [source]

511 procedure Write_Info (Text : in Ada.Strings.Unbounded.Unbounded_String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation. When verbose is aktivated then the string is written to Standart_Output as well.

Text of type Unbounded_String

String to be written

Write_To_File [source]

340 procedure Write_To_File with
341 Inline;

Write to queue - not supported yet.

Write_To_File [source]

346 procedure Write_To_File (New_Filename : in String);

Set Filename for Trace File

New_Filename of type String

Write_To_Queue [source]

322 procedure Write_To_Queue with
323 Inline;

Write to queue - not supported yet.

Write_To_Standard_Error [source]

328 procedure Write_To_Standard_Error with
329 Inline;

Write to Standart Error

Write_To_Standard_Output [source]

334 procedure Write_To_Standard_Output with
335 Inline;

Write to Standart Error

Write_Wide [source]

382 procedure Write_Wide (Text : in Wide_String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation.

Text of type Wide_String

String to be written

Write_Wide_Wide [source]

388 procedure Write_Wide_Wide (Text : in Wide_Wide_String);

Write an IString using writeFormattedString after adding the appropriate padding for indentation.

Text of type Wide_Wide_String

String to be written

Adjust [source]

538 overriding procedure Adjust (This : in out Object);

Trace Copy.

This of type AdaCL.Trace.Object

Object itself.

Finalize [source]

545 overriding procedure Finalize (This : in out Object);

Trace end of function

This of type AdaCL.Trace.Object

Object itself.

Function_Trace [source]

73 function Function_Trace (Name : in String) return Object with
74 Inline;

Functrace is not quite as usefull as the C++ version. The reason are the missing constructors and destructors in Ada. With Controlled types you can't limit to just one call to Initialize and one to Finalize There are allways some extra Adjust with matching. Finalize.

Name of type String

Name of the function calls to be traced.

Return value

Function_Trace [source]

84 function Function_Trace
85 (Entity : in String := GNAT.Source_Info.Enclosing_Entity;
86 Source : in String := GNAT.Source_Info.Source_Location)
87 return Object is (Function_Trace (Name => Entity & ':' & Source));

Functrace is not quite as usefull as the C++ version. The reason are the missing constructors and destructors in Ada. With Controlled types you can't limit to just one call to Initialize and one to Finalize There are allways some extra Adjust with matching. Finalize.

Entity of type String

Name of the function calls to be traced.

Source of type String

Source Line to be traced

Return value

Parameter_Vectors (generic instantiation) [source]

38package Parameter_Vectors is new Ada.Containers.Indefinite_Vectors (Index_Type => Positive, Element_Type => String);