[rfc] [4/4] SPU overlay support: Bugfix in remove_breakpoint

Daniel Jacobowitz drow@false.org
Thu May 10 21:52:00 GMT 2007


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



More information about the Gdb-patches mailing list