This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11500] gdb does not support smart pointers


------- Additional Comments From swagiaal at redhat dot com  2010-04-14 20:31 -------
Here is a better example (Without the template)

#include "stdio.h"

class MyType{
  public:
  void foo(){
    printf("I am foo\n");
  }
};

class SmartPointer{
  MyType* p;
 public:
  SmartPointer(MyType *pointer){
    p = pointer;
  }

  MyType* operator->(){
    return p;
  }

};


int main(){
  MyType mt;

  SmartPointer sp(&mt);
  sp->foo();

  return 0;
}

(gdb) p sp->foo()
Couldn't find method SmartPointer::foo



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=11500

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]