-/* Default implementation of the to_can_async_p and
- to_supports_non_stop methods. */
-
-static int
-return_zero (struct target_ops *ignore)
-{
- return 0;
-}
-
-struct target_ops *
-inf_child_target (void)
-{
- struct target_ops *t = XCNEW (struct target_ops);
-
- t->to_shortname = "native";
- t->to_longname = "Native process";
- t->to_doc = "Native process (started by the \"run\" command).";
- t->to_open = inf_child_open;
- t->to_close = inf_child_close;
- t->to_disconnect = inf_child_disconnect;
- t->to_post_attach = inf_child_post_attach;
- t->to_fetch_registers = inf_child_fetch_inferior_registers;
- t->to_store_registers = inf_child_store_inferior_registers;
- t->to_prepare_to_store = inf_child_prepare_to_store;
- t->to_insert_breakpoint = memory_insert_breakpoint;
- t->to_remove_breakpoint = memory_remove_breakpoint;
- t->to_terminal_init = child_terminal_init;
- t->to_terminal_inferior = child_terminal_inferior;
- t->to_terminal_ours_for_output = child_terminal_ours_for_output;
- t->to_terminal_ours = child_terminal_ours;
- t->to_terminal_info = child_terminal_info;
- t->to_post_startup_inferior = inf_child_post_startup_inferior;
- t->to_follow_fork = inf_child_follow_fork;
- t->to_can_run = inf_child_can_run;
- /* We must default these because they must be implemented by any
- target that can run. */
- t->to_can_async_p = return_zero;
- t->to_supports_non_stop = return_zero;
- t->to_pid_to_exec_file = inf_child_pid_to_exec_file;
- t->to_stratum = process_stratum;
- t->to_has_all_memory = default_child_has_all_memory;
- t->to_has_memory = default_child_has_memory;
- t->to_has_stack = default_child_has_stack;
- t->to_has_registers = default_child_has_registers;
- t->to_has_execution = default_child_has_execution;
- t->to_fileio_open = inf_child_fileio_open;
- t->to_fileio_pwrite = inf_child_fileio_pwrite;
- t->to_fileio_pread = inf_child_fileio_pread;
- t->to_fileio_fstat = inf_child_fileio_fstat;
- t->to_fileio_close = inf_child_fileio_close;
- t->to_fileio_unlink = inf_child_fileio_unlink;
- t->to_fileio_readlink = inf_child_fileio_readlink;
- t->to_magic = OPS_MAGIC;
- t->to_use_agent = inf_child_use_agent;
- t->to_can_use_agent = inf_child_can_use_agent;
-
- /* Store a pointer so we can push the most-derived target from
- inf_child_open. */
- inf_child_ops = t;
-
- return t;