On Fri, Apr 20, 2007 at 01:03:07PM -0500, Jason Wessel wrote:
> At this point the program is trashed on the second time through the loop 
> because the translated block with the breakpoint op code was executed instead 
> of being flushed and translated with the correct original
> instruction.

I have an idea.  When I was talking to Paul about breakpoints
recently, I noticed something very strange in the ARM port: it
continues to disassemble the instruction under a breakpoint after
generating the debug op.  This is a waste of CPU and memory, so I
tried taking it out - but he told me that if I did that, things would
go wrong because the size of the tb would be too small.  We'd try to
flush the tb at the breakpoint location, but it wouldn't seem to cover
there.

MIPS doesn't do that extra disassembly because it has a goto instead
of a break from the nested loop.  What happens if you add an extra +1
to the translation block size if there's a breakpoint, in 
target-mips/translate.c?

-- 
Daniel Jacobowitz
CodeSourcery


Reply via email to