Re: [RFA/commit] (Windows) remove thread notification for main thread of inferior

Simon Marchi
2019-02-11T03:21:20Z

Hi Joel,

I didn't test, but this looks good to me. Two small comments below.

> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
> index 2894b208f58..ae05d889a6a 100644
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -426,9 +426,17 @@ thread_rec (DWORD id, int get_context)
> return NULL;
> }
>
> -/* Add a thread to the thread list. */
> +/* Add a thread to the thread list.
> +
> + PTID is the ptid of the thread to be deleted.
> + H is its Windows handle.
> + TLB is its thread local base.
> + MAIN_THREAD_P should be true if the thread to be deleted is
> + the main thread, false otherwise. */

This comment about the function that adds threads talks about things to
be deleted.

> +
> static windows_thread_info *
> -windows_add_thread (ptid_t ptid, HANDLE h, void *tlb)
> +windows_add_thread (ptid_t ptid, HANDLE h, void *tlb,
> + bool main_thread_p = false)

Just a nit: in this case, where there are very few callers to update, I
would opt for not using a default parameter value. It's probably just a
personal preference, but I find it clearer to have the explicit value at
the call site.

Simon