Re: patch for invalid hw breakpoints

Nathan Sidwell
2006-06-02T07:26:39Z

Daniel Jacobowitz wrote:
> On Thu, Jun 01, 2006 at 06:45:32PM +0100, Nathan Sidwell wrote:
>
>>The remote stub can deal with this, but the functionality detection code in
>>remote.c cannot. In particular this bit of code in
>>remote_remove_watchpoint triggers because the just attempted
>>remote_insert_watchpoint call has now set the support field to
>>PACKET_DISABLE.
>
>
> Oh. So, more like this:
>
> -> Z2,11110000
> <- [empty: I don't support that.]
> tries to send: -> z2,11110000
> [internal error, I already know I don't support that!]
>
> That could be changed in remote.c, but not removing what we didn't
> insert does seem cleaner.

That was the other alternative, of tracking Z & z packet functionality
separately, but as you say not removing what we didn't insert seems cleaner.

I suspect that there's actually another failure mode which my patch fixes and it
would be hard for remote.c to fix, and that is when the watched expression
inserts more than one hardware watchpoint. The current code will attempt to
insert multiple hw watchpoints, and remote.c will signal an internal error on
inserting the second one

-> Z2,11110000
<- [empty: I don't support that.]
tries to send: -> Z2,abcdef
[internal error, I already know I don't support that!]

nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk