Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Kamil Rytarowski <n54@gmx.com>, John Baldwin <jhb@FreeBSD.org>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] Implement nbsd_nat_target::thread_alive
Date: Wed, 25 Mar 2020 17:08:44 -0400	[thread overview]
Message-ID: <e384ddfc-1de5-1d8f-4781-4a35d758d89f@simark.ca> (raw)
In-Reply-To: <3349e5b4-d936-4597-7afe-4cef27216c93@gmx.com>

On 2020-03-25 5:01 p.m., Kamil Rytarowski wrote:
> On 25.03.2020 21:42, John Baldwin wrote:
>> Given that you have nearly identical code both here and in the thread_name
>> method in your other patch, perhaps it makes sense to have a single
>> "gdb::unique_xmalloc_ptr <struct kinfo_lwp> fetch_kinfo_lwp(ptid_t ptid)"
>> helper function that the other routines could share?  Perhaps instead of
>> just returning the pointer to the array of structures it could take a lamda
>> function that is invoked on the matching 'kl' instance with the correct lwp?
>>
> 
> I can do it. I will submit these two patches in one go. I will also add
> a third similar function to list threads within a process.
> 
> Normally, I would go for PT_LWPSTATUS, but it is available since NetBSD
>> 10 and for the time being sysctl(3) is more portable.

And let me mention the same thing I've told John :).  Please add a meaningful
commit message, explaining why you do this change.  It's easy to see _what_
it does, but not _why_ you needed to do it.  Does it enable some feature, does
it fix some test case, something else?  What impact does it have?

Simon


  reply	other threads:[~2020-03-25 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 19:36 Kamil Rytarowski
2020-03-25 20:42 ` John Baldwin
2020-03-25 21:01   ` Kamil Rytarowski
2020-03-25 21:08     ` Simon Marchi [this message]
2020-03-26  4:00       ` Kamil Rytarowski

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=e384ddfc-1de5-1d8f-4781-4a35d758d89f@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=n54@gmx.com \
    /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