aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-26 21:49:48 -0700
committerTom Tromey <tom@tromey.com>2022-01-06 08:56:20 -0700
commitbc521517b7058a231a08bf8f3deae7cd41cd62d7 (patch)
treeae7a824e59ff285cd070bc89d41e286f786e55a5 /gdb/windows-nat.c
parent10a85f29c74ab562db622cfc4f58997e859c6ed6 (diff)
downloadgdb-bc521517b7058a231a08bf8f3deae7cd41cd62d7.zip
gdb-bc521517b7058a231a08bf8f3deae7cd41cd62d7.tar.gz
gdb-bc521517b7058a231a08bf8f3deae7cd41cd62d7.tar.bz2
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.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 47760b7..c85f7c0 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1929,17 +1929,7 @@ windows_nat_target::attach (const char *args, int from_tty)
DebugSetProcessKillOnExit (FALSE);
- if (from_tty)
- {
- const char *exec_file = get_exec_file (0);
-
- if (exec_file)
- 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 ());
- }
+ target_announce_attach (from_tty, pid);
#ifdef __x86_64__
HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, pid);