Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] find binding with qualified name

How can I get the correct binding with a full qualified name?
Let's illustrate with an example:

class myClass {
public:
   myClass();
   virtual ~myClass();

   std::string getField() { return _field; }
   void setField(std::string str) { _field = str; }

private:
   std::string _field;
};

If I call IIndex.findBindings with "myClass" I only get the class declaration. But if I call it with myClass::~myClass, or simply ~myClass, I got nothing.

Is there a method that can take a full qualified name (e.g. myClass::~myClass) and returns the corresponding binding ? I need it to navigate from Ada to C++. From Ada, I get an ABI symbol (e.g. _ZN7myClassD1Ev) and with c++filt I retrieve the full qualified name (e.g. myClass::~myClass() ). Then I ask the IIndex with findBindings. It works with C but not with C++.

Any idea?

--
Nicolas


Back to the top