Re: [RFA 2/2][master only] gdb/windows-nat.c: Get rid of main_thread_id global

Eli Zaretskii
2019-04-18T12:52:42Z

> Date: Wed, 17 Apr 2019 15:17:29 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> Personally, I feel the other way, especially since we always get
> all sorts of random temporary thread notifications polutting the
> output, that I don't mind the extra notification. And that way,
> I know when each thread is actually terminated, and with what
> error code.
>
> But if you and others feel differently, I can switch my approach:
>
> - patch #1 (master+8.3): Just fix the crash, and nothing more.
>
> This means that, on 8.3, thread creation and exit notifications
> can be slightly off; this is considered an acceptable known
> problem, and is not a regression.
>
> This is actually what we've put in AdaCore's GDB as a first
> step to see we had any issue after that, and we did not.
>
> - patch #2 (master only): Remove uses of the global
>
> But we keep the filtering of the "main" thread. We still
> the known problem that the thread-exit notifications might
> be silenced for the wrong thread. Not a regression.
>
> - patch #3 (master only): Tag the main thread, and silence
> the thread-exit notification of the thread that got tagged.
> Depending on the implementation, this patch would potentially
> be acceptable for 8.3, but might need extra work to apply.
> I think we've had enough problems with 8.3 as it is, I don't
> want to add more things to do, so I vote OUT for 8.3.
>
> I don't think I have time for that before the weekend or next week,
> though.

Mine is just one opinion. I think we should solicit opinions from
others before you invest all that effort. If I'm the only one who is
bothered by your original proposal, I think you should go ahead and
push it.

Thanks.