home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / libdwarf / pro_opaque.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  6.5 KB  |  239 lines

  1. /* 
  2.    pro_opaque.h
  3.  
  4.    This file defines all the opaque structures for which pointers
  5.    are provided in libdwarf.h.  In addition, it defines private
  6.    structures that are used internally by libdwarf.
  7.  
  8.     $Revision: 1.3 $ $Date: 1993/11/15 16:42:32 $
  9. */
  10.  
  11. /* 
  12.     Sgidefs included to define __uint32_t, 
  13.     a guaranteed 4-byte quantity.            
  14. */
  15. #include <sgidefs.h>
  16.  
  17. #define true                    1
  18. #define false                   0
  19.  
  20. /* to identify a cie */
  21. #define DW_CIE_ID         ~(0x0)
  22. #define DW_CIE_VERSION        1
  23.  
  24. typedef __uint32_t                  Dwarf_Word;
  25. typedef signed char                 Dwarf_Sbyte;
  26. typedef unsigned char               Dwarf_Ubyte;
  27. typedef signed short            Dwarf_Shalf;
  28. typedef __int32_t            Dwarf_Sword;
  29.  
  30. /* 
  31.     producer:
  32.     This struct is used to hold information about all
  33.     debug* sections. On creating a new section, section
  34.     names and indices are added to this struct
  35.     definition in pro_section.h
  36. */
  37. typedef struct Dwarf_P_Section_Data_s     *Dwarf_P_Section_Data;
  38.  
  39. /*
  40.     producer:
  41.     This struct is used to hold entries in the include directories
  42.     part of statement prologue. Definition in pro_line.h
  43. */
  44. typedef struct Dwarf_P_Inc_Dir_s     *Dwarf_P_Inc_Dir;
  45.  
  46. /*
  47.     producer:
  48.     This struct holds file entries for the statement prologue. 
  49.     Defined in pro_line.h
  50. */
  51. typedef struct Dwarf_P_F_Entry_s     *Dwarf_P_F_Entry;
  52.  
  53. /*
  54.     producer:
  55.     This struct holds information for each cie. Defn in pro_frame.h
  56. */
  57. typedef struct Dwarf_P_Cie_s         *Dwarf_P_Cie;
  58.  
  59. /*
  60.     producer:
  61.     Struct to hold line number information, different from 
  62.     Dwarf_Line opaque type.
  63. */
  64. typedef struct Dwarf_P_Line_s         *Dwarf_P_Line;
  65.  
  66. /*
  67.     producer:
  68.     Struct to hold information about address ranges.
  69. */
  70. typedef struct Dwarf_P_Arange_s        *Dwarf_P_Arange;
  71. typedef struct Dwarf_P_Pubname_s    *Dwarf_P_Pubname;
  72. typedef struct Dwarf_P_Funcname_s    *Dwarf_P_Funcname;
  73. typedef struct Dwarf_P_Typename_s    *Dwarf_P_Typename;
  74. typedef struct Dwarf_P_Varname_s    *Dwarf_P_Varname;
  75. typedef struct Dwarf_P_Weakname_s    *Dwarf_P_Weakname;
  76.  
  77. /* fields used by producer */
  78. struct Dwarf_P_Die_s {
  79.     Dwarf_Unsigned     di_offset;        /* offset in debug info */
  80.     char *          di_abbrev;        /* abbreviation */
  81.     Dwarf_Word         di_abbrev_nbytes;    /* # of bytes in abbrev */
  82.     Dwarf_Tag         di_tag;
  83.     Dwarf_P_Die         di_parent;        /* parent of current die */
  84.     Dwarf_P_Die         di_child;        /* first child */
  85.     Dwarf_P_Die         di_left;        /* left sibling */
  86.     Dwarf_P_Die         di_right;        /* right sibling */
  87.     Dwarf_P_Attribute      di_attrs;        /* list of attributes */
  88.     Dwarf_P_Attribute      di_last_attr;        /* last attribute */
  89.     Dwarf_Word         di_n_attr;        /* number of attributes */
  90. };
  91.  
  92.  
  93. /* producer fields */
  94. struct Dwarf_P_Attribute_s {
  95.     Dwarf_Half          ar_attribute;        /* Attribute Value. */
  96.     Dwarf_Half          ar_attribute_form;    /* Attribute Form. */
  97.     Dwarf_P_Die        ar_ref_die;    /* die pointer if form ref */
  98.     char         *ar_data;    /* data, format given by form */
  99.     Dwarf_Unsigned    ar_nbytes;    /* no. of bytes of data */
  100.     Dwarf_Word        ar_rel_symidx;    /* when attribute has a relocatable
  101.                        value, holds index of symbol in 
  102.                        SYMTAB */
  103.     Dwarf_Ubyte        ar_rel_type;    /* relocation type */
  104.     Dwarf_Word        ar_rel_offset;    /* Offset of relocation within block */
  105.     Dwarf_P_Attribute    ar_next;
  106. };
  107.  
  108.  
  109. /* Fields used by producer */
  110. struct Dwarf_P_Debug_s {
  111.     Elf                 *de_elf;
  112.  
  113.     Dwarf_Unsigned      de_access;
  114.     Dwarf_Handler       de_errhand;
  115.     Dwarf_Ptr           de_errarg;
  116.  
  117.         /* 
  118.         Call back function, used to create .debug* sections.  
  119.         Provided by user 
  120.     */ 
  121.     Dwarf_Callback_Func        de_func;     
  122.  
  123.         /* Flags indication 64/32, got from producer_init */
  124.     Dwarf_Unsigned        de_flags;    
  125.  
  126.         /* This holds information about each debug section */
  127.     Dwarf_P_Section_Data    de_debug_sects; 
  128.  
  129.         /* Pointer to the last section */
  130.     Dwarf_P_Section_Data    de_last_debug_sect;
  131.  
  132.         /* Number of debug data sections */
  133.     Dwarf_Word             de_n_debug_sect;
  134.  
  135.     /* Holds an array of file entry information, null terminated */
  136.     Dwarf_P_F_Entry        de_file_entries;
  137.  
  138.         /* last file entry */
  139.     Dwarf_P_F_Entry        de_last_file_entry;
  140.  
  141.         /* Number of file entries, needed to return index of file */
  142.     Dwarf_Unsigned        de_n_file_entries;
  143.  
  144.         /* Has the directories used to search for source files */
  145.     Dwarf_P_Inc_Dir        de_inc_dirs;
  146.  
  147.         /* Last include directory */
  148.     Dwarf_P_Inc_Dir        de_last_inc_dir;
  149.  
  150.         /* Number of include directories, needed to return dir index */
  151.     Dwarf_Unsigned         de_n_inc_dirs;
  152.  
  153.         /* Has all the line number info for the stmt program */
  154.     Dwarf_P_Line        de_lines;
  155.  
  156.         /* Handle to the last line number entry. */
  157.     Dwarf_P_Line        de_last_line;
  158.  
  159.         /* List of cie's for the debug unit */
  160.     Dwarf_P_Cie            de_frame_cies;
  161.  
  162.         /* Number of cie entries */
  163.     Dwarf_Unsigned        de_n_cie;
  164.  
  165.         /* Pointer to the last entry */
  166.     Dwarf_P_Cie            de_last_cie;
  167.  
  168.         /* List of fde's for the debug unit */
  169.     Dwarf_P_Fde            de_frame_fdes;
  170.  
  171.     /* Number of fde's. */
  172.     Dwarf_Unsigned        de_n_fde;
  173.  
  174.         /* Pointer to the last entry */
  175.     Dwarf_P_Fde            de_last_fde;
  176.  
  177.         /* First die, leads to all others */
  178.     Dwarf_P_Die         de_dies;   
  179.  
  180.         /* Pointer to list of strings */
  181.     char            *de_strings;
  182.  
  183.     /* Pointer to chain of aranges */
  184.     Dwarf_P_Arange        de_arange;
  185.  
  186.         /* Pointer to last arange */
  187.     Dwarf_P_Arange        de_last_arange;
  188.  
  189.     /* Number of aranges */
  190.     Dwarf_Sword            de_arange_count;
  191.  
  192.     /* Pointer to chain of pubnames. */
  193.     Dwarf_P_Pubname        de_pubname;
  194.  
  195.     /* Pointer to last pubname. */
  196.     Dwarf_P_Pubname        de_last_pubname;
  197.  
  198.     /* Number of pubnames. */
  199.     Dwarf_Sword            de_pubname_count;
  200.  
  201.     /* Pointer to chain of function names. */
  202.     Dwarf_P_Funcname        de_funcname;
  203.  
  204.     /* Pointer to last function name. */
  205.     Dwarf_P_Funcname        de_last_funcname;
  206.  
  207.         /* Number of function names. */
  208.     Dwarf_Sword            de_funcname_count;
  209.  
  210.     /* Pointer to chain of type names. */
  211.     Dwarf_P_Typename        de_typename;
  212.  
  213.     /* Pointer to last type name. */
  214.     Dwarf_P_Typename        de_last_typename;
  215.  
  216.         /* Number of type names. */
  217.     Dwarf_Sword            de_typename_count;
  218.  
  219.     /* Pointer to chain of variable names. */
  220.     Dwarf_P_Varname        de_varname;
  221.  
  222.     /* Pointer to last variable name. */
  223.     Dwarf_P_Varname        de_last_varname;
  224.  
  225.         /* Number of variable names. */
  226.     Dwarf_Sword            de_varname_count;
  227.  
  228.     /* Pointer to chain of weak names. */
  229.     Dwarf_P_Weakname        de_weakname;
  230.  
  231.     /* Pointer to last weak name. */
  232.     Dwarf_P_Weakname        de_last_weakname;
  233.  
  234.         /* Number of weak names. */
  235.     Dwarf_Sword            de_weakname_count;
  236. };
  237.  
  238. #define CURRENT_VERSION_STAMP        2
  239.