Bug 393116 - Symbol service does not return a fully qualified C++ name
Summary: Symbol service does not return a fully qualified C++ name
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: 1.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.1   Edit
Assignee: Eugene Tarassov CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 03:38 EDT by patrice guillemot CLA
Modified: 2013-06-05 04:40 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description patrice guillemot CLA 2012-10-30 03:38:44 EDT
A class method symbol name is not returned as a fully qualified c++ name. Only the method name is returned. We should have Class::method() and not method().
Comment 1 Eugene Tarassov CLA 2012-10-30 13:26:04 EDT
Qualified name is a C++ language construct: a variant of "primary expression". Constructing of expressions is beyond the scope of the Symbols service. The service must return whatever the symbols file contains.
Comment 2 patrice guillemot CLA 2012-10-31 06:52:22 EDT
If the symbol service returns only the "primary expression" name, the symbol service should provide a command to get the namespace of the symbol. This command may also return which language is the symbol (C, C++, Ada, etc).

Regards.
Comment 3 Eugene Tarassov CLA 2012-10-31 12:12:36 EDT
(In reply to comment #2)
> If the symbol service returns only the "primary expression" name, the symbol
> service should provide a command to get the namespace of the symbol. This
> command may also return which language is the symbol (C, C++, Ada, etc).
> Regards.

Namespace of the symbol is ContainerID. Container flag SYM_FLAG_CLASS_TYPE tells if the container is a class. You don't really need to check symbol language, this should work for any language.
Comment 4 Eugene Tarassov CLA 2012-11-06 11:40:26 EST
Changing bug status to WONTFIX
Comment 5 patrice guillemot CLA 2012-11-08 06:04:28 EST
When I retrieve the containerId's context of my method symbol, I don't get the context of the class namespace but the context of the compil unit. I should get the class namespace name "Test".

2012-11-08 11:48:50,103 : ---> C 53 Symbols getContext "@S3.18.C10848.509B8779.5CC.0.0.-1.0.0.0.P7822" 
2012-11-08 11:48:50,112 : <--- R 53 None None  {"ID":"@S3.18.C10848.509B8779.5CC.0.0.-1.0.0.0.P7822","OwnerID":"P7822","UpdatePolicy":0,"Name":"fct5","TypeClass":8,"TypeID":"@P4.0.0.@S3.18.C10848.509B8779.5CC.0.0.-1.0.0.0.P7822","BaseTypeID":"@S4.18.C10848.509B8779.FFFFFFFFFFFFFFFF.0.0.-1.0.0.0.P7822","ContainerID":"@S5.18.C10848.509B8779.B.0.0.-1.0.0.0.P7822","Size":58,"Address":4196580,"Flags":32768,"Class":3} 
2012-11-08 11:48:50,134 : ---> C 54 Symbols getContext "@S5.18.C10848.509B8779.B.0.0.-1.0.0.0.P7822" 
2012-11-08 11:48:50,141 : <--- R 54 None None  {"ID":"@S5.18.C10848.509B8779.B.0.0.-1.0.0.0.P7822","OwnerID":"P7822","UpdatePolicy":0,"Name":"src/cppTest.cpp","TypeID":"@S5.18.C10848.509B8779.B.0.0.-1.0.0.0.P7822","Size":1223,"Class":5}
Comment 6 Eugene Tarassov CLA 2012-11-08 11:48:39 EST
(In reply to comment #5)
> When I retrieve the containerId's context of my method symbol, I don't get
> the context of the class namespace but the context of the compil unit. I
> should get the class namespace name "Test".

This looks like a bug. I will investigate.
Comment 7 Eugene Tarassov CLA 2012-11-13 16:58:08 EST
I have committed a fix.
ContainerID of class members now points to the class object.
Thanks!