-struct target_ops exec_ops = {
- "exec", /* to_shortname */
- "Local exec file", /* to_longname */
- "Use an executable file as a target.\n\
-Specify the filename of the executable file.", /* to_doc */
- exec_file_command, /* to_open */
- exec_close, /* to_close */
- find_default_attach, /* to_attach */
- 0, /* to_detach */
- 0, /* to_resume */
- 0, /* to_wait */
- 0, /* to_fetch_registers */
- 0, /* to_store_registers */
- 0, /* to_prepare_to_store */
- xfer_memory, /* to_xfer_memory */
- exec_files_info, /* to_files_info */
- ignore, /* to_insert_breakpoint */
- ignore, /* to_remove_breakpoint */
- 0, /* to_terminal_init */
- 0, /* to_terminal_inferior */
- 0, /* to_terminal_ours_for_output */
- 0, /* to_terminal_ours */
- 0, /* to_terminal_info */
- 0, /* to_kill */
- 0, /* to_load */
- 0, /* to_lookup_symbol */
- find_default_create_inferior, /* to_create_inferior */
- 0, /* to_mourn_inferior */
- 0, /* to_can_run */
- 0, /* to_notice_signals */
- 0, /* to_thread_alive */
- 0, /* to_stop */
- file_stratum, /* to_stratum */
- 0, /* to_next */
- 0, /* to_has_all_memory */
- 1, /* to_has_memory */
- 0, /* to_has_stack */
- 0, /* to_has_registers */
- 0, /* to_has_execution */
- 0, /* to_sections */
- 0, /* to_sections_end */
- OPS_MAGIC, /* to_magic */
-};
+/* Find mapped memory. */
+
+extern void
+exec_set_find_memory_regions (int (*func) (int (*) (CORE_ADDR,
+ unsigned long,
+ int, int, int,
+ void *),
+ void *))
+{
+ exec_ops.to_find_memory_regions = func;
+}
+
+static char *exec_make_note_section (bfd *, int *);
+
+/* Fill in the exec file target vector. Very few entries need to be
+ defined. */
+
+static void
+init_exec_ops (void)
+{
+ exec_ops.to_shortname = "exec";
+ exec_ops.to_longname = "Local exec file";
+ exec_ops.to_doc = "Use an executable file as a target.\n\
+Specify the filename of the executable file.";
+ exec_ops.to_open = exec_open;
+ exec_ops.to_close = exec_close;
+ exec_ops.to_attach = find_default_attach;
+ exec_ops.to_require_attach = find_default_require_attach;
+ exec_ops.to_require_detach = find_default_require_detach;
+ exec_ops.to_xfer_memory = xfer_memory;
+ exec_ops.to_files_info = exec_files_info;
+ exec_ops.to_insert_breakpoint = ignore;
+ exec_ops.to_remove_breakpoint = ignore;
+ exec_ops.to_create_inferior = find_default_create_inferior;
+ exec_ops.to_clone_and_follow_inferior = find_default_clone_and_follow_inferior;
+ exec_ops.to_stratum = file_stratum;
+ exec_ops.to_has_memory = 1;
+ exec_ops.to_make_corefile_notes = exec_make_note_section;
+ exec_ops.to_magic = OPS_MAGIC;
+}