summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_dbug.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_dbug.ads')
-rw-r--r--gcc/ada/exp_dbug.ads67
1 files changed, 57 insertions, 10 deletions
diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads
index 49979e30b8d..3e3e992707a 100644
--- a/gcc/ada/exp_dbug.ads
+++ b/gcc/ada/exp_dbug.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -28,6 +28,7 @@
-- debugger. In accordance with the Dwarf 2.2 specification, certain
-- type names are encoded to provide information to the debugger.
+with Namet; use Namet;
with Types; use Types;
with Uintp; use Uintp;
@@ -44,11 +45,11 @@ package Exp_Dbug is
-- are the enclosing scopes (not including Standard at the start).
-- The encoding of the name follows this basic qualified naming scheme,
- -- where the encoding of individual entity names is as described in
- -- Namet (i.e. in particular names present in the original source are
- -- folded to all lower case, with upper half and wide characters encoded
- -- as described in Namet). Upper case letters are used only for entities
- -- generated by the compiler.
+ -- where the encoding of individual entity names is as described in Namet
+ -- (i.e. in particular names present in the original source are folded to
+ -- all lower case, with upper half and wide characters encoded as described
+ -- in Namet). Upper case letters are used only for entities generated by
+ -- the compiler.
-- There are two cases, global entities, and local entities. In more formal
-- terms, local entities are those which have a dynamic enclosing scope,
@@ -1247,10 +1248,19 @@ package Exp_Dbug is
-- The bounds may be any integral type. In the case of an enumeration
-- type, Enum_Rep values are used.
- -- The debugging information will sometimes reference an anonymous fat
- -- pointer type. Such types are given the name xxx___XUP, where xxx is
- -- the name of the designated type. If the debugger is asked to output
- -- such a type name, the appropriate form is "access xxx".
+ -- For a given unconstrained array type, the compiler will generate one
+ -- fat-pointer type whose name is "arr___XUP", where "arr" is the name
+ -- of the array type, and use it to represent the array type itself in
+ -- the debugging information.
+ -- For each pointer to this unconstrained array type, the compiler will
+ -- generate a typedef that points to the above "arr___XUP" fat-pointer
+ -- type. As a consequence, when it comes to fat-pointer types:
+
+ -- 1. The type name is given by the typedef
+
+ -- 2. If the debugger is asked to output the type, the appropriate
+ -- form is "access arr", except if the type name is "arr___XUP"
+ -- for which it is the array definition.
-- Thin Pointers
@@ -1501,4 +1511,41 @@ package Exp_Dbug is
-- are missing and deal as best as it can with the limited information
-- available.
+ ---------------------------------
+ -- GNAT Extensions to DWARF2/3 --
+ ---------------------------------
+
+ -- If the compiler switch "-gdwarf+" is specified, GNAT Vendor extensions
+ -- to DWARF2/3 are generated, with the following variations from the above
+ -- specification.
+
+ -- Change in the contents of the DW_AT_name attribute.
+ -- The operators are represented in their natural form. (Ie, the addition
+ -- operator is written as "+" instead of "Oadd").
+ -- The component separation string is "." instead of "__"
+
+ -- Introduction of DW_AT_GNAT_encoding, encoded with value 0x2301.
+ -- Any debugging information entry representing a program entity, named
+ -- or implicit, may have a DW_AT_GNAT_encoding attribute. The value of
+ -- this attribute is a string representing the suffix internally added
+ -- by GNAT for various purposes, mainly for representing debug
+ -- information compatible with other formats.
+
+ -- If a debugging information entry has multiple encodings, all of them
+ -- will be listed in DW_AT_GNAT_encoding. The separator for this list
+ -- is ':'.
+
+ -- Introduction of DW_AT_GNAT_descriptive_type, encoded with value 0x2302
+ -- Any debugging information entry representing a type may have a
+ -- DW_AT_GNAT_descriptive_type attribute whose value is a reference,
+ -- pointing to a debugging information entry representing another type
+ -- associated to the type.
+
+ -- Modification of the contents of the DW_AT_producer string.
+ -- When emitting full GNAT Vendor extensions to DWARF2/3, "-gdwarf+"
+ -- is appended to the DW_AT_producer string.
+ --
+ -- When emitting only DW_AT_GNAT_descriptive_type, "-gdwarf+-" is
+ -- appended to the DW_AT_producer string.
+
end Exp_Dbug;