From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1765 invoked by alias); 24 Jul 2006 20:17:32 -0000 Received: (qmail 1757 invoked by uid 22791); 24 Jul 2006 20:17:31 -0000 X-Spam-Check-By: sourceware.org Received: from smtp4-g19.free.fr (HELO smtp4-g19.free.fr) (212.27.42.30) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 24 Jul 2006 20:17:30 +0000 Received: from [192.168.0.10] (pas38-3-82-229-199-15.fbx.proxad.net [82.229.199.15]) by smtp4-g19.free.fr (Postfix) with ESMTP id 000864F389; Mon, 24 Jul 2006 22:17:27 +0200 (CEST) Subject: Re: =?ISO-8859-1?Q?=5BPATCH=5D=A0Make?= register_valid_p signed From: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Riss To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com In-Reply-To: <20060724194102.GC13612@nevyn.them.org> References: <1153516549.5122.66.camel@funkylaptop> <20060724194102.GC13612@nevyn.them.org> Content-Type: text/plain; charset=utf-8 Date: Mon, 24 Jul 2006 20:17:00 -0000 Message-Id: <1153772237.4946.8.camel@funkylaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 8bit 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/msg00348.txt.bz2 Le lundi 24 juillet 2006 à 15:41 -0400, Daniel Jacobowitz a écrit : > 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? Thanks! I commited it. > > 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. I you think it's worth it, I'll give it a try once I get some time. Should just be a matter of some s/error(.*)/return NULL/