The whatis and print commands display information on instances of classes (objects). Use the whatis command to display the class type of an object. Use the print command to display the current value of an object.
You can also display individual object members using the member access operators, period (.) and right arrow (->), in a print command.
You can use the scope resolution operator (::) to refer to global variables, to refer to hidden members in base classes, to explicitly refer to a member that is inherited, or to name a member hidden by the current context.
When you are in the context of a nested class, you must use the scope resolution operator to access members of the enclosing class.
The following example shows how to use the whatis and print commands to display object information:
(idb) whatis this
const class CompoundNode* const this
(idb) whatis *this
class CompoundNode : IntNode {
float _fdata;
CompoundNode(float, int);
virtual void printNodeData(void);
}
(idb) print *this
class CompoundNode {
_fdata = 12.3450003;
_data = 2; // class IntNode
_nextNode = 0x805e620; // class IntNode::Node
}
(idb) print _fdata, _data
12.3450003 2
(idb) print this->_fdata, this->_data
12.3450003 2