Index

Package: Debugging

Description

package Debugging is

Types

Output_Proc

type Output_Proc is access procedure( str : String );
The form of the procedure where debugging output is directed.

Verbosity_Level

type Verbosity_Level is (SILENT, ALWAYS, ERROR, WARNING, INFO);
Description of values: SILENT : Never ever display output with this level. ALWAYS : The default verbosity level, more verbose than SILENT but less verbose than displaying only error messages. This is used for temporary debugging output during source code development. ERROR : Severe error messages and exceptions. WARNING: Minor warning messages that can be ignored. INFO : Informational messages that describe what is happening.

Decoration_Level

type Decoration_Level is (NONE, TASK_IMAGE, SOURCE_UNIT);
Description of values: NONE : Display the text without decoration, as-is. TASK_IMAGE : Prefix the text with the image of the current task. SOURCE_UNIT : Include the calling source unit with the task image.

Constants & Global variables

Subprograms & Entries

Dbg

procedure Dbg
( str: String;
system: Hashed_String := NO_SYSTEM;
level: Verbosity_Level := ALWAYS;
entity: String := GNAT.Source_Info.Enclosing_Entity;
location: String := GNAT.Source_Info.Source_Location );
Sends a line of text to the debugging output procedure. Do not specify entity and location; they are used to determine the calling location in the code.

Dbg

procedure Dbg
( e: Exception_Occurrence;
system: Hashed_String := NO_SYSTEM;
level: Verbosity_Level := ALWAYS;
entity: String := GNAT.Source_Info.Enclosing_Entity;
location: String := GNAT.Source_Info.Source_Location );
Sends debugging information from an exception to the output procedure. A stack traceback will also be displayed if available (Windows only.) Do not specify entity and location; they are used to determine the calling location in the code.

Set_Decoration

procedure Set_Decoration
( level: Decoration_Level );
Sets the global decoration level for output text.

Set_Log_File

procedure Set_Log_File
( path: String );
Sets the path of the file to log debug output to. Output will be appended to the contents of the file, if it exists. Output will also be sent to the registered outout procedure.

Set_Output

procedure Set_Output
( output: Output_Proc );
Sets the procedure to receive debugging output. Passing null will disable all debugging output, which is effectively the same as setting the global verbosity level to SILENT.

Set_Verbosity

procedure Set_Verbosity
( level: Verbosity_Level );
Sets the global verbosity level. If an individual system has a higher level of verbosity set then it will be respected. The default global verbosity is WARNING for debug build and ALWAYS for a non-debug build.

Set_Verbosity

procedure Set_Verbosity
( system: Hashed_String;
level: Verbosity_Level );
Sets the maximum verbosity level per system. No output from 'system' with a verbosity level higher than this will be displayed unless it is still less than the global verbosity level.