gdb: include gdbsupport/buildargv.h in ser-mingw.c
[binutils-gdb.git] / gdb / nto-procfs.c
index 7ae71d9d519b46f2ddb49c617deaa88787c55053..da0feaedff9fab03228f492add19923d4a048b04 100644 (file)
@@ -656,10 +656,10 @@ nto_procfs_target::files_info ()
 {
   struct inferior *inf = current_inferior ();
 
-  printf_unfiltered ("\tUsing the running image of %s %s via %s.\n",
-                    inf->attach_flag ? "attached" : "child",
-                    target_pid_to_str (inferior_ptid).c_str (),
-                    (nodestr != NULL) ? nodestr : "local node");
+  printf_filtered ("\tUsing the running image of %s %s via %s.\n",
+                  inf->attach_flag ? "attached" : "child",
+                  target_pid_to_str (inferior_ptid).c_str (),
+                  (nodestr != NULL) ? nodestr : "local node");
 }
 
 /* Target to_pid_to_exec_file implementation.  */
@@ -701,17 +701,8 @@ nto_procfs_target::attach (const char *args, int from_tty)
   if (pid == getpid ())
     error (_("Attaching GDB to itself is not a good idea..."));
 
-  if (from_tty)
-    {
-      const char *exec_file = get_exec_file (0);
+  target_announce_attach (from_tty, pid);
 
-      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 ());
-    }
   ptid_t ptid = do_attach (ptid_t (pid));
   inf = current_inferior ();
   inferior_appeared (inf, pid);