-child_files_info ()
-{
- printf ("\tUsing the running image of %s process %d.\n",
- attach_flag? "attached": "child", inferior_pid);
-}
-
-struct target_ops child_ops = {
- "child", "Unix child process",
- 0, 0, /* open, close */
- child_attach, child_detach,
- child_resume,
- child_wait,
- fetch_inferior_registers, store_inferior_registers,
- child_prepare_to_store,
- host_convert_to_virtual, host_convert_from_virtual,
- child_xfer_memory, child_files_info,
- memory_insert_breakpoint, memory_remove_breakpoint,
- terminal_init_inferior, terminal_inferior,
- terminal_ours_for_output, terminal_ours, child_terminal_info,
- kill_inferior, 0, add_syms_addr_command, /* load */
- call_function_by_hand,
- 0, /* lookup_symbol */
- child_create_inferior, child_mourn_inferior,
- process_stratum, 0, /* next */
- 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
- OPS_MAGIC, /* Always the last thing */
-};
+child_stop (void)
+{
+ extern pid_t inferior_process_group;
+
+ kill (-inferior_process_group, SIGINT);
+}
+
+#if !defined(CHILD_ENABLE_EXCEPTION_CALLBACK)
+struct symtab_and_line *
+child_enable_exception_callback (enum exception_event_kind kind, int enable)
+{
+ return (struct symtab_and_line *) NULL;
+}
+#endif
+
+#if !defined(CHILD_GET_CURRENT_EXCEPTION_EVENT)
+struct exception_event_record *
+child_get_current_exception_event (void)
+{
+ return (struct exception_event_record *) NULL;
+}
+#endif
+
+
+#if !defined(CHILD_PID_TO_EXEC_FILE)
+char *
+child_pid_to_exec_file (int pid)
+{
+ /* This version of Unix doesn't support translation of a process ID
+ to the filename of the executable file.
+ */
+ return NULL;
+}
+#endif
+
+char *
+child_core_file_to_sym_file (char *core)
+{
+ /* The target stratum for a running executable need not support
+ this operation.
+ */
+ return NULL;
+}
+\f
+
+#if !defined(CHILD_PID_TO_STR)
+char *
+child_pid_to_str (ptid_t ptid)
+{
+ return normal_pid_to_str (ptid);
+}
+#endif
+
+static void
+init_child_ops (void)
+{
+ child_ops.to_shortname = "child";
+ child_ops.to_longname = "Unix child process";
+ child_ops.to_doc = "Unix child process (started by the \"run\" command).";
+ child_ops.to_open = child_open;
+ child_ops.to_attach = child_attach;
+ child_ops.to_post_attach = child_post_attach;
+ child_ops.to_require_attach = child_require_attach;
+ child_ops.to_detach = child_detach;
+ child_ops.to_require_detach = child_require_detach;
+ child_ops.to_resume = child_resume;
+ child_ops.to_wait = child_wait;
+ child_ops.to_post_wait = child_post_wait;
+ child_ops.to_fetch_registers = fetch_inferior_registers;
+ child_ops.to_store_registers = store_inferior_registers;
+ child_ops.to_prepare_to_store = child_prepare_to_store;
+ child_ops.to_xfer_memory = child_xfer_memory;
+ child_ops.to_files_info = child_files_info;
+ child_ops.to_insert_breakpoint = memory_insert_breakpoint;
+ child_ops.to_remove_breakpoint = memory_remove_breakpoint;
+ child_ops.to_terminal_init = terminal_init_inferior;
+ child_ops.to_terminal_inferior = terminal_inferior;
+ child_ops.to_terminal_ours_for_output = terminal_ours_for_output;
+ child_ops.to_terminal_ours = terminal_ours;
+ child_ops.to_terminal_info = child_terminal_info;
+ child_ops.to_kill = kill_inferior;
+ child_ops.to_create_inferior = child_create_inferior;
+ child_ops.to_post_startup_inferior = child_post_startup_inferior;
+ child_ops.to_acknowledge_created_inferior = child_acknowledge_created_inferior;
+ child_ops.to_clone_and_follow_inferior = child_clone_and_follow_inferior;
+ child_ops.to_post_follow_inferior_by_clone = child_post_follow_inferior_by_clone;
+ child_ops.to_insert_fork_catchpoint = child_insert_fork_catchpoint;
+ child_ops.to_remove_fork_catchpoint = child_remove_fork_catchpoint;
+ child_ops.to_insert_vfork_catchpoint = child_insert_vfork_catchpoint;
+ child_ops.to_remove_vfork_catchpoint = child_remove_vfork_catchpoint;
+ child_ops.to_has_forked = child_has_forked;
+ child_ops.to_has_vforked = child_has_vforked;
+ child_ops.to_can_follow_vfork_prior_to_exec = child_can_follow_vfork_prior_to_exec;
+ child_ops.to_post_follow_vfork = child_post_follow_vfork;
+ child_ops.to_insert_exec_catchpoint = child_insert_exec_catchpoint;
+ child_ops.to_remove_exec_catchpoint = child_remove_exec_catchpoint;
+ child_ops.to_has_execd = child_has_execd;
+ child_ops.to_reported_exec_events_per_exec_call = child_reported_exec_events_per_exec_call;
+ child_ops.to_has_syscall_event = child_has_syscall_event;
+ child_ops.to_has_exited = child_has_exited;
+ child_ops.to_mourn_inferior = child_mourn_inferior;
+ child_ops.to_can_run = child_can_run;
+ child_ops.to_thread_alive = child_thread_alive;
+ child_ops.to_pid_to_str = child_pid_to_str;
+ child_ops.to_stop = child_stop;
+ child_ops.to_enable_exception_callback = child_enable_exception_callback;
+ child_ops.to_get_current_exception_event = child_get_current_exception_event;
+ child_ops.to_pid_to_exec_file = child_pid_to_exec_file;
+ child_ops.to_stratum = process_stratum;
+ child_ops.to_has_all_memory = 1;
+ child_ops.to_has_memory = 1;
+ child_ops.to_has_stack = 1;
+ child_ops.to_has_registers = 1;
+ child_ops.to_has_execution = 1;
+ child_ops.to_magic = OPS_MAGIC;
+}