This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]