change initialization of procfs_ops from compile time to run time.

This commit is contained in:
David Taylor 1999-01-18 20:22:43 +00:00
parent 040bbbc24b
commit 63f8d5f5b3
2 changed files with 48 additions and 69 deletions

View File

@ -1,3 +1,8 @@
Mon Jan 18 15:19:13 1999 David Taylor <taylor@texas.cygnus.com>
* procfs.c (procfs_ops): delete compile time initialization.
(_initialize_procfs): initialize procfs_ops at run time.
Mon Jan 18 12:51:44 1999 Christopher Faylor <cgf@cygnus.com>
* configure.in: Ensure that -luser32 is always linked in

View File

@ -5752,75 +5752,7 @@ procfs_pid_to_str (pid)
}
#endif /* TIDGET */
struct target_ops procfs_ops = {
"procfs", /* to_shortname */
"Unix /proc child process", /* to_longname */
"Unix /proc child process (started by the \"run\" command).", /* to_doc */
procfs_open, /* to_open */
0, /* to_close */
procfs_attach, /* to_attach */
NULL, /* to_post_attach */
procfs_attach, /* to_require_attach */
procfs_detach, /* to_detach */
procfs_detach, /* to_require_detach */
procfs_resume, /* to_resume */
procfs_wait, /* to_wait */
NULL, /* to_post_wait */
procfs_fetch_registers, /* to_fetch_registers */
procfs_store_registers, /* to_store_registers */
procfs_prepare_to_store, /* to_prepare_to_store */
procfs_xfer_memory, /* to_xfer_memory */
procfs_files_info, /* to_files_info */
memory_insert_breakpoint, /* to_insert_breakpoint */
memory_remove_breakpoint, /* to_remove_breakpoint */
terminal_init_inferior, /* to_terminal_init */
terminal_inferior, /* to_terminal_inferior */
terminal_ours_for_output, /* to_terminal_ours_for_output */
terminal_ours, /* to_terminal_ours */
child_terminal_info, /* to_terminal_info */
procfs_kill_inferior, /* to_kill */
0, /* to_load */
0, /* to_lookup_symbol */
procfs_create_inferior, /* to_create_inferior */
NULL, /* to_post_startup_inferior */
NULL, /* to_acknowledge_created_inferior */
NULL, /* to_clone_and_follow_inferior */
NULL, /* to_post_follow_inferior_by_clone */
NULL, /* to_insert_fork_catchpoint */
NULL, /* to_remove_fork_catchpoint */
NULL, /* to_insert_vfork_catchpoint */
NULL, /* to_remove_vfork_catchpoint */
NULL, /* to_has_forked */
NULL, /* to_has_vforked */
NULL, /* to_can_follow_vfork_prior_to_exec */
NULL, /* to_post_follow_vfork */
NULL, /* to_insert_exec_catchpoint */
NULL, /* to_remove_exec_catchpoint */
NULL, /* to_has_execd */
NULL, /* to_reported_exec_events_per_exec_call */
NULL, /* to_has_syscall_event */
NULL, /* to_has_exited */
procfs_mourn_inferior, /* to_mourn_inferior */
procfs_can_run, /* to_can_run */
procfs_notice_signals, /* to_notice_signals */
procfs_thread_alive, /* to_thread_alive */
procfs_stop, /* to_stop */
NULL, /* to_enable_exception_callback */
NULL, /* to_get_current_exception_event */
NULL, /* to_pid_to_exec_file */
NULL, /* to_core_file_to_sym_file */
process_stratum, /* to_stratum */
0, /* to_next */
1, /* to_has_all_memory */
1, /* to_has_memory */
1, /* to_has_stack */
1, /* to_has_registers */
1, /* to_has_execution */
tc_none, /* to_has_thread_control */
0, /* sections */
0, /* sections_end */
OPS_MAGIC /* to_magic */
};
struct target_ops procfs_ops;
void
_initialize_procfs ()
@ -5837,6 +5769,48 @@ _initialize_procfs ()
return;
close (fd);
#endif
procfs_ops.to_shortname = "procfs";
procfs_ops.to_longname = "Unix /proc child process";
procfs_ops.to_doc = "Unix /proc child process (started by the \"run\" command).";
procfs_ops.to_open = procfs_open;
procfs_ops.to_close = 0;
procfs_ops.to_attach = procfs_attach;
procfs_ops.to_require_attach = procfs_attach;
procfs_ops.to_detach = procfs_detach;
procfs_ops.to_require_detach = procfs_detach;
procfs_ops.to_resume = procfs_resume;
procfs_ops.to_wait = procfs_wait;
procfs_ops.to_fetch_registers = procfs_fetch_registers;
procfs_ops.to_store_registers = procfs_store_registers;
procfs_ops.to_prepare_to_store = procfs_prepare_to_store;
procfs_ops.to_xfer_memory = procfs_xfer_memory;
procfs_ops.to_files_info = procfs_files_info;
procfs_ops.to_insert_breakpoint = memory_insert_breakpoint;
procfs_ops.to_remove_breakpoint = memory_remove_breakpoint;
procfs_ops.to_terminal_init = terminal_init_inferior;
procfs_ops.to_terminal_inferior = terminal_inferior;
procfs_ops.to_terminal_ours_for_output = terminal_ours_for_output;
procfs_ops.to_terminal_ours = terminal_ours;
procfs_ops.to_terminal_info = child_terminal_info;
procfs_ops.to_kill = procfs_kill_inferior;
procfs_ops.to_load = 0;
procfs_ops.to_lookup_symbol = 0;
procfs_ops.to_create_inferior = procfs_create_inferior;
procfs_ops.to_mourn_inferior = procfs_mourn_inferior;
procfs_ops.to_can_run = procfs_can_run;
procfs_ops.to_notice_signals = procfs_notice_signals;
procfs_ops.to_thread_alive = procfs_thread_alive;
procfs_ops.to_stop = procfs_stop;
procfs_ops.to_stratum = process_stratum;
procfs_ops.to_has_all_memory = 1;
procfs_ops.to_has_memory = 1;
procfs_ops.to_has_stack = 1;
procfs_ops.to_has_registers = 1;
procfs_ops.to_has_execution = 1;
procfs_ops.to_has_thread_control = tc_none;
procfs_ops.to_sections = 0;
procfs_ops.to_sections_end = 0;
procfs_ops.to_magic = OPS_MAGIC;
add_target (&procfs_ops);