*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / target.h
index 428e8b37b5605b09b7f4b87ef8fe7de3ac69ceb6..582fa789a675104936762a86b44ccac745bf9c87 100644 (file)
@@ -236,23 +236,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 +263,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
@@ -324,24 +324,27 @@ 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, gdb_byte *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_remove_breakpoint) (CORE_ADDR, char *);
+    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);
     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);
@@ -355,12 +358,12 @@ struct target_ops
     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 *);
@@ -408,7 +411,7 @@ struct target_ops
        thread-local storage hasn't been allocated yet, this function
        may return an error.  */
     CORE_ADDR (*to_get_thread_local_address) (ptid_t ptid,
-                                             struct objfile *objfile,
+                                             CORE_ADDR load_module_addr,
                                              CORE_ADDR offset);
 
     /* Perform partial transfers on OBJECT.  See target_read_partial
@@ -416,7 +419,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;
@@ -529,19 +532,20 @@ 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 *);
 
-extern int target_read_memory (CORE_ADDR memaddr, char *myaddr, int len);
+extern int target_read_memory (CORE_ADDR memaddr, gdb_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 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
@@ -568,11 +572,11 @@ 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);
 
@@ -580,7 +584,7 @@ extern void child_acknowledge_created_inferior (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);
 
@@ -900,8 +904,6 @@ extern void target_load (char *arg, int from_tty);
 
 extern int target_async_mask (int mask);
 
-extern void target_link (char *, CORE_ADDR *);
-
 /* Converts a process id to a string.  Usually, the string just contains
    `process xyz', but on some systems it may contain
    `process xyz thread abc'.  */
@@ -1014,18 +1016,6 @@ extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
    (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
@@ -1067,9 +1057,14 @@ extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
      (*current_target.to_remove_hw_breakpoint) (addr, save)
 #endif
 
+extern int target_stopped_data_address_p (struct target_ops *);
+
 #ifndef target_stopped_data_address
-#define target_stopped_data_address() \
-    (*current_target.to_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,
@@ -1140,13 +1135,13 @@ struct section_table *target_section_by_addr (struct target_ops *target,
 
 /* From mem-break.c */
 
-extern int memory_remove_breakpoint (CORE_ADDR, char *);
+extern int memory_remove_breakpoint (CORE_ADDR, gdb_byte *);
 
-extern int memory_insert_breakpoint (CORE_ADDR, char *);
+extern int memory_insert_breakpoint (CORE_ADDR, gdb_byte *);
 
-extern int default_memory_remove_breakpoint (CORE_ADDR, char *);
+extern int default_memory_remove_breakpoint (CORE_ADDR, gdb_byte *);
 
-extern int default_memory_insert_breakpoint (CORE_ADDR, char *);
+extern int default_memory_insert_breakpoint (CORE_ADDR, gdb_byte *);
 
 
 /* From target.c */
This page took 0.028319 seconds and 4 git commands to generate.