Why gdb casting is not working?

I just ran in to similar issue, and, from a colleague of mine, I learnt that you need to provide the namespace that the class belongs to within a single quotes as following:

(gdb) p ('MyScope::MyClass'*) ptr; 

Leave a Comment