From: Simon Marchi <simon.marchi@polymtl.ca>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] (Windows) remove thread notification for main thread of inferior
Date: Mon, 11 Feb 2019 03:21:00 -0000 [thread overview]
Message-ID: <72558bcdf9f15fa3d1c569cc1c689996@polymtl.ca> (raw)
In-Reply-To: <20190210132204.6139-1-brobecker@adacore.com>
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
next prev parent reply other threads:[~2019-02-11 3:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-10 13:22 Joel Brobecker
2019-02-11 3:21 ` Simon Marchi [this message]
2019-02-12 11:25 ` Joel Brobecker
2019-02-12 14:00 ` Simon Marchi
2019-02-14 3:16 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72558bcdf9f15fa3d1c569cc1c689996@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).