[PATCH 1/2] Introduce target_announce_attach
Lancelot SIX
lsix@lancelotsix.com
Sat Jan 8 15:07:06 GMT 2022
> +/* 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! */
More information about the Gdb-patches
mailing list