#endif
#include "frame.h" /* required by inferior.h */
#include "inferior.h"
+#include "infrun.h"
#include "symtab.h"
#include "command.h"
#include "bfd.h"
return TARGET_XFER_E_IO;
default:
- if (ops->beneath != NULL)
- return ops->beneath->to_xfer_partial (ops->beneath, object,
- annex, readbuf,
- writebuf, offset, len,
- xfered_len);
- return TARGET_XFER_E_IO;
+ return ops->beneath->to_xfer_partial (ops->beneath, object,
+ annex, readbuf,
+ writebuf, offset, len,
+ xfered_len);
}
}
core_read_description (struct target_ops *target)
{
if (core_gdbarch && gdbarch_core_read_description_p (core_gdbarch))
- return gdbarch_core_read_description (core_gdbarch,
- target, core_bfd);
+ {
+ const struct target_desc *result;
+
+ result = gdbarch_core_read_description (core_gdbarch,
+ target, core_bfd);
+ if (result != NULL)
+ return result;
+ }
- return NULL;
+ return target->beneath->to_read_description (target->beneath);
}
static char *
/* Implement the to_info_proc method. */
static void
-core_info_proc (struct target_ops *ops, char *args, enum info_proc_what request)
+core_info_proc (struct target_ops *ops, const char *args,
+ enum info_proc_what request)
{
struct gdbarch *gdbarch = get_current_arch ();
"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_detach = core_detach;
core_ops.to_fetch_registers = get_core_registers;
core_ops.to_xfer_partial = core_xfer_partial;
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_thread_alive = core_thread_alive;
core_ops.to_read_description = core_read_description;
core_ops.to_pid_to_str = core_pid_to_str;