From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12202 invoked by alias); 18 Oct 2007 19:21:14 -0000 Received: (qmail 12190 invoked by uid 22791); 18 Oct 2007 19:21:14 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Oct 2007 19:21:07 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 05A7D982CA; Thu, 18 Oct 2007 19:21:06 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id BC743981F1; Thu, 18 Oct 2007 19:21:05 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IiavX-0008TO-UW; Thu, 18 Oct 2007 15:21:04 -0400 Date: Thu, 18 Oct 2007 19:21:00 -0000 From: Daniel Jacobowitz To: Douglas Evans Cc: Paul Hilfinger , gdb@sourceware.org Subject: Re: print/x on references Message-ID: <20071018192103.GA31401@caradoc.them.org> Mail-Followup-To: Douglas Evans , Paul Hilfinger , gdb@sourceware.org References: <20071018093736.8076A48CB9C@nile.gnat.com> <20071018111644.GA32574@caradoc.them.org> <20071018163012.GA19490@caradoc.them.org> <20071018171114.GA21738@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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/msg00153.txt.bz2 On Thu, Oct 18, 2007 at 10:45:14AM -0700, Douglas Evans wrote: > fwiw, > 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). > > Given that, to me "p &cref" -> (c*) and not (c**) follows naturally > out of c++ syntax. Whatever goop we want to add to get at the address > of the object containing the reference is separate. "p &(&cref)" is > the first thing that came to mind and wonderfully it "just worked". > One may want a different (or additional) way to achieve this of > course, but it should not break "p &cref" -> (c*). That is an excellent explanation. You've convinced me. Either of you want to write us some testcases for the testsuite? -- Daniel Jacobowitz CodeSourcery