From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19769 invoked by alias); 29 Jul 2011 15:35:37 -0000 Received: (qmail 19679 invoked by uid 22791); 29 Jul 2011 15:35:36 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jul 2011 15:35:13 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6TFZCMp024067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Jul 2011 11:35:12 -0400 Received: from host1.jankratochvil.net (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6TFZ9F6020928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Jul 2011 11:35:11 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p6TFZ726014843; Fri, 29 Jul 2011 17:35:07 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p6TFZ6am014837; Fri, 29 Jul 2011 17:35:06 +0200 Date: Fri, 29 Jul 2011 15:55:00 -0000 From: Jan Kratochvil To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org Subject: Re: [patch 10/12] entryval: @entry values even for references Message-ID: <20110729153506.GF14528@host1.jankratochvil.net> References: <20110718202224.GK30496@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00807.txt.bz2 On Mon, 18 Jul 2011 23:04:06 +0200, Daniel Jacobowitz wrote: > On Mon, Jul 18, 2011 at 4:22 PM, Jan Kratochvil wrote: > > for parameters passed by reference the parameter itself does not change; only > > the referenced (pointed to) value changes.  This would not be caught at all. > > This is a little off topic from the current patch, but if the > reference value is not known, and the reference entry value is known, > should we use the entry value automatically? Since it's supposed to > be read-only. This could potentially hide a corrupted reference > pointer, that's the only downside. IIUC added there: + /* Check if DW_AT_GNU_call_site_data_value cannot be used. If it should be + used and it is not available do not fall back to OUTER_VAL - dereferencing + TYPE_CODE_REF with non-entry data value would give current value - not the + entry value. */ That is if DW_AT_GNU_call_site_data_value could be used and it is not there do cancel any call site computation at all. +gdb_test "p nodataparam@entry" "Cannot resolve DW_AT_GNU_call_site_data_value" "entry_reference: p nodataparam@entry" This works for TYPE_CODE_REF. But still for some: (gdb) print glib_hash_pointer@entry a pretty printer gets into effect which will print the current data values referenced by the (unchanged) @entry pointer; this issue is not solved. It will be in a new patchset resubmit. Thanks, Jan