This is the mail archive of the gdb@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: print/x on references


 > > > To find the address of the pointer to the object I was thinking "p
 > > > &(&x)"...

 > > That is such a horrible abuse of C++ that I didn't even think to try
 > > it....
 > 
 > I think the expression evaluator should work as the language does (as
 > much as possible).  And once it does that then thought is given to
 > whatever extensions are needed to accomplish things not possible with
 > the language syntax.
 > e.g. "p cut-n-pasted-expression-from-source" should "just work" (to
 > some reasonable extent).

Or, to put it rhetorically, it is fitting that &(&x) (for x of type
Glorp&) is a horrible abuse of C++, since in C++ the type Glorp&* does
not exist!

PNH


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