From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5075 invoked by alias); 24 Jul 2006 19:41:08 -0000 Received: (qmail 5066 invoked by uid 22791); 24 Jul 2006 19:41:08 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 24 Jul 2006 19:41:06 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1G56IY-0003vM-BF; Mon, 24 Jul 2006 15:41:02 -0400 Date: Mon, 24 Jul 2006 19:41:00 -0000 From: Daniel Jacobowitz To: =?iso-8859-1?Q?Fr=E9d=E9ric?= Riss Cc: gdb-patches@sources.redhat.com Subject: Re: =?iso-8859-1?B?W1BBVENIXaBNYWs=?= =?iso-8859-1?Q?e?= register_valid_p signed Message-ID: <20060724194102.GC13612@nevyn.them.org> Mail-Followup-To: =?iso-8859-1?Q?Fr=E9d=E9ric?= Riss , gdb-patches@sources.redhat.com References: <1153516549.5122.66.camel@funkylaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1153516549.5122.66.camel@funkylaptop> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00340.txt.bz2 On Fri, Jul 21, 2006 at 11:15:49PM +0200, Frédéric Riss wrote: > The attached patch fixes this by declaring register_valid_p as a signed > char array and also adds a comment (partly copied from the > register_cached one). Oops! Thank you. This patch is OK - you have write access, I think? > While reading the code to find this out, I also noticed a little > inconsistency. I don't really think this deserves a fix, but I thought > I'd mention it anyway. > Most people are using dwarf2 as debug format today, and with dwarf2 > symbols in registers are marked as LOC_COMPUTED. The read_var_value > function will return NULL when a dwarf2 computed symbol needs access to > a register that the target has marked as unavailable (register_valid_p < > 0). This will make functions like print_frame_args output something like > "my_var=???" for the unavailable var value. > Yet if you use another debug format that marks the symbol as > LOC_REGISTER, read_var_value will call error() if it can't read the > register which is a lot more radical than the above behaviour. You're right, this is a bit strange. Feel free to fix it if you like; otherwise I'm sure it will eventually go away next time that code is cleaned up thoroughly. :REVIEWMAIL: -- Daniel Jacobowitz CodeSourcery