From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9802 invoked by alias); 13 Nov 2006 12:27:51 -0000 Received: (qmail 9721 invoked by uid 22791); 13 Nov 2006 12:27:50 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Nov 2006 12:27:44 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id kADCRfWQ064884 for ; Mon, 13 Nov 2006 12:27:41 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id kADCUspM3031218 for ; Mon, 13 Nov 2006 13:30:54 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id kADCRepZ032405 for ; Mon, 13 Nov 2006 13:27:40 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id kADCRe28032402; Mon, 13 Nov 2006 13:27:40 +0100 Message-Id: <200611131227.kADCRe28032402@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 13 Nov 2006 13:27:40 +0100 Subject: Re: [RFA][3/5] New port: Cell BE SPU (the port itself) To: drow@false.org (Daniel Jacobowitz) Date: Mon, 13 Nov 2006 12:27:00 -0000 From: "Ulrich Weigand" Cc: mark.kettenis@xs4all.nl (Mark Kettenis), gdb-patches@sourceware.org In-Reply-To: <20061112221146.GA24918@nevyn.them.org> from "Daniel Jacobowitz" at Nov 12, 2006 05:11:46 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00096.txt.bz2 Daniel Jacobowitz wrote: > On Sun, Nov 12, 2006 at 10:41:34PM +0100, Mark Kettenis wrote: > > I think that what you really want is a Linux powerpc native configuration > > that can debug both normal powerpc code and spu code. That'd mean adding > > spu-linux-nat.c to config/powerpc/linux.mh. But I suppose that doesn't > > really work right now. But could we make that work? > > In theory yes - but I'm not quite sure how. You'd have more than one > target that could take control when you said "run" and for Cell I think > you'd have to disambiguate based on the architecture of the file. But > Ulrich said they had more patches that weren't ready for mainline and I > bet some of them make this nicer :-) Since really you would want to > debug both at once. Yes, exactly. It's not just a matter of checking the executable file architecture; a single process can have threads executing SPU code at the same as other threads executing PowerPC code. I have a set of patches that does appear to work so far; it is based primarily on switching current_gdbarch on thread switch. However, there's still some work to be done before this is in a shape suitable for mainline inclusion. Therefore I'd hoped it would be possible to get the SPU-only port accepted first, since this is in itself already quite useful. > I guess what really is throwing us here is the use of "nat". Isn't > this really more like one of the custom remote-foo.c targets than a > native target? It just happens to be implemented using PowerPC/Linux > kernel facilities spelled "ptrace" and some poking around in a PowerPC > executable in order to implement "run". The ptrace facilities don't > seem to be used much to talk to the SPU; new files in /proc are used > instead. It's forking and running a PowerPC executable until it makes > a special SPU-related syscall, and then it starts talking to the SPU. I'll have a look at the remote-foo targets. Is it just more or less just a matter of renaming the file, or are there significant differences? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com