From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16253 invoked by alias); 4 Oct 2011 19:38:03 -0000 Received: (qmail 16195 invoked by uid 22791); 4 Oct 2011 19:38:02 -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; Tue, 04 Oct 2011 19:37:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 811492BB1EA; Tue, 4 Oct 2011 15:37:46 -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 P2kYbr+grLsa; Tue, 4 Oct 2011 15:37:46 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 39BD42BB1E5; Tue, 4 Oct 2011 15:37:46 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id EF3C4145615; Tue, 4 Oct 2011 15:37:39 -0400 (EDT) Date: Tue, 04 Oct 2011 19:38: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: <20111004193739.GM19246@adacore.com> References: <1317676214-7683-1-git-send-email-brobecker@adacore.com> <201110041931.p94JVr9R028400@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110041931.p94JVr9R028400@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/msg00113.txt.bz2 > It seems the problem is a bit more complex: different callers > of decode_locdesc have different expectations. As the comment > before the routine says: > > NOTE drow/2003-11-18: This function is called in two situations > now: for the address of static or global variables (partial symbols > only) and for offsets into structures which are expected to be > (more or less) constant. That's true, but my interpretation was the callers of decode_locdesc should know which they expect it to me, and thus know to apply the integer_to_address correction. > Maybe we ought to have two routines (or a parameter) here. I think this is a good idea. But that's a bit beyond this patch. We could add an extra routine, and implement the two using a parameter. And then slowly transition all the callers that read this as an address to use the new one. -- Joel