print/x on references
Paul Hilfinger
hilfingr@new-tully.CS.Berkeley.EDU
Thu Oct 18 19:10:00 GMT 2007
> > > 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
More information about the Gdb
mailing list