Package: GNAT.Debug_Utilities

Dependencies

with System;

Description

This package provides some useful utility subprograms for use in writing routines that generate debugging output.

Header

package GNAT.Debug_Utilities is
 
pragma Pure (Debug_Utilities);

Constants and Named Numbers

Address_Image_Length : constant :=
                         13 + 10 * Boolean'Pos (Standard'Address_Size > 32);
Length of string returned by Image function

Other Items:

function Image (S : String) return String;
Returns a string image of S, obtained by prepending and appending quote (") characters and doubling any quote characters in the string. The maximum length of the result is thus 2 ** S'Length + 2.

function Image (A : System.Address) return String;
Returns a string of the form 16#xxxx_xxxx# for 32-bit addresses or 16#xxxx_xxxx_xxxx_xxxx# for 64-bit addresses. Hex characters are in upper case.

function Value (S : String) return System.Address;
Given a valid integer literal in any form, including the form returned by the Image function in this package, yields the corresponding address.
end GNAT.Debug_Utilities;