void (*to_disconnect) (char *, int);
void (*to_resume) (ptid_t, int, enum target_signal);
ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
- void (*to_post_wait) (ptid_t, int);
void (*to_fetch_registers) (int);
void (*to_store_registers) (int);
void (*to_prepare_to_store) (void);
negative (call its absolute value N) means that we cannot
transfer right at MEMADDR, but we could transfer at least
- something at MEMADDR + N. */
+ something at MEMADDR + N.
- int (*to_xfer_memory) (CORE_ADDR memaddr, char *myaddr,
- int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target);
+ NOTE: cagney/2004-10-01: This has been entirely superseeded by
+ to_xfer_partial and inferior inheritance. */
+
+ int (*deprecated_xfer_memory) (CORE_ADDR memaddr, char *myaddr,
+ int len, int write,
+ struct mem_attrib *attrib,
+ struct target_ops *target);
void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (CORE_ADDR, char *);
int (*to_insert_watchpoint) (CORE_ADDR, int, int);
int (*to_stopped_by_watchpoint) (void);
int to_have_continuable_watchpoint;
- CORE_ADDR (*to_stopped_data_address) (void);
+ int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
int (*to_region_size_ok_for_hw_watchpoint) (int);
void (*to_terminal_init) (void);
void (*to_terminal_inferior) (void);
void (*to_kill) (void);
void (*to_load) (char *, int);
int (*to_lookup_symbol) (char *, CORE_ADDR *);
- void (*to_create_inferior) (char *, char *, char **);
+ void (*to_create_inferior) (char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t);
void (*to_acknowledge_created_inferior) (int);
- int (*to_insert_fork_catchpoint) (int);
+ void (*to_insert_fork_catchpoint) (int);
int (*to_remove_fork_catchpoint) (int);
- int (*to_insert_vfork_catchpoint) (int);
+ void (*to_insert_vfork_catchpoint) (int);
int (*to_remove_vfork_catchpoint) (int);
int (*to_follow_fork) (int);
- int (*to_insert_exec_catchpoint) (int);
+ void (*to_insert_exec_catchpoint) (int);
int (*to_remove_exec_catchpoint) (int);
int (*to_reported_exec_events_per_exec_call) (void);
int (*to_has_exited) (int, int, int *);
#define target_wait(ptid, status) \
(*current_target.to_wait) (ptid, status)
-/* The target_wait operation waits for a process event to occur, and
- thereby stop the process.
-
- On some targets, certain events may happen in sequences. gdb's
- correct response to any single event of such a sequence may require
- knowledge of what earlier events in the sequence have been seen.
-
- This operation provides a target-specific hook that allows the
- necessary bookkeeping to be performed to track such sequences. */
-
-#define target_post_wait(ptid, status) \
- (*current_target.to_post_wait) (ptid, status)
-
/* Fetch at least register REGNO, or all regs if regno == -1. No result. */
#define target_fetch_registers(regno) \
extern int target_read_string (CORE_ADDR, char **, int, int *);
-extern int target_read_memory (CORE_ADDR memaddr, char *myaddr, int len);
+extern int target_read_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len);
-extern int target_write_memory (CORE_ADDR memaddr, char *myaddr, int len);
+extern int target_write_memory (CORE_ADDR memaddr, const bfd_byte *myaddr,
+ int len);
extern int xfer_memory (CORE_ADDR, char *, int, int,
struct mem_attrib *, struct target_ops *);
extern void child_post_attach (int);
#endif
-extern void child_post_wait (ptid_t, int);
-
extern void child_post_startup_inferior (ptid_t);
extern void child_acknowledge_created_inferior (int);
-extern int child_insert_fork_catchpoint (int);
+extern void child_insert_fork_catchpoint (int);
extern int child_remove_fork_catchpoint (int);
-extern int child_insert_vfork_catchpoint (int);
+extern void child_insert_vfork_catchpoint (int);
extern int child_remove_vfork_catchpoint (int);
extern int child_follow_fork (int);
-extern int child_insert_exec_catchpoint (int);
+extern void child_insert_exec_catchpoint (int);
extern int child_remove_exec_catchpoint (int);
ENV is the environment vector to pass. Errors reported with error().
On VxWorks and various standalone systems, we ignore exec_file. */
-#define target_create_inferior(exec_file, args, env) \
- (*current_target.to_create_inferior) (exec_file, args, env)
+#define target_create_inferior(exec_file, args, env, FROM_TTY) \
+ (*current_target.to_create_inferior) (exec_file, args, env, (FROM_TTY))
/* Some targets (such as ttrace-based HPUX) don't allow us to request
* The old way of doing this is to define a macro 'target_new_objfile'
* that points to the function that you want to be called on every
* objfile/shlib load.
- *
- * The new way is to grab the function pointer, 'target_new_objfile_hook',
- * and point it to the function that you want to be called on every
- * objfile/shlib load.
- *
- * If multiple clients are willing to be cooperative, they can each
- * save a pointer to the previous value of target_new_objfile_hook
- * before modifying it, and arrange for their function to call the
- * previous function in the chain. In that way, multiple clients
- * can receive this notification (something like with signal handlers).
- */
-extern void (*target_new_objfile_hook) (struct objfile *);
+ The new way is to grab the function pointer,
+ 'deprecated_target_new_objfile_hook', and point it to the function
+ that you want to be called on every objfile/shlib load.
+
+ If multiple clients are willing to be cooperative, they can each
+ save a pointer to the previous value of
+ deprecated_target_new_objfile_hook before modifying it, and arrange
+ for their function to call the previous function in the chain. In
+ that way, multiple clients can receive this notification (something
+ like with signal handlers). */
+
+extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
#ifndef target_pid_or_tid_to_str
#define target_pid_or_tid_to_str(ID) \
(current_target.to_have_continuable_watchpoint)
#endif
-/* HP-UX supplies these operations, which respectively disable and enable
- the memory page-protections that are used to implement hardware watchpoints
- on that platform. See wait_for_inferior's use of these. */
-
-#if !defined(TARGET_DISABLE_HW_WATCHPOINTS)
-#define TARGET_DISABLE_HW_WATCHPOINTS(pid)
-#endif
-
-#if !defined(TARGET_ENABLE_HW_WATCHPOINTS)
-#define TARGET_ENABLE_HW_WATCHPOINTS(pid)
-#endif
-
/* Provide defaults for hardware watchpoint functions. */
/* If the *_hw_beakpoint functions have not been defined
(*current_target.to_remove_hw_breakpoint) (addr, save)
#endif
-#ifndef target_stopped_data_address
-#define target_stopped_data_address() \
- (*current_target.to_stopped_data_address) ()
-#endif
-
-/* Sometimes gdb may pick up what appears to be a valid target address
- from a minimal symbol, but the value really means, essentially,
- "This is an index into a table which is populated when the inferior
- is run. Therefore, do not attempt to use this as a PC." */
+extern int target_stopped_data_address_p (struct target_ops *);
-#if !defined(PC_REQUIRES_RUN_BEFORE_USE)
-#define PC_REQUIRES_RUN_BEFORE_USE(pc) (0)
+#ifndef target_stopped_data_address
+#define target_stopped_data_address(target, x) \
+ (*target.to_stopped_data_address) (target, x)
+#else
+/* Horrible hack to get around existing macros :-(. */
+#define target_stopped_data_address_p(CURRENT_TARGET) (1)
#endif
/* This will only be defined by a target that supports catching vfork events,
extern void find_default_attach (char *, int);
-extern void find_default_create_inferior (char *, char *, char **);
+extern void find_default_create_inferior (char *, char *, char **, int);
extern struct target_ops *find_run_target (void);
/* Blank target vector entries are initialized to target_ignore. */
void target_ignore (void);
+extern struct target_ops deprecated_child_ops;
+
#endif /* !defined (TARGET_H) */