Re: [RFA]: Modified Watchthreads Patch

Eli Zaretskii
2004-12-11T16:48:25Z

> Date: Sat, 11 Dec 2004 15:33:52 +0100 (CET)
> From: Mark Kettenis <kettenis@gnu.org>
> CC: drow@false.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com
>
> Personally I think that it's better to declare watchpoints in
> multi-threaded programs as unsupported. Then add a sane interface for
> debugging threads and watchpoints to the kernel, before revisiting the
> issue in GDB. I mean, it's like the Linux kernel is no longer Open
> Source.

I wasn't aware the situation was that bad, but if it is, I cannot
agree more.

> In addition, proliferation of observers' use will sooner or later
> raise the issue of the order of the observer invocation, since we lack
> a machinery for invoking a series of observers in a controlled manner:
> we cannot control the order of their invocation and we cannot tell GDB
> to stop invoking any additional observers. The current machinery
> assumes that each observer is orthogonal to others in its side
> effects; what if this assumption doesn't hold?
>
> I think we should take a different viewpoint here. The current
> machinery doesn't *assume* that each observer is orthogonal, it's the
> *definition* of the interface.

First, this definition should be spelled out in the documentation.
But even if it is, it's dangerous to rely on programmers working
independently to never step on each other's feet.