From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29176 invoked by alias); 18 Oct 2007 17:03:37 -0000 Received: (qmail 29123 invoked by uid 22791); 18 Oct 2007 17:03:13 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Oct 2007 17:03:07 +0000 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id l9IH33MO023335 for ; Thu, 18 Oct 2007 10:03:03 -0700 Received: from ug-out-1314.google.com (ugs30.prod.google.com [10.66.19.30]) by zps37.corp.google.com with ESMTP id l9IH31Sg017957 for ; Thu, 18 Oct 2007 10:03:02 -0700 Received: by ug-out-1314.google.com with SMTP id 30so574364ugs for ; Thu, 18 Oct 2007 10:03:01 -0700 (PDT) Received: by 10.67.19.17 with SMTP id w17mr2054460ugi.1192726981401; Thu, 18 Oct 2007 10:03:01 -0700 (PDT) Received: by 10.66.242.13 with HTTP; Thu, 18 Oct 2007 10:03:01 -0700 (PDT) Message-ID: Date: Thu, 18 Oct 2007 17:03:00 -0000 From: "Douglas Evans" To: "Douglas Evans" , "Paul Hilfinger" , gdb@sourceware.org Subject: Re: print/x on references In-Reply-To: <20071018163012.GA19490@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071018093736.8076A48CB9C@nile.gnat.com> <20071018111644.GA32574@caradoc.them.org> <20071018163012.GA19490@caradoc.them.org> 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/msg00148.txt.bz2 On 10/18/07, Daniel Jacobowitz wrote: > On Thu, Oct 18, 2007 at 09:04:48AM -0700, Douglas Evans wrote: > > (gdb) p/x x -> prints same as $4 but in hex > > (gdb) p &x -> prints pointer (e.g. "$5 = (Glorp *) 0x8049850") > > > > $0.02 > > And then there's no way to find the address of the reference? To find the address of the pointer to the object I was thinking "p &(&x)". It works, at least in the simple example I used to experiment with. Am I misunderstanding your point? [quite likely - apologies]