* solib-svr4.c (svr4_truncate_ptr): New function.
[deliverable/binutils-gdb.git] / gdb / target.h
index 7c97ba619d3465e2985e2f533a0b6c2f11ffd6ef..3d17becdfd1719957495340080feedd58dec6fa4 100644 (file)
@@ -1,6 +1,6 @@
 /* Interface between GDB and target environments, including files and processes
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc.
+   2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by John Gilmore.
 
    This file is part of GDB.
@@ -313,6 +313,12 @@ struct target_ops
     void (*to_async) (void (*cb) (enum inferior_event_type, void *context),
                      void *context);
     int to_async_mask_value;
+    int (*to_find_memory_regions) (int (*) (CORE_ADDR, 
+                                           unsigned long, 
+                                           int, int, int, 
+                                           void *), 
+                                  void *);
+    char * (*to_make_corefile_notes) (bfd *, int *);
     int to_magic;
     /* Need sub-structure for target machine related rather than comm related?
      */
@@ -999,6 +1005,23 @@ extern void (*target_new_objfile_hook) (struct objfile *);
 #define target_pid_to_exec_file(pid) \
      (current_target.to_pid_to_exec_file) (pid)
 
+/*
+ * Iterator function for target memory regions.
+ * Calls a callback function once for each memory region 'mapped'
+ * in the child process.  Defined as a simple macro rather than
+ * as a function macro so that it can be tested for nullity.  
+ */
+
+#define target_find_memory_regions(FUNC, DATA) \
+     (current_target.to_find_memory_regions) (FUNC, DATA)
+
+/*
+ * Compose corefile .note section.
+ */
+
+#define target_make_corefile_notes(BFD, SIZE_P) \
+     (current_target.to_make_corefile_notes) (BFD, SIZE_P)
+
 /* Hook to call target-dependent code after reading in a new symbol table.  */
 
 #ifndef TARGET_SYMFILE_POSTREAD
@@ -1049,17 +1072,6 @@ extern void (*target_new_objfile_hook) (struct objfile *);
      ((LONGEST)(byte_count) <= REGISTER_SIZE)
 #endif
 
-/* However, some addresses may not be profitable to use hardware to watch,
-   or may be difficult to understand when the addressed object is out of
-   scope, and hence should be unwatched.  On some targets, this may have
-   severe performance penalties, such that we might as well use regular
-   watchpoints, and save (possibly precious) hardware watchpoints for other
-   locations.  */
-
-#if !defined(TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT)
-#define TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT(pid,start,len) 0
-#endif
-
 
 /* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.  TYPE is 0
    for write, 1 for read, and 2 for read/write accesses.  Returns 0 for
This page took 0.033829 seconds and 4 git commands to generate.