From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Introduce target_announce_attach
Date: Sat, 8 Jan 2022 15:07:06 +0000 [thread overview]
Message-ID: <20220108150641.eefdfocex34schl7@Plymouth> (raw)
In-Reply-To: <20220105175916.2969966-2-tom@tromey.com>
> +/* See target.h */
> +
> +void
> +target_announce_attach (int from_tty, int pid)
> +{
> + if (!from_tty)
> + return;
> +
> + const char *exec_file = get_exec_file (0);
> +
> + if (exec_file)
Hi,
Just a nit, and I know you just moved this bit of code around, but
shouldn't this become
if (exec_file != nullptr)
?
Lancelot.
> + printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
> + target_pid_to_str (ptid_t (pid)).c_str ());
> + else
> + printf_unfiltered ("Attaching to %s\n",
> + target_pid_to_str (ptid_t (pid)).c_str ());
> +}
> +
> /* The inferior process has died. Long live the inferior! */
next prev parent reply other threads:[~2022-01-08 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 17:59 [PATCH 0/2] Unify target announce and detach messages Tom Tromey
2022-01-05 17:59 ` [PATCH 1/2] Introduce target_announce_attach Tom Tromey
2022-01-08 15:07 ` Lancelot SIX via Gdb-patches [this message]
2022-01-08 16:47 ` Tom Tromey
2022-01-05 17:59 ` [PATCH 2/2] Use target_announce_detach in more targets Tom Tromey
2022-01-05 18:47 ` [PATCH 0/2] Unify target announce and detach messages John Baldwin
2022-01-08 11:16 ` Joel Brobecker via Gdb-patches
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=20220108150641.eefdfocex34schl7@Plymouth \
--to=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
--cc=tom@tromey.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