From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26875 invoked by alias); 21 Nov 2006 20:40:09 -0000 Received: (qmail 26864 invoked by uid 22791); 21 Nov 2006 20:40:06 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 21 Nov 2006 20:39:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1GmcPF-0001HQ-Ax; Tue, 21 Nov 2006 15:39:49 -0500 Date: Tue, 21 Nov 2006 20:40:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [RFA][3/5] New port: Cell BE SPU (the port itself) Message-ID: <20061121203949.GA4775@nevyn.them.org> Mail-Followup-To: Ulrich Weigand , Mark Kettenis , gdb-patches@sourceware.org References: <23022.82.92.89.47.1163871270.squirrel@webmail.xs4all.nl> <200611212022.kALKMFEQ017751@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200611212022.kALKMFEQ017751@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2006-11/txt/msg00232.txt.bz2 On Tue, Nov 21, 2006 at 09:22:15PM +0100, Ulrich Weigand wrote: > Suggestions? The cleanest way I could think of would be to actually > extend the to_attach, to_detach, to_create_inferior, and to_mourn_inferior > callbacks with an explict struct target_ops * parameter. Yes, that's the right way to do it. > However, that change would have extensive effects throughout GDB; many > of the changes are mechanical, but some appear non-trivial, like the > way the various thread stratum targets call back to the "beneath" target > using saved function pointers ... Yes, that's the reason it hasn't been done yet :-) When you have the real target_ops, you can find the target beneath it to invoke fairly easily (there are examples of this in e.g. to_xfer_partial). Then some of the ugly saved function pointers can be removed. As for the ones which replace a member of a target_ops vector with another and then save the old one, I'm not sure what to pass to those. (I've not looked at your actual patch from this message.) -- Daniel Jacobowitz CodeSourcery