public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Kamil Rytarowski <n54@gmx.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Implement nbsd_nat_target::thread_name
Date: Wed, 01 Apr 2020 13:28:45 -0600	[thread overview]
Message-ID: <87imij0zv6.fsf@tromey.com> (raw)
In-Reply-To: <20200325183541.6662-1-n54@gmx.com> (Kamil Rytarowski's message of "Wed, 25 Mar 2020 19:35:41 +0100")

>>>>> "Kamil" == Kamil Rytarowski <n54@gmx.com> writes:

Kamil> Return the name assigned to a thread by an application.  Return
Kamil> the string in a static buffer.

Thanks for the patch.

Kamil> +  if (sysctl (mib, 5, NULL, &size, NULL, 0) == -1 || size == 0)
Kamil> +    perror_with_name (("sysctl"));

I suspect it's better to return NULL there than to throw an exception.

Kamil> +  if (kl == NULL)
Kamil> +    perror_with_name (("calloc"));
Kamil> +
Kamil> +  if (sysctl (mib, 5, kl.get (), &size, NULL, 0) == -1 || size == 0)
Kamil> +    perror_with_name (("sysctl"));

Likewise in these cases.

thanks,
Tom

  reply	other threads:[~2020-04-01 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 18:35 Kamil Rytarowski
2020-04-01 19:28 ` Tom Tromey [this message]
2020-04-01 20:17   ` Kamil Rytarowski
2020-04-01 20:45     ` Tom Tromey

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=87imij0zv6.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).