From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3391 invoked by alias); 10 May 2007 21:55:06 -0000 Received: (qmail 3381 invoked by uid 22791); 10 May 2007 21:55:05 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 May 2007 21:55:02 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id A638D4B267; Thu, 10 May 2007 16:55:00 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 79AEB4B262; Thu, 10 May 2007 16:55:00 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HmGbE-000139-4d; Thu, 10 May 2007 17:55:00 -0400 Date: Thu, 10 May 2007 21:55:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: Emi SUZUKI , gdb-patches@sourceware.org Subject: Re: [rfc] [2/4] SPU overlay support: The SPU target part Message-ID: <20070510215500.GC3187@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , Emi SUZUKI , gdb-patches@sourceware.org References: <20070508.171059.207583878.emi-suzuki@tjsys.co.jp> <200705081240.l48CeCFu003316@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705081240.l48CeCFu003316@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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-05/txt/msg00174.txt.bz2 On Tue, May 08, 2007 at 02:40:12PM +0200, Ulrich Weigand wrote: > + /* The previous SP is equal to the CFA. */ > + trad_frame_set_value (info->saved_regs, SPU_SP_REGNUM, info->frame_base); > + > + /* The previous PC comes from the link register. In the case > + of overlay return stubs, we unwind to the real return address. */ > + if (trad_frame_addr_p (info->saved_regs, SPU_LR_REGNUM)) > + target_read_memory (info->saved_regs[SPU_LR_REGNUM].addr, buf, 16); > + else > + frame_unwind_register (next_frame, SPU_LR_REGNUM, buf); > + > + if (extract_unsigned_integer (buf + 8, 4) != 0) > + trad_frame_set_value (info->saved_regs, SPU_PC_REGNUM, > + extract_unsigned_integer (buf + 8, 4)); > + else > + trad_frame_set_value (info->saved_regs, SPU_PC_REGNUM, > + extract_unsigned_integer (buf, 4)); (I'm not sure how this ends up detecting an overlay return stub, but I'll take your word for it.) This is clever, but kind of sneaky. We show signal return trampolines and dummy call trampolines, so I'm not sure why it's necessary to hide overlay return stubs. Do you think this is more useful than confusing? -- Daniel Jacobowitz CodeSourcery