Since patch [patch 2/2] ptype should list also class's typedefs http://sourceware.org/ml/gdb-patches/2010-06/msg00313.html GDB does/will display typedefs during `ptype'. It should display also their public/protected/private access control. There is a prerequisite in GCC: class->DW_TAG_typedef is missing DW_AT_accessibility http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44668
This is working since gdb-8.1, was fixed by this commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c191a6875b118fce30e7dc4d9e4bd20eff850270 The output looks like this: ``` (gdb) pt C type = struct C { private: a b; C::g h; C::D i; protected: a d; public: a f; private: typedef int a; protected: typedef int c; public: typedef int e; } ```