Name

ptype

ptype
ptype expression
ptype type-name

Print the full definition of a type. This differs from whatis, in that whatis prints only type names, while ptype gives a full description. With no argument (the first syntax), print the type of the last value in the value history. This is equivalent to ptype $. With expression (the second syntax), print the type of expression. Note that the expression is not evaluated. No operators with side effects (such as ++, or a function call) execute. The third syntax prints the type of type-name, which is either the name of a type or one of the keywords class, enum, struct, or union, followed by a tag. See also whatis.

Get GDB Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.