From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6798 invoked by alias); 18 Oct 2007 19:10:57 -0000 Received: (qmail 6745 invoked by uid 22791); 18 Oct 2007 19:10:56 -0000 X-Spam-Check-By: sourceware.org Received: from new-tully.CS.Berkeley.EDU (HELO new-tully.CS.Berkeley.EDU) (128.32.153.206) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Oct 2007 19:10:53 +0000 Received: from new-tully.CS.Berkeley.EDU (localhost [127.0.0.1]) by new-tully.CS.Berkeley.EDU (8.13.8+Sun/8.13.8) with ESMTP id l9IJAkHs008578; Thu, 18 Oct 2007 12:10:46 -0700 (PDT) Message-Id: <200710181910.l9IJAkHs008578@new-tully.CS.Berkeley.EDU> To: Douglas Evans cc: gdb@sourceware.org Subject: Re: print/x on references Reply-To: Hilfinger@CS.Berkeley.EDU In-reply-to: Your message of Thu, 18 Oct 2007 10:45:14 -0700. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8574.1192734646.1@new-tully.CS.Berkeley.EDU> Date: Thu, 18 Oct 2007 19:10:00 -0000 From: Paul Hilfinger Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00152.txt.bz2 > > > 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