How to access target of std::tr1::shared_ptr in GDB
ptr->get() not always work.
when i try ptr->get(), gdb complains for: can not resolve method ***:get() to any overloaded instance
I eventually go to /usr/include/ to find the source code of shared_ptr to see the private member.
It turns out to be
ptr._M_ptr
It works for me. Source code works for everyone.
Try with
(gdb) p (*sharedPtr.get())
that function returns the a pointer to the object owned by the smart pointer.