OSDN Git Service

* exp_dbug.ads: Update documentation to reflect simpler encoding for
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Nov 2004 10:57:36 +0000 (10:57 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Nov 2004 10:57:36 +0000 (10:57 +0000)
protected operations.

* exp_ch9.adb (Build_Selected_Name): Do not include "PT" suffix in
generated name, it complicates decoding in gdb and hinders debugging
of protected operations.
(Build_Barrier_Function_Specification): Set the Needs_Debug_Info
flag for the protected entry barrier function.
(Build_Protected_Entry_Specification): Set the Needs_Debug_Info
flag for the protected entry function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90907 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/exp_ch9.adb
gcc/ada/exp_dbug.ads

index fc8e730..ac1e213 100644 (file)
@@ -187,13 +187,12 @@ package body Exp_Ch9 is
       Append_Char      : Character := ' ') return Name_Id;
    --  Build a name in the form of Prefix__Selector, with an optional
    --  character appended. This is used for internal subprograms generated
-   --  for operations of protected types, including barrier functions. In
-   --  order to simplify the work of the debugger, the prefix includes the
-   --  characters PT. For the subprograms generated for entry bodies and
-   --  entry barriers, the generated name includes a sequence number that
-   --  makes names unique in the presence of entry overloading. This is
-   --  necessary because entry body procedures and barrier functions all
-   --  have the same signature.
+   --  for operations of protected types, including barrier functions.
+   --  For the subprograms generated for entry bodies and entry barriers,
+   --  the generated name includes a sequence number that makes names
+   --  unique in the presence of entry overloading. This is necessary
+   --  because entry body procedures and barrier functions all have the
+   --  same signature.
 
    procedure Build_Simple_Entry_Call
      (N       : Node_Id;
@@ -799,6 +798,7 @@ package body Exp_Ch9 is
       Loc    : Source_Ptr) return Node_Id
    is
    begin
+      Set_Needs_Debug_Info (Def_Id);
       return Make_Function_Specification (Loc,
         Defining_Unit_Name => Def_Id,
         Parameter_Specifications => New_List (
@@ -1395,6 +1395,7 @@ package body Exp_Ch9 is
       P : Entity_Id;
 
    begin
+      Set_Needs_Debug_Info (Def_Id);
       P := Make_Defining_Identifier (Loc, Name_uP);
 
       if Present (Ent_Id) then
@@ -1911,12 +1912,10 @@ package body Exp_Ch9 is
          Name_Len := Name_Len - 1;
       end if;
 
-      Name_Buffer (Name_Len + 1) := 'P';
-      Name_Buffer (Name_Len + 2) := 'T';
-      Name_Buffer (Name_Len + 3) := '_';
-      Name_Buffer (Name_Len + 4) := '_';
+      Name_Buffer (Name_Len + 1) := '_';
+      Name_Buffer (Name_Len + 2) := '_';
 
-      Name_Len := Name_Len + 4;
+      Name_Len := Name_Len + 2;
       for J in 1 .. Select_Len loop
          Name_Len := Name_Len + 1;
          Name_Buffer (Name_Len) := Select_Buffer (J);
index 70bcf95..83604f7 100644 (file)
@@ -354,8 +354,8 @@ package Exp_Dbug is
       --  calls from other operations on the same object. The locking operation
       --  simply acquires the lock, and then calls the non-locking version.
       --  The names of all of these have a prefix constructed from the name of
-      --  the type, the string "PT", and a suffix which is P or N, depending on
-      --  whether this is the protected/non-locking version of the operation.
+      --  the type, and a suffix which is P or N, depending on whether this is
+      --  the protected/non-locking version of the operation.
 
       --  Operations generated for protected entries follow the same encoding.
       --  Each entry results in two suprograms: a procedure that holds the
@@ -376,14 +376,14 @@ package Exp_Dbug is
 
       --  the following operations are created:
 
-      --    lockPT_getN
-      --    lockPT_getP,
+      --    lock_getN
+      --    lock_getP,
 
-      --    lockPT_setN
-      --    lockPT_setP
+      --    lock_setN
+      --    lock_setP
 
-      --    lockPT_update1sE
-      --    lockPT_udpate2sB
+      --    lock_update1sE
+      --    lock_udpate2sB
 
    ----------------------------------------------------
    -- Conversion between Entities and External Names --