summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gdb/target.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2004-12-27 14:01:02 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2004-12-27 14:01:02 +0000
commit7cb023cfb07d13fb208030e4352f159f1e2b229d (patch)
tree961c03598dd9430c22e1c634d533db0a08de8999 /gnu/usr.bin/binutils/gdb/target.h
parent5b0cde74db4ad7c994ffdca423951b72310dd8cb (diff)
Resolve conflicts for GDB 6.3. Add local patches.
ok deraadt@
Diffstat (limited to 'gnu/usr.bin/binutils/gdb/target.h')
-rw-r--r--gnu/usr.bin/binutils/gdb/target.h83
1 files changed, 34 insertions, 49 deletions
diff --git a/gnu/usr.bin/binutils/gdb/target.h b/gnu/usr.bin/binutils/gdb/target.h
index 2d8ce372fc5..84c284b268c 100644
--- a/gnu/usr.bin/binutils/gdb/target.h
+++ b/gnu/usr.bin/binutils/gdb/target.h
@@ -304,7 +304,6 @@ struct target_ops
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);
@@ -325,12 +324,15 @@ struct target_ops
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 *);
@@ -342,7 +344,7 @@ struct target_ops
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);
@@ -353,7 +355,7 @@ struct target_ops
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);
@@ -507,19 +509,6 @@ extern void target_disconnect (char *, 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) \
@@ -578,8 +567,6 @@ extern char *child_core_file_to_sym_file (char *);
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);
@@ -712,8 +699,8 @@ extern void target_load (char *arg, int from_tty);
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
@@ -949,19 +936,19 @@ extern char *normal_pid_to_str (ptid_t ptid);
* 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) \
@@ -1083,18 +1070,14 @@ extern void (*target_new_objfile_hook) (struct objfile *);
(*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,
@@ -1182,7 +1165,7 @@ extern void noprocess (void);
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);
@@ -1246,4 +1229,6 @@ extern void push_remote_target (char *name, int from_tty);
/* Blank target vector entries are initialized to target_ignore. */
void target_ignore (void);
+extern struct target_ops deprecated_child_ops;
+
#endif /* !defined (TARGET_H) */