Re: [RFA/RFC 3] Remove hardware break and watchpoints at program exit.

Eli Zaretskii
2002-01-13T08:31:38Z

On 12 Jan 2002, Mark Kettenis wrote:

> Those functions shouldn't be called when there is no debuggee. I
> suspect that there is something wrong with the hardware
> breakpoint/watchpoint implementation at a much higher level.

The problem, IMHO, is that GDB's application level doesn't tell the
target-specific low-end that it's time to clean up the watchpoint
related data structures. The DJGPP port uses mourn_inferior to do
that, but this might not be a good general solution, especially since
so many popular targets use the generic version of mourning.

I think we need to have code that explicitly cleans up watchpoints
when the debuggee exits.