mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 05:12:28 +08:00
Introduce target_announce_attach
This introduces target_announce_attach, by analog with target_announce_detach. Then it converts existing targets to use this, rather than emitting their own output by hand.
This commit is contained in:
14
gdb/procfs.c
14
gdb/procfs.c
@ -1775,19 +1775,7 @@ procfs_target::attach (const char *args, int from_tty)
|
||||
unpusher.reset (this);
|
||||
}
|
||||
|
||||
if (from_tty)
|
||||
{
|
||||
const char *exec_file = get_exec_file (0);
|
||||
|
||||
if (exec_file)
|
||||
printf_filtered (_("Attaching to program `%s', %s\n"),
|
||||
exec_file, target_pid_to_str (ptid_t (pid)).c_str ());
|
||||
else
|
||||
printf_filtered (_("Attaching to %s\n"),
|
||||
target_pid_to_str (ptid_t (pid)).c_str ());
|
||||
|
||||
fflush (stdout);
|
||||
}
|
||||
target_announce_attach (from_tty, pid);
|
||||
|
||||
do_attach (ptid_t (pid));
|
||||
|
||||
|
Reference in New Issue
Block a user