This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: fix PR c++/9197


>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> For my own education, setting aside however broken gdb currently is,
Doug> what's the right answer?
Doug> IOW, how is ptype *defined* to work?

I don't think it has a definition.

I suppose ideally ptype ought to work purely symbolically.  That is,
without reference to the target's state.  However, this isn't what it
actually does, and AFAIK nobody has ever complained about this.

Doug> class s { public: int x; };
Doug> int s;

Doug> Also, for reference sake,
Doug> (gdb) p s
Doug> Attempt to use a type name as an expression

Doug> How do I print s the variable?  [maybe there's a way but it escapes me]

There's a PR about this.
I'm not sure there is a way.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]