From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2381 invoked by alias); 10 May 2007 21:52:00 -0000 Received: (qmail 2356 invoked by uid 22791); 10 May 2007 21:51:57 -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:51:51 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 26B234B267; Thu, 10 May 2007 16:51:49 -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 09E5D4B262; Thu, 10 May 2007 16:51:49 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HmGY8-000128-NT; Thu, 10 May 2007 17:51:48 -0400 Date: Thu, 10 May 2007 21:52:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc] [4/4] SPU overlay support: Bugfix in remove_breakpoint Message-ID: <20070510215148.GB3187@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <200705072227.l47MR5AZ024929@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705072227.l47MR5AZ024929@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/msg00173.txt.bz2 On Tue, May 08, 2007 at 12:27:05AM +0200, Ulrich Weigand wrote: > However, for *software* breakpoints this looks definitely > wrong to me. So the patch below restores the old behaviour > for those: the shadow contents are restored only if the > section is still mapped. > > Any comments? I plan on committing this after the rest of > the SPU overlay support patches. I think that there's two reasonable overlay manager behaviors, depending on the different sorts of systems that might want overlays. If the source of the overlay comes from ROM, or from some other read-only source, then your patch is clearly right. If it comes from RAM, then some systems may save the overlay (e.g. if it contained data) - and thus save the breakpoint. I can't see any way around this unless the overlay manager warns GDB before it unmaps the breakpoint. WDYT? I'm not opposed to your patch, though, since SPU is probably the only current user of GDB's overlay support. -- Daniel Jacobowitz CodeSourcery