This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [4/4] SPU overlay support: Bugfix in remove_breakpoint
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 10 May 2007 17:51:48 -0400
- Subject: Re: [rfc] [4/4] SPU overlay support: Bugfix in remove_breakpoint
- References: <200705072227.l47MR5AZ024929@d12av02.megacenter.de.ibm.com>
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