This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix PR c++/9197
- From: Doug Evans <dje at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 19 Mar 2013 10:20:27 -0700
- Subject: Re: RFC: fix PR c++/9197
- References: <87d2xcvjny dot fsf at fleche dot redhat dot com> <20130203052021 dot GA16948 at host2 dot jankratochvil dot net> <87wquo11ej dot fsf at fleche dot redhat dot com> <20130206195920 dot GA2797 at host2 dot jankratochvil dot net> <87y5dxpryn dot fsf at fleche dot redhat dot com> <CADPb22QYpJaeUaWT9JZ1hT7+QM-wNBkBq0absFyXQT76zQ=BdA at mail dot gmail dot com>
On Tue, Mar 19, 2013 at 10:12 AM, Doug Evans <dje@google.com> wrote:
> Interestingly, the online help of ptype says nothing about
> expressions, need to fix that.
Blech. Thought I was using top-of-tree, but I wasn't.
(gdb) help ptype
Print definition of type TYPE.
Usage: ptype[/FLAGS] TYPE-NAME | EXPRESSION
Argument may be a type name defined by typedef, or "struct STRUCT-TAG"
or "class CLASS-NAME" or "union UNION-TAG" or "enum ENUM-TAG".
The selected stack frame's lexical context is used to look up the name.
Contrary to "whatis", "ptype" always unrolls any typedefs.
Available FLAGS are:
/r print in "raw" form; do not substitute typedefs
/m do not print methods defined in a class
/M print methods defined in a class
/t do not print typedefs defined in a class
/T print typedefs defined in a class
IWBN to add expressions to the sentence beginning with "Argument may
be ..." though.
[patch to follow]