From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11094 invoked by alias); 5 Oct 2011 01:09:06 -0000 Received: (qmail 11086 invoked by uid 22791); 5 Oct 2011 01:09:06 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Oct 2011 01:08:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 011852BABF6; Tue, 4 Oct 2011 21:08:50 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gOPRuUEixlRJ; Tue, 4 Oct 2011 21:08:49 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B87622BABB0; Tue, 4 Oct 2011 21:08:49 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 39DCE145615; Tue, 4 Oct 2011 21:08:43 -0400 (EDT) Date: Wed, 05 Oct 2011 01:09:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [RFA] fetch result of locdesc expressions as integer (not address) Message-ID: <20111005010843.GN19246@adacore.com> References: <20111004193739.GM19246@adacore.com> <201110042305.p94N5qTW011596@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110042305.p94N5qTW011596@d06av02.portsmouth.uk.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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-10/txt/msg00122.txt.bz2 > Well, maybe they should, but right now they don't, and neither does > your patch add any such correction. The point I was trying to make > is that therefore, your patch as it is, while fixing one class of > bugs on some targets, may simultaneously introduce a different class > of bugs on other targets. I'm not sure this is a good idea ... I understand, but I'm just restoring the previous behavior which, I believe was changed unintentionally. It's working fine for instance on AVR, where the distinction makes a difference, so we're not doing so bad. Additionally, I tested this patch against the testsuite which does include a test for the problem that Jan wanted to fix. BTW: Perhaps part of the reason why it is working OK right now is that we do the integer-to-address adjustment only for certain type codes. See value_as_address: if (TYPE_CODE (value_type (val)) != TYPE_CODE_PTR && TYPE_CODE (value_type (val)) != TYPE_CODE_REF && gdbarch_integer_to_address_p (gdbarch)) return gdbarch_integer_to_address (gdbarch, value_type (val), value_contents (val)); -- Joel