From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9729 invoked by alias); 18 Feb 2010 13:43:54 -0000 Received: (qmail 9720 invoked by uid 22791); 18 Feb 2010 13:43:54 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Feb 2010 13:43:49 +0000 Received: (qmail 10289 invoked from network); 18 Feb 2010 13:43:47 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Feb 2010 13:43:47 -0000 Date: Thu, 18 Feb 2010 13:43:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb@sourceware.org Subject: Re: CORE_ADDR representation Message-ID: <20100218134345.GB17163@caradoc.them.org> Mail-Followup-To: Mark Kettenis , gdb@sourceware.org References: <20100218044416.GA19485@caradoc.them.org> <201002181017.o1IAHDdS030942@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002181017.o1IAHDdS030942@glazunov.sibelius.xs4all.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00124.txt.bz2 On Thu, Feb 18, 2010 at 11:17:14AM +0100, Mark Kettenis wrote: > Perhaps we should introduce a function to "normalize" addresses (mask > off high-bits or sign extend) that we call in places that need it? > It'd be a no-op for a N-bit debugger debugging an N-bit target, so > you'd be able to call it unconditionally. That should clear away > quite a bit of clutter. That does sound better than the status quo. I worry that we'll have otherwise the same trouble with figuring out places that 'need' it... Hmm. I wonder if we could use a static analysis tool for this. It sounds like a classic example of a static problem. -- Daniel Jacobowitz CodeSourcery