+
+/* Convert pid to printable format. */
+
+const char *
+target_pid_to_str (ptid_t ptid)
+{
+ static char buf[80];
+
+ if (ptid_equal (ptid, minus_one_ptid))
+ xsnprintf (buf, sizeof (buf), "<all threads>");
+ else if (ptid_equal (ptid, null_ptid))
+ xsnprintf (buf, sizeof (buf), "<null thread>");
+ else if (ptid_get_tid (ptid) != 0)
+ xsnprintf (buf, sizeof (buf), "Thread %d.0x%lx",
+ ptid_get_pid (ptid), ptid_get_tid (ptid));
+ else if (ptid_get_lwp (ptid) != 0)
+ xsnprintf (buf, sizeof (buf), "LWP %d.%ld",
+ ptid_get_pid (ptid), ptid_get_lwp (ptid));
+ else
+ xsnprintf (buf, sizeof (buf), "Process %d",
+ ptid_get_pid (ptid));
+
+ return buf;
+}
+
+int
+kill_inferior (int pid)
+{
+ gdb_agent_about_to_close (pid);
+
+ return (*the_target->kill) (pid);
+}
+
+/* Target can do hardware single step. */
+
+int
+target_can_do_hardware_single_step (void)
+{
+ return 1;
+}
+
+/* Default implementation for breakpoint_kind_for_pc.
+
+ The default behavior for targets that don't implement breakpoint_kind_for_pc
+ is to use the size of a breakpoint as the kind. */
+
+int
+default_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ int size = 0;
+
+ gdb_assert (the_target->sw_breakpoint_from_kind != NULL);
+
+ (*the_target->sw_breakpoint_from_kind) (0, &size);
+ return size;
+}
+
+/* Define it. */
+
+enum target_terminal::terminal_state target_terminal::terminal_state
+ = target_terminal::terminal_is_ours;
+
+/* See target/target.h. */
+
+void
+target_terminal::init ()
+{
+ /* Placeholder needed because of fork_inferior. Not necessary on
+ GDBserver. */
+}
+
+/* See target/target.h. */
+
+void
+target_terminal::inferior ()
+{
+ /* Placeholder needed because of fork_inferior. Not necessary on
+ GDBserver. */
+}
+
+/* See target/target.h. */
+
+void
+target_terminal::ours ()
+{
+ /* Placeholder needed because of fork_inferior. Not necessary on
+ GDBserver. */
+}
+
+/* See target/target.h. */
+
+void
+target_terminal::ours_for_output (void)
+{
+ /* Placeholder. */
+}
+
+/* See target/target.h. */
+
+void
+target_terminal::info (const char *arg, int from_tty)
+{
+ /* Placeholder. */
+}