The whatis and print commands display information on a class. Use the whatis command to display static information about the classes. Use the print command to view dynamic information about class objects.
The whatis command displays the class type declaration, including the following:
For classes that are derived from other classes, the data members and member functions inherited from the base class are not displayed. Any member functions that are redefined from the base class are displayed.
The print command lets you display the value of data members and static members. Information regarding the public, private, or protected status of class members is not provided, because the debugger relaxes the related access rules to be more helpful to users.
The type signatures of member functions, constructors, and destructors are displayed in a form that is appropriate for later use in resolving references to overloaded functions.
The following example shows the whatis and print commands in conjunction with a class:
(idb) list 43:12
43 // Compound Node - contains integer and float data items
44 //
45 class CompoundNode : public IntNode {
46 public:
47 CompoundNode (float fdata, int idata);
48
49 void printNodeData() const;
50
51 private:
52 float _fdata;
53 };
54
(idb) whatis CompoundNode
class CompoundNode : IntNode {
float _fdata;
CompoundNode(float, int);
virtual void printNodeData(void);
}
(idb) whatis CompoundNode::CompoundNode
CompoundNode::CompoundNode(float, int)
(idb) stop in CompoundNode::printNodeData
[#1: stop in virtual void CompoundNode::printNodeData(void)]
(idb) run
The list is:
Node 1 type is integer, value is 1
[1] stopped at [virtual void CompoundNode::printNodeData(void):109 0x080535fa]
109 cout << " type is compound, value is ";
(idb) print _fdata
12.3450003