home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / darwin / darwinx86.iso / usr / local / include / mach-o / dyld_gdb.h next >
Encoding:
C/C++ Source or Header  |  2001-09-14  |  2.6 KB  |  76 lines

  1. #ifndef _DYLD_GDB_
  2. #define _DYLD_GDB_
  3. /*
  4.  * This file describes the interface between gdb and dyld created for
  5.  * MacOS X GM.  Prior to MacOS X GM gdb used the dyld_debug interfaces
  6.  * described in <mach-o/dyld_debug.h>.
  7.  */
  8.  
  9. /*
  10.  * gdb_dyld_version is the version of gdb interface that dyld is currently
  11.  * exporting.  For the interface described in this header file gdb_dyld_version
  12.  * is 1.  As the gdb/dyld interface changes this number will be incremented and
  13.  * comments will be added as to what are the are changes for the various
  14.  * versions.
  15.  */
  16. extern unsigned int gdb_dyld_version;
  17.  
  18. /* 
  19.  * gdb_dyld_state_changed is the internal dyld routine called by dyld to notify
  20.  * gdb that the state of the data structures has changed.  gdb is expected to
  21.  * put a break point on this routine and re-read the internal dyld data
  22.  * structures below when this break point is hit.
  23.  */
  24. extern void gdb_dyld_state_changed(void);
  25.  
  26. /*
  27.  * gdb looks directly at parts of two of dyld's internal data structures.  The
  28.  * list of object file images and the list of library images.  The parts of
  29.  * these structures that gdb looks at will not change unless the value of
  30.  * gdb_dyld_version changes.  The size of these structures and the other fields
  31.  * that gdb does not look at may change.
  32.  *
  33.  *  struct object_images {
  34.  *      struct object_image images[NOBJECT_IMAGES];
  35.  *      unsigned long nimages; 
  36.  *      struct object_images *next_images; 
  37.  *      ...
  38.  *  };
  39.  *
  40.  *  struct library_images { 
  41.  *      struct library_image images[NLIBRARY_IMAGES];
  42.  *      unsigned long nimages;
  43.  *      struct library_images *next_images;
  44.  *      ...
  45.  *  };
  46.  *
  47.  * Both the object_image structure and the library_image structure
  48.  * start with a structure containing the following fields:
  49.  *
  50.  *  struct image {   
  51.  *      char *name;                 image name for reporting errors
  52.  *      unsigned long vmaddr_slide; the slide from the staticly linked address
  53.  *      struct mach_header *mh;     address of the mach header of the image
  54.  *    unsigned long valid;        TRUE if this is struct is valid
  55.  *      ...
  56.  *  };
  57.  */
  58.  
  59. /* object_images is the global object_images structure */
  60.  
  61. /* the number of gdb_object_image structures present per bucket */
  62. extern unsigned int gdb_nobject_images;
  63.  
  64. /* the size of each gdb_object_image structure */
  65. extern unsigned int gdb_object_image_size;
  66.  
  67. /* library_images is the global library_images structure */
  68.  
  69. /* the number of gdb_library_image structures present per bucket */
  70. extern unsigned int gdb_nlibrary_images;
  71.  
  72. /* the size of each gdb_library_image structure */
  73. extern unsigned int gdb_library_image_size;
  74.  
  75. #endif /* _DYLD_GDB_ */
  76.