-struct target_ops core_ops = {
- "core", /* to_shortname */
- "Local core dump file", /* to_longname */
- "Use a core file as a target. Specify the filename of the core file.", /* to_doc */
- core_open, /* to_open */
- core_close, /* to_close */
- find_default_attach, /* to_attach */
- core_detach, /* to_detach */
- 0, /* to_resume */
- 0, /* to_wait */
- get_core_registers, /* to_fetch_registers */
- 0, /* to_store_registers */
- 0, /* to_prepare_to_store */
- xfer_memory, /* to_xfer_memory */
- core_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 */
- core_stratum, /* to_stratum */
- 0, /* to_next */
- 0, /* to_has_all_memory */
- 1, /* to_has_memory */
- 1, /* to_has_stack */
- 1, /* to_has_registers */
- 0, /* to_has_execution */
- 0, /* to_sections */
- 0, /* to_sections_end */
- OPS_MAGIC, /* to_magic */
-};
+
+/* Okay, let's be honest: threads gleaned from a core file aren't
+ exactly lively, are they? On the other hand, if we don't claim
+ that each & every one is alive, then we don't get any of them
+ to appear in an "info thread" command, which is quite a useful
+ behaviour.
+ */
+static int
+core_file_thread_alive (tid)
+ int tid;
+{
+ return 1;
+}
+
+/* Fill in core_ops with its defined operations and properties. */
+
+static void
+init_core_ops ()
+{
+ core_ops.to_shortname = "core";
+ core_ops.to_longname = "Local core dump file";
+ core_ops.to_doc =
+ "Use a core file as a target. Specify the filename of the core file.";
+ core_ops.to_open = core_open;
+ core_ops.to_close = core_close;
+ core_ops.to_attach = find_default_attach;
+ core_ops.to_require_attach = find_default_require_attach;
+ core_ops.to_detach = core_detach;
+ core_ops.to_require_detach = find_default_require_detach;
+ core_ops.to_fetch_registers = get_core_registers;
+ core_ops.to_xfer_memory = xfer_memory;
+ core_ops.to_files_info = core_files_info;
+ core_ops.to_insert_breakpoint = ignore;
+ core_ops.to_remove_breakpoint = ignore;
+ core_ops.to_create_inferior = find_default_create_inferior;
+ core_ops.to_clone_and_follow_inferior = find_default_clone_and_follow_inferior;
+ core_ops.to_thread_alive = core_file_thread_alive;
+ core_ops.to_core_file_to_sym_file = core_file_to_sym_file;
+ core_ops.to_stratum = core_stratum;
+ core_ops.to_has_memory = 1;
+ core_ops.to_has_stack = 1;
+ core_ops.to_has_registers = 1;
+ core_ops.to_magic = OPS_MAGIC;
+}
+
+/* non-zero if we should not do the add_target call in
+ _initialize_corelow; not initialized (i.e., bss) so that
+ the target can initialize it (i.e., data) if appropriate.
+ This needs to be set at compile time because we don't know
+ for sure whether the target's initialize routine is called
+ before us or after us. */
+int coreops_suppress_target;