It works for single-word types: (gdb) info line htab_t Line number 144 is out of range for "./../include/hashtab.h". (gdb) list htab_t 144 typedef struct htab *htab_t; But not for multi-word types: (gdb) info line struct symbol Function "struct" not defined. (gdb) list struct symbol Function "struct" not defined. Despite: (gdb) ptype struct symbol type = struct symbol { struct general_symbol_info ginfo; [...] } I believe `list', `info line' (others?) should not take just the first word.
It's strange that they work for types at all. This is probably an artifact of the VAR_DOMAIN stuff, where some types appear in the same namespace as variables and functions. "list" and "info line" accept a linespec. I do think it would be good if this worked, though after bug #30164 it will be a little harder. Perhaps we could add a new "also try a type" flag to linespec, so it could fall back on finding a type.