User forums > Using Code::Blocks
Watching smart pointers
(1/1)
Dahman:
Hello,
How to debug and watch a smart pointer like boost::intrusive_ptr and boost::shared_ptr?
I tried this in gdb_types.script:
....
function Evaluate_SharedPtr(type, ptr, start, count)
{
local result = _T("output ") + _T("(*") + ptr + _T(".get())");
return result;
}
....
and work fine, but not if the smart pointer is an object of a class that contain another smart pointer (I see just the memory adress of the second pointer)
Thanks for any help.
Regards
tiwag:
you can add a custom watch
eg.
*(classpointer->memberpointer)
Dahman:
Tiwag, thank you for the fast replay, I will try it.
Dahman
Navigation
[0] Message Index
Go to full version