Re: [RFA] Fix watchpoints when stepping over a breakpoint

Andrew Cagney
2002-04-05T17:55:33Z

> Also bear in mind that if you have this sequence:
> - write to x
> - other instruction <--- breakpoint here
> You will stop based on the watchpoint, because the watchpoint happens
> first. You'll get a trap just before you would have hit the
> breakpoint. GDB handles this OK, and does report the watchpoint. It's
> only if we expected a trap (single stepping for instance) that this
> does not work. The current failure is "single step over something
> which triggers the watchpoint, landing on something with a breakpoint".
> Without my patch, we detect that we are at an address with a
> breakpoint, and don't even try to check our watchpoints.

I suspect this is a design problem. Blame DECR_PC? The ``stop''
address gets confused with the PC value and the decr's probably screw it.

Andrew