title: In gdb, I can call some class functions, but others "cannot be resolved". Why?
body: <p>I have not worked on shared pointers yet .. I just know the concept. I'm trying to debug functions in the following c++ class, which stores data of an XML file (read-in via the <a href="http://xerces.apache.org/xerces-c/">xerces</a> library). </p>
  
  <pre><code>// header file
  class ParamNode;
  typedef boost::shared_ptr&lt;ParamNode&gt; PtrParamNode;
  
  class ParamNode : public boost::enable_shared_from_this&lt;ParamNode&gt; {
  public:
     ...
     typedef enum { DEFAULT, EX, PASS, INSERT, APPEND } ActionType;
     bool hasChildren() const;
     PtrParamNode GetChildren();
     PtrParamNode Get(const std::string&amp;  name, ActionType = DEFAULT );
  protected:
     ....
     ActionType defaultAction_;
  }
  </code></pre>
  
  <p>Now if I'm debugging a piece of code in which I have an instance of the pointer to the class <code>ParamNode</code>, and it's called <code>paramNode_</code> </p>
  
  <pre><code>PtrParamNode paramNode_;
  // read xml file with xerces
  paramNode_ = xerces-&gt;CreateParamNodeInstance();
  // now, the xml data is stored in paramNode_.
  std::string probGeo;
  // this works in the code, but not in (gdb)!!
  paramNode_-&gt;Get("domain")-&gt;GetValue("gt",probGeo);
  cout &lt;&lt; probGeo &lt;&lt; endl; // &lt;-- breakpoint HERE
  </code></pre>
  
  <p>Using <code>gdb</code> I'm inspecting the <code>paramNode_</code> object:</p>
  
  <pre><code>(gdb) p paramNode_
  $29 = {px = 0x295df70, pn = {pi_ = 0x2957ac0}}
  (gdb) p *paramNode_.px
  $30 = {
    &lt;boost::enable_shared_from_this&lt;mainclass::ParamNode&gt;&gt; = {weak_this_ = {px = 0x295df70, pn = {pi_ = 0x2957ac0}}}, 
    _vptr.ParamNode = 0x20d5ad0 &lt;vtable for mainclass::ParamNode+16&gt;, 
    ...
    name_= {...}, 
    children_ = {size_ = 6, capacity_ = 8, data_ = 0x2969798},
    defaultAction_ = mainclass::ParamNode::EX, }
  </code></pre>
  
  <p>and print its members:</p>
  
  <pre><code>(gdb) ptype *paramNode_.px
  type = class mainclass::ParamNode : public boost::enable_shared_from_this&lt;mainclass::ParamNode&gt; {
    protected:
      ...
      mainclass::ParamNode::ActionType defaultAction_;
    public:
      bool HasChildren(void) const;
      mainclass::PtrParamNode GetChildren(void);
      mainclass::PtrParamNode Get(const std::string &amp;, mainclass::ParamNode::ActionType);
  </code></pre>
  
  <p>However, I can only call the functions <code>HasChildren</code> or <code>GetChildren</code>, whereas calling <code>Get</code> from <code>gdb</code> results in an error:</p>
  
  <pre><code>(gdb) p (paramNode_.px)-&gt;HasChildren()
   $7 = true
   (gdb) p (paramNode_.px)-&gt;GetChildren()
   $8 = (mainclass::ParamNodeList &amp;) @0x295dfb8: {
     size_ = 6, 
     capacity_ = 8, 
     data_ = 0x29697a8
    }
  (gdb) p (paramNode_.px)-&gt;Get("domain")
   Cannot resolve method mainclass::ParamNode::Get to any overloaded instance
  (gdb) set overload-resolution off
  (gdb) p (paramNode_.px)-&gt;Get("domain")
   One of the arguments you tried to pass to Get could not be converted to what the function wants.
  (gdb) p (paramNode_.px)-&gt;Get("domain", (paramNode_.px).defaultAction_)
   One of the arguments you tried to pass to Get could not be converted to what the function wants.
  </code></pre>
  
  <p>In the code, executing the <code>Get("domain")</code> function works just fine. Why is that? I'm thankful if you include explanations in your answer, due to my limited knowledge of shared pointers.</p>