Sun Studio 12: Debugging a Program With dbx

print Expressions

Use the print command to evaluate a function instantiation or a member function of a class template:.

(dbx) print iarray.getlength()
iarray.getlength() = 5

Use print to evaluate the this pointer.

(dbx) whatis this
class Array<int> *this;
(dbx) print *this
*this = {
    length = 5
    array   = 0x21608

For more information, see print Command.