Go to main content
Oracle® Developer Studio 12.6: Debugging a Program with dbx

Exit Print View

Updated: June 2017
 
 

whatis Command

In native mode, the whatis command prints the type of expression or declaration of type, or the definition of a macro. It also prints OpenMP data-sharing attribute information when applicable.

In Java mode, the whatis command prints the declaration of an identifier. If the identifier is a class, it prints method information for the class, including all inherited methods.

Native Mode Syntax

whatis [-n] [-r] [–m] [+m] name

Print the declaration of the non-type name, or the definition if name is a macro.

whatis -t [-a] [-r] [-u] type

Print the declaration of the type type.

whatis -e [-r] [-u] [-d] expression

Print the type of the expression expression.

where:

name is the name of a non-type or macro.

type is the name of a type.

expression is a valid expression.

macro is the name of a macro.

–a prints only data members for a specified class.

–d shows dynamic type instead of static type.

–e displays the type of an expression.

–n displays the declaration of a non-type. It is not necessary to specify -n; this is the default if you type the whatis command with no options.

–r prints information about base classes and types.

–t displays the declaration of a type.

–u displays the root definition of a type.

–m forces macro expansion even if the dbxenv variable macro_expand is set to off.

+m defeats macro lookup so that any symbols that might have been shadowed by macros are found instead.

The whatis command, when run on a C++ class or structure, provides you with a list of all the defined member functions, the static data members, the class friends, and the data members that are defined explicitly within that class. Undefined member functions are not listed.

Specifying the –r (recursive) option adds information from the inherited classes.

The–d flag, when used with the –e flag, uses the dynamic type of the expression.

    For C++, template-related identifiers are displayed as follows:

  • All template definitions are listed with whatis -t.

  • Function template instantiations are listed with whatis.

  • Class template instantiations are listed with whatis -t.

Java Mode Syntax

whatis identifier

Print the declaration of identifier.

where:

identifier is a class, a method in the current class, a local variable in the current frame, or a field in the current class.