diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-11-19 11:57:36 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-11-19 11:57:36 +0100 |
commit | 32310747977c02f6b9f7a97ca06cc8b77b3bbd52 (patch) | |
tree | 867cefd2bc273802292f4d0e5123c3320dfb55d4 | |
parent | ffe9aba81229acba2f9c9a96503dc08ae9a03bb5 (diff) | |
download | gcc-32310747977c02f6b9f7a97ca06cc8b77b3bbd52.zip gcc-32310747977c02f6b9f7a97ca06cc8b77b3bbd52.tar.gz gcc-32310747977c02f6b9f7a97ca06cc8b77b3bbd52.tar.bz2 |
exp_dbug.ads: Update documentation to reflect simpler encoding for protected operations.
* exp_dbug.ads: Update documentation to reflect simpler encoding for
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.
From-SVN: r90907
-rw-r--r-- | gcc/ada/exp_ch9.adb | 23 | ||||
-rw-r--r-- | gcc/ada/exp_dbug.ads | 16 |
2 files changed, 19 insertions, 20 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index fc8e730..ac1e213 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -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); diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 70bcf95..83604f7 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -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 -- |