> If that's a concern, we can still keep it, like e.g.: Nah, I don't think it's all that important. The code is fairly compact and self-evident. > Oh, I was only thinking of something along the lines of what Jan did on > gdbserver. That is, something like: Ah, of course! It's a little simpler than what I had in mind. Attached is a new patch which adds the assertion, as well as updates breakpoint_xfer_memory's description to document the assertion. You'll notice that the description says that any overlap should trigger an exception whereas this is not quite accurate. The assertion will only trigger if the (memaddr,len) overlaps with an inserted breakpoint location and the readbuf buffer overlaps with that breakpoint location's shadow_contents buffer. So, technically, we're going to miss situations where we pass the shadow_contents of another breakpoint location. But I didn't feel that it was worth the complication in the explanation. What do you think? I think that you also might prefer if I remove all the changes that document the fact that the read buffer should not be a shadow_contents, and just document this in one place. I will do that next. I am just sending this patch now, to have a trace of the patch before I undo some of my changes. Thanks, -- Joel