From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3636 invoked by alias); 8 Aug 2007 17:10:46 -0000 Received: (qmail 3526 invoked by uid 22791); 8 Aug 2007 17:10:45 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 17:10:42 +0000 Received: (qmail 23592 invoked from network); 8 Aug 2007 17:10:40 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Aug 2007 17:10:40 -0000 To: "Ulrich Weigand" Cc: drow@false.org (Daniel Jacobowitz), deuling@de.ibm.com (Markus Deuling), gdb-patches@sourceware.org (GDB Patches) Subject: Re: [rfc] Wrap addresses in spu-gdb References: <200708081411.l78EBqII022771@d12av02.megacenter.de.ibm.com> From: Jim Blandy Date: Wed, 08 Aug 2007 17:10:00 -0000 In-Reply-To: <200708081411.l78EBqII022771@d12av02.megacenter.de.ibm.com> (Ulrich Weigand's message of "Wed, 8 Aug 2007 16:11:51 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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: 2007-08/txt/msg00144.txt.bz2 "Ulrich Weigand" writes: > Daniel Jacobowitz wrote: >> On Wed, Aug 08, 2007 at 08:44:29AM +0200, Markus Deuling wrote: >> > + if (target_has_registers && target_has_stack && target_has_memory >> > + /* FIXME: Currently needed for dwarf2_read_address to work. */ >> > + && type != builtin_type_uint32) >> >> I think that you shouldn't commit a patch with this hack in it. >> It looks very fragile. > > Agreed. Markus, this is a special hack for the combined PPE/SPE > debugger, it shouldn't be necessary for the SPU-standalone (and > mainline) version. > > I'll have to look into fixing the underlying issue cleanly when > merging the combined debugger ... There seem to be a number of cases where conversions between addresses and pointers require live values from other registers --- for example, when a pointer's bits are augmented with bits from some system register, like a segment base register. I'd want to work in the context of real-world examples, but it might be a good idea to introduce frame_and_pointer_to_address and frame_and_address_to_pointer, and use them where they make sense. Using such functions, clipping SPE addresses using the LSLR register could be carried out in a reasonable way.