KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm debugging a C++ program with GDB. I have a pointer to an object of certain class. The pointer is declared to be of some super class which is extended by several sub-classes. There is no fields in the object to specify the precise class type of this object but some virtual functions (e.g. bool is_xxx()) are defined to tell the class type at runtime. Is there some way to tell the precise class type of an object in GDB without calling these virtual functions. Calling such functions in GDB may generate confusing result when the program is multi-threaded.
Tags (comma-separated)
Save Edits
Cancel