`gdb internal error' (since generic_mourn calls breakpoint_init_inferior). */
static int
-ignore (struct bp_target_info *bp_tgt)
+ignore (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
{
return 0;
}
static const struct target_desc *
core_read_description (struct target_ops *target)
{
- if (gdbarch_core_read_description_p (current_gdbarch))
- return gdbarch_core_read_description (current_gdbarch, target, core_bfd);
+ if (core_gdbarch && gdbarch_core_read_description_p (core_gdbarch))
+ return gdbarch_core_read_description (core_gdbarch, target, core_bfd);
return NULL;
}
return buf;
}
+static int
+core_has_memory (struct target_ops *ops)
+{
+ return (core_bfd != NULL);
+}
+
+static int
+core_has_stack (struct target_ops *ops)
+{
+ return (core_bfd != NULL);
+}
+
+static int
+core_has_registers (struct target_ops *ops)
+{
+ return (core_bfd != NULL);
+}
+
/* Fill in core_ops with its defined operations and properties. */
static void
core_ops.to_read_description = core_read_description;
core_ops.to_pid_to_str = core_pid_to_str;
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_has_memory = core_has_memory;
+ core_ops.to_has_stack = core_has_stack;
+ core_ops.to_has_registers = core_has_registers;
core_ops.to_magic = OPS_MAGIC;
}