From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15769 invoked by alias); 23 Oct 2003 21:02:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15758 invoked from network); 23 Oct 2003 21:02:24 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 23 Oct 2003 21:02:24 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D13C42B89; Thu, 23 Oct 2003 17:02:24 -0400 (EDT) Message-ID: <3F9841E0.5080700@redhat.com> Date: Thu, 23 Oct 2003 21:02:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa:ppc64] Use target in convert_from_func_ptr_addr References: <3F9730C3.1040308@redhat.com> <1031023160017.ZM13795@localhost.localdomain> <3F980124.6050409@redhat.com> <1031023171155.ZM14125@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00704.txt.bz2 > On Oct 23, 12:26pm, Andrew Cagney wrote: > > >> > On Oct 22, 9:37pm, Andrew Cagney wrote: >> > >> > > >> >> The attached rewrites the PPC64 GNU/Linux convert_from_func_ptr_addr >> >> method so that it makes use of the explicit "struct target_ops" >> >> parameter I recently added (previously it was indirectly using >> >> current_target). > >> > >> > >> > IMO, this version of the code is harder to read than the old version. If you want I can add a wrapper method, reducing the actual change to just the modification of: - return read_memory_unsigned_integer (addr, 8); to: + return get_target_memory_unsigned (targ, addr, 8); >> > Can you explain what using an explicit `struct target_ops'' parameter >> > buys us? > >> >> By using the explicit "struct target_ops", I've eliminated the >> assumption that the _single_ _global_ current_target contains the >> function descriptor. > > > Yes. But what does this buy us? I.e, what will we be able to do after > this patch that we couldn't do before? The ability to apply this architecture method to an arbitrary target instance? Sorry, but I'm afraid that I'm missing something in your question. Andrew