*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / target.h
index 56d4ee4ac63dcf39390c05d50920daf926d11229..9bb31f984ab29b2f0d5646df6f085e28c24fe7fb 100644 (file)
@@ -1,7 +1,8 @@
 /* Interface between GDB and target environments, including files and processes
 
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.  Written by John Gilmore.
 
@@ -19,8 +20,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #if !defined (TARGET_H)
 #define TARGET_H
@@ -236,23 +237,23 @@ enum target_object
 
 extern LONGEST target_read_partial (struct target_ops *ops,
                                    enum target_object object,
-                                   const char *annex, void *buf,
+                                   const char *annex, gdb_byte *buf,
                                    ULONGEST offset, LONGEST len);
 
 extern LONGEST target_write_partial (struct target_ops *ops,
                                     enum target_object object,
-                                    const char *annex, const void *buf,
+                                    const char *annex, const gdb_byte *buf,
                                     ULONGEST offset, LONGEST len);
 
 /* Wrappers to perform the full transfer.  */
 extern LONGEST target_read (struct target_ops *ops,
                            enum target_object object,
-                           const char *annex, void *buf,
+                           const char *annex, gdb_byte *buf,
                            ULONGEST offset, LONGEST len);
 
 extern LONGEST target_write (struct target_ops *ops,
                             enum target_object object,
-                            const char *annex, const void *buf,
+                            const char *annex, const gdb_byte *buf,
                             ULONGEST offset, LONGEST len);
 
 /* Wrappers to target read/write that perform memory transfers.  They
@@ -263,7 +264,7 @@ extern LONGEST target_write (struct target_ops *ops,
    which in turn lifted it from read_memory.  */
 
 extern void get_target_memory (struct target_ops *ops, CORE_ADDR addr,
-                              void *buf, LONGEST len);
+                              gdb_byte *buf, LONGEST len);
 extern ULONGEST get_target_memory_unsigned (struct target_ops *ops,
                                            CORE_ADDR addr, int len);
 \f
@@ -329,7 +330,7 @@ struct target_ops
        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 (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
                                   int len, int write,
                                   struct mem_attrib *attrib,
                                   struct target_ops *target);
@@ -338,8 +339,8 @@ struct target_ops
     int (*to_insert_breakpoint) (CORE_ADDR, gdb_byte *);
     int (*to_remove_breakpoint) (CORE_ADDR, gdb_byte *);
     int (*to_can_use_hw_breakpoint) (int, int, int);
-    int (*to_insert_hw_breakpoint) (CORE_ADDR, char *);
-    int (*to_remove_hw_breakpoint) (CORE_ADDR, char *);
+    int (*to_insert_hw_breakpoint) (CORE_ADDR, gdb_byte *);
+    int (*to_remove_hw_breakpoint) (CORE_ADDR, gdb_byte *);
     int (*to_remove_watchpoint) (CORE_ADDR, int, int);
     int (*to_insert_watchpoint) (CORE_ADDR, int, int);
     int (*to_stopped_by_watchpoint) (void);
@@ -362,7 +363,7 @@ struct target_ops
     int (*to_remove_fork_catchpoint) (int);
     void (*to_insert_vfork_catchpoint) (int);
     int (*to_remove_vfork_catchpoint) (int);
-    int (*to_follow_fork) (int);
+    int (*to_follow_fork) (struct target_ops *, int);
     void (*to_insert_exec_catchpoint) (int);
     int (*to_remove_exec_catchpoint) (int);
     int (*to_reported_exec_events_per_exec_call) (void);
@@ -419,7 +420,7 @@ struct target_ops
        only one, of readbuf or writebuf must be non-NULL.  */
     LONGEST (*to_xfer_partial) (struct target_ops *ops,
                                enum target_object object, const char *annex,
-                               void *readbuf, const void *writebuf,
+                               gdb_byte *readbuf, const gdb_byte *writebuf,
                                ULONGEST offset, LONGEST len);
 
     int to_magic;
@@ -532,8 +533,8 @@ extern void target_disconnect (char *, int);
 
 extern DCACHE *target_dcache;
 
-extern int do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
-                          struct mem_attrib *attrib);
+extern int do_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
+                          int write, struct mem_attrib *attrib);
 
 extern int target_read_string (CORE_ADDR, char **, int, int *);
 
@@ -542,10 +543,10 @@ extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
 extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
                                int len);
 
-extern int xfer_memory (CORE_ADDR, char *, int, int,
+extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
                        struct mem_attrib *, struct target_ops *);
 
-extern int child_xfer_memory (CORE_ADDR, char *, int, int,
+extern int child_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
                              struct mem_attrib *, struct target_ops *);
 
 /* Make a single attempt at transfering LEN bytes.  On a successful
@@ -554,11 +555,11 @@ extern int child_xfer_memory (CORE_ADDR, char *, int, int,
    of bytes actually transfered is not defined) and ERR is set to a
    non-zero error indication.  */
 
-extern int target_read_memory_partial (CORE_ADDR addr, char *buf, int len,
-                                      int *err);
+extern int target_read_memory_partial (CORE_ADDR addr, gdb_byte *buf,
+                                      int len, int *err);
 
-extern int target_write_memory_partial (CORE_ADDR addr, char *buf, int len,
-                                       int *err);
+extern int target_write_memory_partial (CORE_ADDR addr, gdb_byte *buf,
+                                       int len, int *err);
 
 extern char *child_pid_to_exec_file (int);
 
@@ -582,7 +583,7 @@ extern int child_remove_vfork_catchpoint (int);
 
 extern void child_acknowledge_created_inferior (int);
 
-extern int child_follow_fork (int);
+extern int child_follow_fork (struct target_ops *, int);
 
 extern void child_insert_exec_catchpoint (int);
 
@@ -747,8 +748,7 @@ extern void target_load (char *arg, int from_tty);
    This function returns 1 if the inferior should not be resumed
    (i.e. there is another event pending).  */
 
-#define target_follow_fork(follow_child) \
-     (*current_target.to_follow_fork) (follow_child)
+int target_follow_fork (int follow_child);
 
 /* On some targets, we can catch an inferior exec event when it
    occurs.  These functions insert/remove an already-created
This page took 0.025995 seconds and 4 git commands to generate.