Fetch the NT_ARM_TLS register set for native FreeBSD/arm processes.
[binutils-gdb.git] / gdb / inf-ptrace.c
index ebcc409b989ce31ff70fe8dcf46e15e1fa94661c..b9767978744e0f4cac5edb42abf88d101ac9dbe0 100644 (file)
@@ -48,6 +48,9 @@ gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
 #endif
 }
 
+/* The event pipe registered as a waitable file in the event loop.  */
+event_pipe inf_ptrace_target::m_event_pipe;
+
 inf_ptrace_target::~inf_ptrace_target ()
 {}
 
@@ -330,9 +333,9 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
              return minus_one_ptid;
            }
 
-         fprintf_unfiltered (gdb_stderr,
-                             _("Child process unexpectedly missing: %s.\n"),
-                             safe_strerror (save_errno));
+         gdb_printf (gdb_stderr,
+                     _("Child process unexpectedly missing: %s.\n"),
+                     safe_strerror (save_errno));
 
          ourstatus->set_ignore ();
          return minus_one_ptid;
@@ -517,9 +520,9 @@ inf_ptrace_target::files_info ()
 {
   struct inferior *inf = current_inferior ();
 
-  printf_filtered (_("\tUsing the running image of %s %s.\n"),
-                  inf->attach_flag ? "attached" : "child",
-                  target_pid_to_str (inferior_ptid).c_str ());
+  gdb_printf (_("\tUsing the running image of %s %s.\n"),
+             inf->attach_flag ? "attached" : "child",
+             target_pid_to_str (inferior_ptid).c_str ());
 }
 
 std::string
@@ -527,3 +530,15 @@ inf_ptrace_target::pid_to_str (ptid_t ptid)
 {
   return normal_pid_to_str (ptid);
 }
+
+/* Implement the "close" target method.  */
+
+void
+inf_ptrace_target::close ()
+{
+  /* Unregister from the event loop.  */
+  if (is_async_p ())
+    async (0);
+
+  inf_child_target::close ();
+}